Using POI without base xmlbeans schemas not working #135
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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)