org.xml.sax.SAXParseException: Unexpected end of file after null [wlst]

Oracle Community | Jahangir.Pasha | 2 years ago
  1. 0

    Error while deleting project or Xquery resource in OSB Console

    Oracle Community | 2 years ago | Jahangir.Pasha
    org.xml.sax.SAXParseException: Unexpected end of file after null [wlst]
  2. 0

    h3. Problem Description I export a book with images and import to another Spreadsheet 2nd times, it throws {code} 嚴重的: >>org.zkoss.poi.POIXMLException: java.lang.reflect.InvocationTargetException >>java.lang.reflect.InvocationTargetException: null >>org.apache.xmlbeans.XmlException: error: Unexpected element: XML_DOC_OR_TEXT_DECL >>org.xml.sax.SAXParseException: Unexpected element: XML_DOC_OR_TEXT_DECL >> at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.reportFatalError(Piccolo.java:1038) >> at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.parse(Piccolo.java:723) >> at org.apache.xmlbeans.impl.store.Locale$SaxLoader.load(Locale.java:3439) >> at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1270) >> at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1257) >> at org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:345) >> at org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.WsDrDocument$Factory.parse(Unknown Source) >> at org.zkoss.poi.xssf.usermodel.XSSFDrawing.<init>(XSSFDrawing.java:92) >> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) >> at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) >> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) >> at java.lang.reflect.Constructor.newInstance(Constructor.java:513) >> at org.zkoss.poi.xssf.usermodel.XSSFFactory.createDocumentPart(XSSFFactory.java:60) >> at org.zkoss.poi.POIXMLDocumentPart.read(POIXMLDocumentPart.java:403) >> at org.zkoss.poi.POIXMLDocumentPart.read(POIXMLDocumentPart.java:408) >> at org.zkoss.poi.POIXMLDocument.load(POIXMLDocument.java:155) >> at org.zkoss.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:271) >> at org.zkoss.zss.model.sys.impl.XSSFBookImpl.<init>(XSSFBookImpl.java:101) >> at org.zkoss.zss.model.sys.impl.ExcelImporter.importsFromStream(ExcelImporter.java:117) >> at org.zkoss.zss.model.sys.impl.ExcelImporter.imports(ExcelImporter.java:78) >> at org.zkoss.zss.api.impl.ImporterImpl.imports(ImporterImpl.java:21) >> at zss.testapp.ExportComposer.export2Destination(ExportComposer.java:175) >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) >> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >> at java.lang.reflect.Method.invoke(Method.java:597) >> at org.zkoss.zk.ui.select.Selectors$ComposerEventListener.onEvent(Selectors.java:681) {code} h3. Reproducing Steps: # visit *zss.test* project's {{export.zul}} ## or attached source codes (zul, excel file, java), or run *zss.test* project's {{ExportTest}} # click "input pictures" button # click "Export to destination Spreadsheet" # click "Export to destination Spreadsheet" 2nd time *Expected:* No error occurs. *Actual:* the exception described in problem description is thrown. *Notice:* If you use "Insert picture" to insert picture and import the file 2 times, the same exception is also thrown. {code} public class ExportComposer extends SelectorComposer<Component> { private static final long serialVersionUID = 1L; Exporter excelExporter = Exporters.getExporter("excel"); @Wire("#source") private Spreadsheet srcSpreadsheet; @Wire("#destination") private Spreadsheet dstSpreadsheet; @Listen("onClick = #inputPicture") public void inputChartPicture() throws IOException{ Sheet sheet = srcSpreadsheet.getSelectedSheet(); SheetOperationUtil.addPicture(range(sheet,3, 8 ), new AImage(ExportComposer.class.getResource("zklogo.png")).getByteData(), Format.PNG, 100, 100); } @Listen("onClick = #exportImport") public void export2Destination() throws IOException{ File exportedFile = new File("exported.xlsx"); FileOutputStream fos = new FileOutputStream(exportedFile); excelExporter.export(srcSpreadsheet.getBook(), fos); fos.flush(); fos.close(); //import Importer importer = Importers.getImporter("excel"); Book book = importer .imports(new FileInputStream(exportedFile), "exported"); dstSpreadsheet.setBook(book); exportedFile.delete(); } } {code} {code:xml} <zk> <window apply="zss.testapp.ExportComposer" height="100%"> <button id="inputPicture" label="Input Pictures and Charts"/> <separator></separator> <button id="exportImport" label="Export to destination Spreadsheet"/> <spreadsheet id="source" src="/export.xlsx" maxrows="150" maxcolumns="40" width="100%" height="50%" showContextMenu="true" showSheetbar="true" showToolbar="true" ctrlKeys="^c^x^v^d^s^o^b^i^u#del^#del^z^y^e" /> <spreadsheet id="destination" maxrows="150" maxcolumns="40" width="100%" height="40%" showContextMenu="true" showSheetbar="true" showToolbar="true" ctrlKeys="^c^x^v^d^s^o^b^i^u#del^#del^z^y^e" /> </window> </zk> {code}

    ZK-Tracker | 4 years ago | hawk
    org.xml.sax.SAXParseException: Unexpected element: XML_DOC_OR_TEXT_DECL
  3. 0

    h3. Problem Description I export a book with images and import to another Spreadsheet 2nd times, it throws {code} 嚴重的: >>org.zkoss.poi.POIXMLException: java.lang.reflect.InvocationTargetException >>java.lang.reflect.InvocationTargetException: null >>org.apache.xmlbeans.XmlException: error: Unexpected element: XML_DOC_OR_TEXT_DECL >>org.xml.sax.SAXParseException: Unexpected element: XML_DOC_OR_TEXT_DECL >> at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.reportFatalError(Piccolo.java:1038) >> at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.parse(Piccolo.java:723) >> at org.apache.xmlbeans.impl.store.Locale$SaxLoader.load(Locale.java:3439) >> at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1270) >> at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1257) >> at org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:345) >> at org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.WsDrDocument$Factory.parse(Unknown Source) >> at org.zkoss.poi.xssf.usermodel.XSSFDrawing.<init>(XSSFDrawing.java:92) >> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) >> at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) >> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) >> at java.lang.reflect.Constructor.newInstance(Constructor.java:513) >> at org.zkoss.poi.xssf.usermodel.XSSFFactory.createDocumentPart(XSSFFactory.java:60) >> at org.zkoss.poi.POIXMLDocumentPart.read(POIXMLDocumentPart.java:403) >> at org.zkoss.poi.POIXMLDocumentPart.read(POIXMLDocumentPart.java:408) >> at org.zkoss.poi.POIXMLDocument.load(POIXMLDocument.java:155) >> at org.zkoss.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:271) >> at org.zkoss.zss.model.sys.impl.XSSFBookImpl.<init>(XSSFBookImpl.java:101) >> at org.zkoss.zss.model.sys.impl.ExcelImporter.importsFromStream(ExcelImporter.java:117) >> at org.zkoss.zss.model.sys.impl.ExcelImporter.imports(ExcelImporter.java:78) >> at org.zkoss.zss.api.impl.ImporterImpl.imports(ImporterImpl.java:21) >> at zss.testapp.ExportComposer.export2Destination(ExportComposer.java:175) >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) >> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >> at java.lang.reflect.Method.invoke(Method.java:597) >> at org.zkoss.zk.ui.select.Selectors$ComposerEventListener.onEvent(Selectors.java:681) {code} h3. Reproducing Steps: # visit *zss.test* project's {{export.zul}} ## or attached source codes (zul, excel file, java), or run *zss.test* project's {{ExportTest}} # click "input pictures" button # click "Export to destination Spreadsheet" # click "Export to destination Spreadsheet" 2nd time *Expected:* No error occurs. *Actual:* the exception described in problem description is thrown. *Notice:* If you use "Insert picture" to insert picture and import the file 2 times, the same exception is also thrown. {code} public class ExportComposer extends SelectorComposer<Component> { private static final long serialVersionUID = 1L; Exporter excelExporter = Exporters.getExporter("excel"); @Wire("#source") private Spreadsheet srcSpreadsheet; @Wire("#destination") private Spreadsheet dstSpreadsheet; @Listen("onClick = #inputPicture") public void inputChartPicture() throws IOException{ Sheet sheet = srcSpreadsheet.getSelectedSheet(); SheetOperationUtil.addPicture(range(sheet,3, 8 ), new AImage(ExportComposer.class.getResource("zklogo.png")).getByteData(), Format.PNG, 100, 100); } @Listen("onClick = #exportImport") public void export2Destination() throws IOException{ File exportedFile = new File("exported.xlsx"); FileOutputStream fos = new FileOutputStream(exportedFile); excelExporter.export(srcSpreadsheet.getBook(), fos); fos.flush(); fos.close(); //import Importer importer = Importers.getImporter("excel"); Book book = importer .imports(new FileInputStream(exportedFile), "exported"); dstSpreadsheet.setBook(book); exportedFile.delete(); } } {code} {code:xml} <zk> <window apply="zss.testapp.ExportComposer" height="100%"> <button id="inputPicture" label="Input Pictures and Charts"/> <separator></separator> <button id="exportImport" label="Export to destination Spreadsheet"/> <spreadsheet id="source" src="/export.xlsx" maxrows="150" maxcolumns="40" width="100%" height="50%" showContextMenu="true" showSheetbar="true" showToolbar="true" ctrlKeys="^c^x^v^d^s^o^b^i^u#del^#del^z^y^e" /> <spreadsheet id="destination" maxrows="150" maxcolumns="40" width="100%" height="40%" showContextMenu="true" showSheetbar="true" showToolbar="true" ctrlKeys="^c^x^v^d^s^o^b^i^u#del^#del^z^y^e" /> </window> </zk> {code}

    ZK-Tracker | 4 years ago | hawk
    org.xml.sax.SAXParseException: Unexpected element: XML_DOC_OR_TEXT_DECL
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    soapUI - issue with wsdl that includes xsd

    Stack Overflow | 6 years ago | Dave
    org.apache.xmlbeans.XmlException: error: Unexpected end of file after null
  6. 0

    TopCoder Forums

    topcoder.com | 1 year ago
    org.apache.xmlbeans.XmlException: error: Unexpected end of file after null

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.xml.sax.SAXParseException

      Unexpected end of file after null [wlst]

      at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.reportFatalError()
    2. XmlBeans
      SchemaTypeLoaderBase.parse
      1. org.apache.xmlbeans.impl.piccolo.xml.Piccolo.reportFatalError(Piccolo.java:1038)[wlst]
      2. org.apache.xmlbeans.impl.piccolo.xml.Piccolo.parse(Piccolo.java:723)[wlst]
      3. org.apache.xmlbeans.impl.store.Locale$SaxLoader.load(Locale.java:3456)[wlst]
      4. org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1278)[wlst]
      5. org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1265)[wlst]
      6. org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:345)[wlst]
      6 frames
    3. com.bea.wli
      BinaryIndexedFile.readData
      1. com.bea.wli.sb.util.XBeanUtils.parse(XBeanUtils.java:454)[wlst]
      2. com.bea.wli.sb.resources.DefaultXmlResourceValueRepresentation.toCanonical(DefaultXmlResourceValueRepresentation.java:77)[wlst]
      3. com.bea.wli.config.persistence.BinaryIndexedFile.readData(BinaryIndexedFile.java:444)[wlst]
      3 frames
    4. weblogic.security.service
      SecurityManager.runAs
      1. weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)[wlst]
      1 frame
    5. com.bea.wli
      DelegatedSessionManagementMBeanImpl.activateSession
      1. com.bea.wli.config.deployment.server.ServerDeploymentInitiator.serverCommit(ServerDeploymentInitiator.java:363)[wlst]
      2. com.bea.wli.config.deployment.server.ServerDeploymentInitiator.execute(ServerDeploymentInitiator.java:243)[wlst]
      3. com.bea.wli.config.session.impl.SessionManager.commitSessionUnlocked(SessionManager.java:314)[wlst]
      4. com.bea.wli.config.session.impl.SessionManager.commitSession(SessionManager.java:233)[wlst]
      5. com.bea.wli.config.session.impl.SessionManager.commitSession(SessionManager.java:190)[wlst]
      6. com.bea.wli.config.session.impl.SessionManager.commitSession(SessionManager.java:199)[wlst]
      7. com.bea.wli.config.mbeans.Session.commitSession(Session.java:94)[wlst]
      8. com.bea.wli.sb.management.configuration.SessionManagement.activateSession(SessionManagement.java:30)[wlst]
      9. com.bea.wli.sb.management.configuration.DelegatedSessionManagementMBeanImpl.activateSession(DelegatedSessionManagementMBeanImpl.java:32)[wlst]
      9 frames
    6. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[wlst]
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[wlst]
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[wlst]
      4. java.lang.reflect.Method.invoke(Method.java:597)[wlst]
      4 frames
    7. weblogic.management.jmx
      WLSModelMBean.invoke
      1. weblogic.management.jmx.modelmbean.WLSModelMBean.invoke(WLSModelMBean.java:437)[wlst]
      1 frame
    8. Java RT
      JmxMBeanServer.invoke
      1. com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)[wlst]
      2. com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)[wlst]
      2 frames
    9. weblogic.management.mbeanservers
      FederatedMBeanServerInterceptor.invoke
      1. weblogic.management.mbeanservers.domainruntime.internal.FederatedMBeanServerInterceptor.invoke(FederatedMBeanServerInterceptor.java:349)[wlst]
      1 frame
    10. weblogic.management.jmx
      WLSMBeanServerInterceptorBase.invoke
      1. weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase$16.run(WLSMBeanServerInterceptorBase.java:449)[wlst]
      2. weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase.invoke(WLSMBeanServerInterceptorBase.java:447)[wlst]
      2 frames
    11. weblogic.management.mbeanservers
      JMXContextInterceptor.invoke
      1. weblogic.management.mbeanservers.internal.JMXContextInterceptor.invoke(JMXContextInterceptor.java:263)[wlst]
      1 frame
    12. weblogic.management.jmx
      WLSMBeanServerInterceptorBase.invoke
      1. weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase$16.run(WLSMBeanServerInterceptorBase.java:449)[wlst]
      2. weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase.invoke(WLSMBeanServerInterceptorBase.java:447)[wlst]
      2 frames
    13. weblogic.management.mbeanservers
      SecurityMBeanMgmtOpsInterceptor.invoke
      1. weblogic.management.mbeanservers.internal.SecurityMBeanMgmtOpsInterceptor.invoke(SecurityMBeanMgmtOpsInterceptor.java:65)[wlst]
      1 frame
    14. weblogic.management.jmx
      WLSMBeanServerInterceptorBase.invoke
      1. weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase$16.run(WLSMBeanServerInterceptorBase.java:449)[wlst]
      2. weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase.invoke(WLSMBeanServerInterceptorBase.java:447)[wlst]
      2 frames
    15. weblogic.management.mbeanservers
      SecurityInterceptor.invoke
      1. weblogic.management.mbeanservers.internal.SecurityInterceptor.invoke(SecurityInterceptor.java:444)[wlst]
      1 frame
    16. weblogic.management.jmx
      WLSMBeanServer.invoke
      1. weblogic.management.jmx.mbeanserver.WLSMBeanServer.invoke(WLSMBeanServer.java:323)[wlst]
      1 frame
    17. weblogic.management.mbeanservers
      JMXConnectorSubjectForwarder$11.run
      1. weblogic.management.mbeanservers.internal.JMXConnectorSubjectForwarder$11$1.run(JMXConnectorSubjectForwarder.java:663)[wlst]
      2. weblogic.management.mbeanservers.internal.JMXConnectorSubjectForwarder$11.run(JMXConnectorSubjectForwarder.java:661)[wlst]
      2 frames
    18. weblogic.security.acl
      AuthenticatedSubject.doAs
      1. weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)[wlst]
      1 frame
    19. weblogic.management.mbeanservers
      JMXConnectorSubjectForwarder.invoke
      1. weblogic.management.mbeanservers.internal.JMXConnectorSubjectForwarder.invoke(JMXConnectorSubjectForwarder.java:654)[wlst]
      1 frame
    20. Java RT
      RMIConnectionImpl.doPrivilegedOperation
      1. javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1427)[wlst]
      2. javax.management.remote.rmi.RMIConnectionImpl.access$200(RMIConnectionImpl.java:72)[wlst]
      3. javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1265)[wlst]
      4. javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1367)[wlst]
      4 frames
    21. com.bea.wli
      SimpleLazyPersistenceHandler.readData0
      1. com.bea.wli.config.persistence.SimpleLazyPersistenceHandler.readData0(SimpleLazyPersistenceHandler.java:44)[wlst]
      1 frame
    22. Java RT
      RMIConnectionImpl.invoke
      1. javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:788)[wlst]
      1 frame
    23. com.bea.wli
      AbstractLazyPersistenceHandler.readData
      1. com.bea.wli.config.persistence.AbstractLazyPersistenceHandler.readData(AbstractLazyPersistenceHandler.java:101)[wlst]
      1 frame
    24. Java RT
      RMIConnectionImpl_WLSkel.invoke
      1. javax.management.remote.rmi.RMIConnectionImpl_WLSkel.invoke(Unknown Source)[wlst]
      1 frame
    25. com.bea.wli
      DataCache.evaluateKey
      1. com.bea.wli.config.component.impl.DataCache.evaluateKey(DataCache.java:97)[wlst]
      2. com.bea.wli.config.component.impl.DataCache.evaluateKey(DataCache.java:35)[wlst]
      2 frames
    26. weblogic.rmi.internal
      BasicServerRef.invoke
      1. weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:667)[wlst]
      1 frame
    27. com.bea.wli
      LazyValueCache$DataCacheEntry.evaluate
      1. com.bea.wli.config.component.impl.LazyValueCache$DataCacheEntry.evaluate(LazyValueCache.java:30)[wlst]
      1 frame
    28. weblogic.rmi.internal
      BasicServerRef$1.run
      1. weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:522)[wlst]
      1 frame
    29. weblogic.security.acl
      AuthenticatedSubject.doAs
      1. weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)[wlst]
      1 frame
    30. com.bea.wli
      LazyValue.getValue
      1. com.bea.wli.config.component.impl.LazyValue.getValue(LazyValue.java:91)[wlst]
      1 frame
    31. weblogic.security.service
      SecurityManager.runAs
      1. weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)[wlst]
      1 frame
    32. com.bea.wli
      ComponentTypeImpl.getValue
      1. com.bea.wli.config.component.impl.DataCache.getValue(DataCache.java:87)[wlst]
      2. com.bea.wli.config.component.impl.ComponentTypeImpl.getValue(ComponentTypeImpl.java:776)[wlst]
      2 frames
    33. weblogic.rmi.internal
      BasicServerRef.handleRequest
      1. weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:518)[wlst]
      1 frame
    34. com.bea.wli
      ConfigContextImpl.getResourceData
      1. com.bea.wli.config.impl.ConfigContextImpl.getResourceData(ConfigContextImpl.java:920)
      1 frame