org.xml.sax.SAXException: Failed to save document at org.xwiki.extension.xar.internal.handler.packager.xml.DocumentImporterHandler.saveDocument(DocumentImporterHandler.java:275)

XWiki.org JIRA | Sorin Burjan | 4 years ago
  1. 0

    Steps to reproduce: * user 4.2 RC1. Put the JAR and modify the configuration to use an Oracle database * make sure the data/extension and data/jobs dirs aren't present * start xwiki - the distribution wizard will kick in * click on Install and the Apply * you will see several error messages (in red, each with a stacktrace) * example of a stacktrace below {code} Failed to parse document [XWiki/WysiwygEditorConfig.xml] class org.xml.sax.SAXException: Failed to save document at org.xwiki.extension.xar.internal.handler.packager.xml.DocumentImporterHandler.saveDocument(DocumentImporterHandler.java:275) at org.xwiki.extension.xar.internal.handler.packager.xml.DocumentImporterHandler.endHandlerElement(DocumentImporterHandler.java:378) at org.xwiki.extension.xar.internal.handler.packager.xml.AbstractHandler.endElement(AbstractHandler.java:163) at org.xwiki.extension.xar.internal.handler.packager.xml.AbstractHandler.endElement(AbstractHandler.java:155) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at org.xwiki.extension.xar.internal.handler.packager.DefaultPackager.parseDocument(DefaultPackager.java:327) at org.xwiki.extension.xar.internal.handler.packager.DefaultPackager.importXARToWiki(DefaultPackager.java:165) at org.xwiki.extension.xar.internal.handler.packager.DefaultPackager.importXARToWiki(DefaultPackager.java:135) at org.xwiki.extension.xar.internal.handler.packager.DefaultPackager.importXAR(DefaultPackager.java:126) at org.xwiki.extension.xar.internal.handler.XarExtensionHandler.install(XarExtensionHandler.java:202) at org.xwiki.extension.xar.internal.handler.XarExtensionHandler.install(XarExtensionHandler.java:137) at org.xwiki.extension.handler.internal.DefaultExtensionHandlerManager.install(DefaultExtensionHandlerManager.java:80) at org.xwiki.extension.job.internal.AbstractExtensionJob.installExtension(AbstractExtensionJob.java:149) at org.xwiki.extension.job.internal.AbstractExtensionJob.applyAction(AbstractExtensionJob.java:106) at org.xwiki.extension.job.internal.InstallJob.start(InstallJob.java:135) at org.xwiki.job.AbstractJob.start(AbstractJob.java:134) at org.xwiki.job.internal.DefaultJobManager.run(DefaultJobManager.java:156) at java.lang.Thread.run(Thread.java:679) Caused by: class com.xpn.xwiki.XWikiException: Error number 3202 in 3: Exception while reading document [xwiki:XWiki.WysiwygEditorConfig] Wrapped Exception: Error number 3235 in 3: Exception while searching attachments for documents xwiki:XWiki.WysiwygEditorConfig Wrapped Exception: Exception occurred inside setter of com.xpn.xwiki.doc.XWikiAttachment.author at com.xpn.xwiki.store.XWikiHibernateStore.loadXWikiDoc(XWikiHibernateStore.java:856) at com.xpn.xwiki.store.XWikiCacheStore.loadXWikiDoc(XWikiCacheStore.java:290) at com.xpn.xwiki.XWiki.getDocument(XWiki.java:1404) at com.xpn.xwiki.XWiki.getDocument(XWiki.java:1447) at org.xwiki.extension.xar.internal.handler.packager.xml.DocumentImporterHandler.getDatabaseDocument(DocumentImporterHandler.java:284) at org.xwiki.extension.xar.internal.handler.packager.xml.DocumentImporterHandler.saveDocument(DocumentImporterHandler.java:202) at org.xwiki.extension.xar.internal.handler.packager.xml.DocumentImporterHandler.endHandlerElement(DocumentImporterHandler.java:378) at org.xwiki.extension.xar.internal.handler.packager.xml.AbstractHandler.endElement(AbstractHandler.java:163) at org.xwiki.extension.xar.internal.handler.packager.xml.AbstractHandler.endElement(AbstractHandler.java:155) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at org.xwiki.extension.xar.internal.handler.packager.DefaultPackager.parseDocument(DefaultPackager.java:327) at org.xwiki.extension.xar.internal.handler.packager.DefaultPackager.importXARToWiki(DefaultPackager.java:165) at org.xwiki.extension.xar.internal.handler.packager.DefaultPackager.importXARToWiki(DefaultPackager.java:135) at org.xwiki.extension.xar.internal.handler.packager.DefaultPackager.importXAR(DefaultPackager.java:126) at org.xwiki.extension.xar.internal.handler.XarExtensionHandler.install(XarExtensionHandler.java:202) at org.xwiki.extension.xar.internal.handler.XarExtensionHandler.install(XarExtensionHandler.java:137) at org.xwiki.extension.handler.internal.DefaultExtensionHandlerManager.install(DefaultExtensionHandlerManager.java:80) at org.xwiki.extension.job.internal.AbstractExtensionJob.installExtension(AbstractExtensionJob.java:149) at org.xwiki.extension.job.internal.AbstractExtensionJob.applyAction(AbstractExtensionJob.java:106) at org.xwiki.extension.job.internal.InstallJob.start(InstallJob.java:135) at org.xwiki.job.AbstractJob.start(AbstractJob.java:134) at org.xwiki.job.internal.DefaultJobManager.run(DefaultJobManager.java:156) at java.lang.Thread.run(Thread.java:679) Caused by: class com.xpn.xwiki.XWikiException: Error number 3235 in 3: Exception while searching attachments for documents xwiki:XWiki.WysiwygEditorConfig Wrapped Exception: Exception occurred inside setter of com.xpn.xwiki.doc.XWikiAttachment.author at com.xpn.xwiki.store.XWikiHibernateStore.loadAttachmentList(XWikiHibernateStore.java:1458) at com.xpn.xwiki.store.XWikiHibernateStore.loadXWikiDoc(XWikiHibernateStore.java:756) at com.xpn.xwiki.store.XWikiCacheStore.loadXWikiDoc(XWikiCacheStore.java:290) at com.xpn.xwiki.XWiki.getDocument(XWiki.java:1404) at com.xpn.xwiki.XWiki.getDocument(XWiki.java:1447) at org.xwiki.extension.xar.internal.handler.packager.xml.DocumentImporterHandler.getDatabaseDocument(DocumentImporterHandler.java:284) at org.xwiki.extension.xar.internal.handler.packager.xml.DocumentImporterHandler.saveDocument(DocumentImporterHandler.java:202) at org.xwiki.extension.xar.internal.handler.packager.xml.DocumentImporterHandler.endHandlerElement(DocumentImporterHandler.java:378) at org.xwiki.extension.xar.internal.handler.packager.xml.AbstractHandler.endElement(AbstractHandler.java:163) at org.xwiki.extension.xar.internal.handler.packager.xml.AbstractHandler.endElement(AbstractHandler.java:155) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at org.xwiki.extension.xar.internal.handler.packager.DefaultPackager.parseDocument(DefaultPackager.java:327) at org.xwiki.extension.xar.internal.handler.packager.DefaultPackager.importXARToWiki(DefaultPackager.java:165) at org.xwiki.extension.xar.internal.handler.packager.DefaultPackager.importXARToWiki(DefaultPackager.java:135) at org.xwiki.extension.xar.internal.handler.packager.DefaultPackager.importXAR(DefaultPackager.java:126) at org.xwiki.extension.xar.internal.handler.XarExtensionHandler.install(XarExtensionHandler.java:202) at org.xwiki.extension.xar.internal.handler.XarExtensionHandler.install(XarExtensionHandler.java:137) at org.xwiki.extension.handler.internal.DefaultExtensionHandlerManager.install(DefaultExtensionHandlerManager.java:80) at org.xwiki.extension.job.internal.AbstractExtensionJob.installExtension(AbstractExtensionJob.java:149) at org.xwiki.extension.job.internal.AbstractExtensionJob.applyAction(AbstractExtensionJob.java:106) at org.xwiki.extension.job.internal.InstallJob.start(InstallJob.java:135) at org.xwiki.job.AbstractJob.start(AbstractJob.java:134) at org.xwiki.job.internal.DefaultJobManager.run(DefaultJobManager.java:156) at java.lang.Thread.run(Thread.java:679) Caused by: class org.hibernate.PropertyAccessException: Exception occurred inside setter of com.xpn.xwiki.doc.XWikiAttachment.author at org.hibernate.property.BasicPropertyAccessor$BasicSetter.set(BasicPropertyAccessor.java:89) at org.hibernate.tuple.entity.AbstractEntityTuplizer.setPropertyValues(AbstractEntityTuplizer.java:583) at org.hibernate.tuple.entity.PojoEntityTuplizer.setPropertyValues(PojoEntityTuplizer.java:229) at org.hibernate.persister.entity.AbstractEntityPersister.setPropertyValues(AbstractEntityPersister.java:3847) at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:152) at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:982) at org.hibernate.loader.Loader.doQuery(Loader.java:857) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274) at org.hibernate.loader.Loader.doList(Loader.java:2542) at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276) at org.hibernate.loader.Loader.list(Loader.java:2271) at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:459) at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:365) at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1268) at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102) at com.xpn.xwiki.store.XWikiHibernateStore.loadAttachmentList(XWikiHibernateStore.java:1446) at com.xpn.xwiki.store.XWikiHibernateStore.loadXWikiDoc(XWikiHibernateStore.java:756) at com.xpn.xwiki.store.XWikiCacheStore.loadXWikiDoc(XWikiCacheStore.java:290) at com.xpn.xwiki.XWiki.getDocument(XWiki.java:1404) at com.xpn.xwiki.XWiki.getDocument(XWiki.java:1447) at org.xwiki.extension.xar.internal.handler.packager.xml.DocumentImporterHandler.getDatabaseDocument(DocumentImporterHandler.java:284) at org.xwiki.extension.xar.internal.handler.packager.xml.DocumentImporterHandler.saveDocument(DocumentImporterHandler.java:202) at org.xwiki.extension.xar.internal.handler.packager.xml.DocumentImporterHandler.endHandlerElement(DocumentImporterHandler.java:378) at org.xwiki.extension.xar.internal.handler.packager.xml.AbstractHandler.endElement(AbstractHandler.java:163) at org.xwiki.extension.xar.internal.handler.packager.xml.AbstractHandler.endElement(AbstractHandler.java:155) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at org.xwiki.extension.xar.internal.handler.packager.DefaultPackager.parseDocument(DefaultPackager.java:327) at org.xwiki.extension.xar.internal.handler.packager.DefaultPackager.importXARToWiki(DefaultPackager.java:165) at org.xwiki.extension.xar.internal.handler.packager.DefaultPackager.importXARToWiki(DefaultPackager.java:135) at org.xwiki.extension.xar.internal.handler.packager.DefaultPackager.importXAR(DefaultPackager.java:126) at org.xwiki.extension.xar.internal.handler.XarExtensionHandler.install(XarExtensionHandler.java:202) at org.xwiki.extension.xar.internal.handler.XarExtensionHandler.install(XarExtensionHandler.java:137) at org.xwiki.extension.handler.internal.DefaultExtensionHandlerManager.install(DefaultExtensionHandlerManager.java:80) at org.xwiki.extension.job.internal.AbstractExtensionJob.installExtension(AbstractExtensionJob.java:149) at org.xwiki.extension.job.internal.AbstractExtensionJob.applyAction(AbstractExtensionJob.java:106) at org.xwiki.extension.job.internal.InstallJob.start(InstallJob.java:135) at org.xwiki.job.AbstractJob.start(AbstractJob.java:134) at org.xwiki.job.internal.DefaultJobManager.run(DefaultJobManager.java:156) at java.lang.Thread.run(Thread.java:679) Caused by: $throwable.class: null {code} * documents I get conflicts are: ** Panels.PanelsWizard.xml ** Panels.SyntaxHelp.xml ** XWiki.WatchListMessage.xml ** Stats.Style.xml ** XWiki.SearchAdmin.xml ** XWiki.SearchSuggestConfig.xml ** Blog.Categories.xml ** XWiki.OfficeImporterAdmin.xml ** AnnotationCode.AnnotaionConfig.xml ** AnnotationCode.Style.xml ** Invitation.WebHome.xml ** XWiki.AddeExtensions.xml ** and MORE Steps to reproduce II * start the wiki, but CANCEL the distribution wizard * import manually the 4.2 ui-all XAR using the old way. * you won't see errors, but the outcome is the same (empty Applications Panel) It seems that the Distribution Wizard revealed maybe some issues we had but didn't see them because old import doesn't display these information. So this is not caused by the Distribution Manager. I am sure this breaks a lot of stuff, but the most visible thing is the Application panel which is empty. Images attached, full server stacktrace attached

    XWiki.org JIRA | 4 years ago | Sorin Burjan
    org.xml.sax.SAXException: Failed to save document at org.xwiki.extension.xar.internal.handler.packager.xml.DocumentImporterHandler.saveDocument(DocumentImporterHandler.java:275)
  2. 0

    Using SAX with schemas from multiple namespaces!

    Oracle Community | 1 decade ago | 843834
    org.xml.sax.SAXException: Error: URI=file:/D:/temp/TLSML/t/tlsml3.xml Line=4: schema_reference.4: Failed to read schema document 'xenc-schema.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
  3. 0

    Using SAX with schemas from multiple namespaces!

    Oracle Community | 1 decade ago | 843834
    org.xml.sax.SAXException: Error: URI=file:/D:/temp/working/tlsml3.xml Line=4: schema_reference.4: Failed to read schema document 'http://my.domain.com/docs/TLSML file:///D:/temp/working/TLSML.xsd http://www.w3.org/2000/09/xmldsig# file:///D:/temp/working/xmldsig-core-schema.xsd http://www.w3.org/2001/04/xmlenc# file:///D:/temp/working/xenc-schema.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    ksoap - request response object mapping

    Stack Overflow | 2 years ago
    org.xml.sax.SAXException: Unable to un-marshall between the XML Document and JAXB Objects. See server logs for more details. null' faultactor: 'null' detail: org.kxml2.kdom.Node@6782a9
  6. 0

    2.5.4 SAXException

    Google Groups | 1 decade ago | MarkSwanson
    org.xml.sax.SAXException: DOM input must be an entire Document

    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.SAXException

      Failed to save document at org.xwiki.extension.xar.internal.handler.packager.xml.DocumentImporterHandler.saveDocument(DocumentImporterHandler.java:275)

      at org.xwiki.extension.xar.internal.handler.packager.xml.DocumentImporterHandler.endHandlerElement()
    2. org.xwiki.extension
      AbstractHandler.endElement
      1. org.xwiki.extension.xar.internal.handler.packager.xml.DocumentImporterHandler.endHandlerElement(DocumentImporterHandler.java:378)
      2. org.xwiki.extension.xar.internal.handler.packager.xml.AbstractHandler.endElement(AbstractHandler.java:163)
      3. org.xwiki.extension.xar.internal.handler.packager.xml.AbstractHandler.endElement(AbstractHandler.java:155)
      3 frames
    3. Xerces2-j
      SAXParserImpl$JAXPSAXParser.parse
      1. org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
      2. org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
      3. org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
      4. org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
      5. org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      6. org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      7. org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
      8. org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
      9. org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
      9 frames
    4. org.xwiki.extension
      InstallJob.start
      1. org.xwiki.extension.xar.internal.handler.packager.DefaultPackager.parseDocument(DefaultPackager.java:327)
      2. org.xwiki.extension.xar.internal.handler.packager.DefaultPackager.importXARToWiki(DefaultPackager.java:165)
      3. org.xwiki.extension.xar.internal.handler.packager.DefaultPackager.importXARToWiki(DefaultPackager.java:135)
      4. org.xwiki.extension.xar.internal.handler.packager.DefaultPackager.importXAR(DefaultPackager.java:126)
      5. org.xwiki.extension.xar.internal.handler.XarExtensionHandler.install(XarExtensionHandler.java:202)
      6. org.xwiki.extension.xar.internal.handler.XarExtensionHandler.install(XarExtensionHandler.java:137)
      7. org.xwiki.extension.handler.internal.DefaultExtensionHandlerManager.install(DefaultExtensionHandlerManager.java:80)
      8. org.xwiki.extension.job.internal.AbstractExtensionJob.installExtension(AbstractExtensionJob.java:149)
      9. org.xwiki.extension.job.internal.AbstractExtensionJob.applyAction(AbstractExtensionJob.java:106)
      10. org.xwiki.extension.job.internal.InstallJob.start(InstallJob.java:135)
      10 frames
    5. org.xwiki.job
      DefaultJobManager.run
      1. org.xwiki.job.AbstractJob.start(AbstractJob.java:134)
      2. org.xwiki.job.internal.DefaultJobManager.run(DefaultJobManager.java:156)
      2 frames
    6. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:679)
      1 frame