Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using POI without base xmlbeans schemas not working #135

Merged
merged 2 commits into from Apr 19, 2019

Conversation

aramashkan
Copy link
Contributor

During POI's *.xsb parsing xmlbeans can't find base schemas because of using POI's classloader. That's causing exception's like below. xmlbeans bundle should export common schemas.

Caused by: org.apache.xmlbeans.SchemaTypeLoaderException: Cannot resolve type for handle _XY_Q=space|R=space@http://www.w3.org/XML/1998/namespace (schemaorg_apache_xmlbeans.system.sD023D6490046BA0250A839A9AD24C443.cttext7f5btype) - code 13 at org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl$XsbReader.readHandle(SchemaTypeSystemImpl.java:2025) at org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl$XsbReader.readTypeRef(SchemaTypeSystemImpl.java:2099) at org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl$XsbReader.loadAttribute(SchemaTypeSystemImpl.java:2926) at org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl$XsbReader.readAttributeData(SchemaTypeSystemImpl.java:2918) at org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl$XsbReader.finishLoadingType(SchemaTypeSystemImpl.java:2535) at org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.resolveHandle(SchemaTypeSystemImpl.java:3511) at org.apache.xmlbeans.SchemaComponent$Ref.getComponent(SchemaComponent.java:113) at org.apache.xmlbeans.SchemaType$Ref.get(SchemaType.java:872) at org.apache.xmlbeans.impl.schema.SchemaPropertyImpl.getType(SchemaPropertyImpl.java:92) at org.apache.xmlbeans.impl.schema.SchemaTypeImpl.createElementType(SchemaTypeImpl.java:995) at org.apache.xmlbeans.impl.values.XmlObjectBase.create_element_user(XmlObjectBase.java:938) at org.apache.xmlbeans.impl.store.Xobj.getUser(Xobj.java:1675) at org.apache.xmlbeans.impl.store.Cur.getUser(Cur.java:2659) at org.apache.xmlbeans.impl.store.Cur.getObject(Cur.java:2652) at org.apache.xmlbeans.impl.store.Cursor._getObject(Cursor.java:995) at org.apache.xmlbeans.impl.store.Cursor.getObject(Cursor.java:2904) at org.apache.poi.xwpf.usermodel.XWPFParagraph.<init>(XWPFParagraph.java:75) at org.apache.poi.xwpf.usermodel.XWPFDocument.onDocumentRead(XWPFDocument.java:194) at org.apache.poi.ooxml.POIXMLDocument.load(POIXMLDocument.java:184) at org.apache.poi.xwpf.usermodel.XWPFDocument.<init>(XWPFDocument.java:144)

@jbonofre jbonofre self-requested a review April 12, 2019 11:33
Copy link
Member

@jbonofre jbonofre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. I will add the bundles in the next release cycle.

@jbonofre jbonofre merged commit 149d9fa into apache:master Apr 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants