When I open a xlsx file i got the following stack trace.
- Code: Select all
2019-06-12 09:21:56,924 INFO [org.docx4j.jaxb.Context] (main) java.vendor=Oracle Corporation
2019-06-12 09:21:56,924 INFO [org.docx4j.jaxb.Context] (main) java.version=1.8.0_212
2019-06-12 09:21:57,173 INFO [org.docx4j.jaxb.Context] (main) MOXy JAXB implementation intended..
2019-06-12 09:22:02,617 INFO [org.docx4j.jaxb.Context] (main) MOXy JAXB implementation is in use!
2019-06-12 09:22:02,932 INFO [org.docx4j.XmlUtils] (main) setProperty com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl
2019-06-12 09:22:02,933 INFO [org.docx4j.XmlUtils] (main) actual: com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl
2019-06-12 09:22:02,933 INFO [org.docx4j.XmlUtils] (main) setProperty com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
2019-06-12 09:22:02,933 INFO [org.docx4j.XmlUtils] (main) actual: com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
2019-06-12 09:22:02,956 INFO [org.docx4j.openpackaging.contenttype.ContentTypeManager] (main) Detected SpreadhseetMLPackage package
2019-06-12 09:22:02,961 INFO [org.docx4j.openpackaging.contenttype.ContentTypeManager] (main) Detected SpreadhseetMLPackage package
2019-06-12 09:22:02,962 INFO [org.docx4j.openpackaging.io3.Load3] (main) Instantiated package of type org.docx4j.openpackaging.packages.SpreadsheetMLPackage
2019-06-12 09:22:02,969 INFO [org.docx4j.utils.XPathFactoryUtil] (main) xpath implementation: org.apache.xpath.jaxp.XPathFactoryImpl
2019-06-12 09:22:02,975 INFO [org.docx4j.openpackaging.packages.SpreadsheetMLPackage] (main) Set shortcut for docPropsExtendedPart
2019-06-12 09:22:02,976 INFO [org.docx4j.openpackaging.packages.SpreadsheetMLPackage] (main) Set shortcut for docPropsCorePart
2019-06-12 09:22:02,985 INFO [org.xlsx4j.jaxb.Context] (main) java.vendor=Oracle Corporation
2019-06-12 09:22:02,985 INFO [org.xlsx4j.jaxb.Context] (main) java.version=1.8.0_212
2019-06-12 09:22:03,040 INFO [org.docx4j.jaxb.NamespacePrefixMapperUtils] (main) Using MOXy NamespacePrefixMapper
2019-06-12 09:22:03,045 INFO [org.xlsx4j.jaxb.Context] (main) MOXy JAXB implementation intended..
2019-06-12 09:22:03,942 INFO [org.xlsx4j.jaxb.Context] (main) MOXy JAXB implementation is in use!
2019-06-12 09:22:03,943 INFO [org.docx4j.openpackaging.packages.SpreadsheetMLPackage] (main) Set shortcut for WorkbookPart
2019-06-12 09:22:03,952 INFO [org.docx4j.openpackaging.io3.Load3] (main) package read; elapsed time: 7069 ms
2019-06-12 09:22:03,983 WARN [org.docx4j.jaxb.JaxbValidationEventHandler] (main) [ERROR] : unexpected element (uri:"http://schemas.openxmlformats.org/markup-compatibility/2006", local:"AlternateContent"). Expect
2019-06-12 09:22:03,984 WARN [org.docx4j.jaxb.JaxbValidationEventHandler] (main) Column is 530 at line number 2
2019-06-12 09:22:03,986 INFO [org.docx4j.jaxb.JaxbValidationEventHandler] (main) shouldContinue is set to false
2019-06-12 09:22:04,003 WARN [org.docx4j.openpackaging.parts.JaxbXmlPartXPathAware] (main)
Exception Description: An error occurred unmarshalling the document
Internal Exception: org.xml.sax.SAXParseException; lineNumber: 2; columnNumber: 530; unexpected element (uri:"http://schemas.openxmlformats.org/markup-compatibility/2006", local:"AlternateContent"). Expected elements are <{http://schemas.openxmlformats.org/spreadsheetml/2006/main}fileVersion>,<{http://schemas.openxmlformats.org/spreadsheetml/2006/main}fileSharing>,<{http://schemas.openxmlformats.org/spreadsheetml/2006/main}workbookPr>,<{http://schemas.openxmlformats.org/spreadsheetml/2006/main}workbookProtection>,<{http://schemas.openxmlformats.org/spreadsheetml/2006/main}bookViews>,<{http://schemas.openxmlformats.org/spreadsheetml/2006/main}sheets>,<{http://schemas.openxmlformats.org/spreadsheetml/2006/main}functionGroups>,<{http://schemas.openxmlformats.org/spreadsheetml/2006/main}externalReferences>,<{http://schemas.openxmlformats.org/spreadsheetml/2006/main}definedNames>,<{http://schemas.openxmlformats.org/spreadsheetml/2006/main}calcPr>,<{http://schemas.openxmlformats.org/spreadsheetml/2006/main}oleSize>,<{http://schemas.openxmlformats.org/spreadsheetml/2006/main}customWorkbookViews>,<{http://schemas.openxmlformats.org/spreadsheetml/2006/main}pivotCaches>,<{http://schemas.openxmlformats.org/spreadsheetml/2006/main}smartTagPr>,<{http://schemas.openxmlformats.org/spreadsheetml/2006/main}smartTagTypes>,<{http://schemas.openxmlformats.org/spreadsheetml/2006/main}webPublishing>,<{http://schemas.openxmlformats.org/spreadsheetml/2006/main}fileRecoveryPr>,<{http://schemas.openxmlformats.org/spreadsheetml/2006/main}webPublishObjects>,<{http://schemas.openxmlformats.org/spreadsheetml/2006/main}extLst>
2019-06-12 09:22:04,004 INFO [org.docx4j.openpackaging.parts.JaxbXmlPartXPathAware] (main) encountered unexpected content in /xl/workbook.xml; pre-processing
2019-06-12 09:22:04,016 WARN [org.docx4j.utils.ResourceUtils] (main) Couldn't get resource: custom-preprocessor.xslt
2019-06-12 09:22:04,017 WARN [org.docx4j.utils.ResourceUtils] (main) custom-preprocessor.xslt: custom-preprocessor.xslt not found via classloader.
2019-06-12 09:22:04,018 WARN [org.docx4j.utils.ResourceUtils] (main) Property docx4j.jaxb.JaxbValidationEventHandler resolved to missing resource custom-preprocessor.xslt; using org/docx4j/jaxb/mc-preprocessor.xslt
2019-06-12 09:22:04,388 INFO [org.docx4j.XmlUtils] (main) Using org.apache.xalan.transformer.TransformerImpl
2019-06-12 09:22:04,388 INFO [org.docx4j.XmlUtils] (main) Working around https://issues.apache.org/jira/browse/XALANJ-2419
method: xml
2019-06-12 09:22:04,441 WARN [org.docx4j.utils.XSLTUtils] (main) Found some mc:AlternateContent
2019-06-12 09:22:04,444 WARN [org.docx4j.utils.XSLTUtils] (main) Missing mc:Fallback! Dropping the mc:AlternateContent entirely.
2019-06-12 09:22:12,803 INFO [org.docx4j.jaxb.NamespacePrefixMapperUtils] (main) Using MOXy NamespacePrefixMapper
2019-06-12 09:22:12,809 INFO [org.docx4j.openpackaging.parts.DocPropsExtendedPart] (main) unmarshalling org.docx4j.openpackaging.parts.DocPropsExtendedPart
2019-06-12 09:22:12,830 INFO [org.docx4j.openpackaging.parts.DocPropsCorePart] (main) unmarshalling org.docx4j.openpackaging.parts.DocPropsCorePart
This part:
2019-06-12 09:22:03,983 WARN [org.docx4j.jaxb.JaxbValidationEventHandler] (main) [ERROR] : unexpected element (uri:"http://schemas.openxmlformats.org/markup-compatibility/2006", local:"AlternateContent"). Expect
2019-06-12 09:22:03,984 WARN [org.docx4j.jaxb.JaxbValidationEventHandler] (main) Column is 530 at line number 2
2019-06-12 09:22:03,986 INFO [org.docx4j.jaxb.JaxbValidationEventHandler] (main) shouldContinue is set to false
looks strange to me!
I think the other wanrings after it may be a result of this problem.
I tried with different files.. always the same issue.
Btw: Column 530 does not exist in those files!!
kind regards
Lars