Maybe this only works if namespace-prefix handling is enabled on the XMLReader 
- the thing that doesn't work on Android 
(https://issues.apache.org/jira/browse/XMLBEANS-597).

Could you try this test in a non-android env where XMLBeans doesn't enable 
namespace-prefix feature? This might cause it to fail in same way as on android 
env.






On Tuesday 8 February 2022, 22:32:26 GMT+1, Dominik Stadler 
<dominik.stad...@gmx.at> wrote: 





Hi,

when I try to update Apache POI from 4.1.2 to 5.2.0 in the sample-project
that provides Apache POI for Android Apps (
https://github.com/centic9/poi-on-android ), I get a very strange exception.

It seems that some of the resources are not found, although they are
present properly as far as I can tell. I think there were quite some
changes in that area between 4.1.2 and 5.2.0

Did any of the XMLBeans gurus encounter something like this or knows what
the reason could be?

Thanks... Dominik.

Stacktrace:

    Caused by: org.apache.xmlbeans.SchemaTypeLoaderException: Cannot
resolve type for handle _XY_Q=space|R=space@
http://www.w3.org/XML/1998/namespace
(org.apache.poi.schemas.ooxml.system.ooxml.cttext7f5btype) - code 13
        at
org.apache.xmlbeans.impl.schema.XsbReader.readHandle(XsbReader.java:483)
        at
org.apache.xmlbeans.impl.schema.XsbReader.readTypeRef(XsbReader.java:548)
        at
org.apache.xmlbeans.impl.schema.XsbReader.loadAttribute(XsbReader.java:1282)
        at
org.apache.xmlbeans.impl.schema.XsbReader.readAttributeData(XsbReader.java:1275)
        at
org.apache.xmlbeans.impl.schema.XsbReader.finishLoadingType(XsbReader.java:902)
        at
org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.resolveHandle(SchemaTypeSystemImpl.java:938)
        at
org.apache.xmlbeans.SchemaComponent$Ref.getComponent(SchemaComponent.java:113)
        at org.apache.xmlbeans.SchemaType$Ref.get(SchemaType.java:1072)
        at
org.apache.xmlbeans.impl.schema.SchemaPropertyImpl.getType(SchemaPropertyImpl.java:85)
        at
org.apache.xmlbeans.impl.schema.SchemaTypeImpl.createElementType(SchemaTypeImpl.java:990)
        at
org.apache.xmlbeans.impl.values.XmlObjectBase.create_element_user(XmlObjectBase.java:914)
        at org.apache.xmlbeans.impl.store.Xobj.getUser(Xobj.java:1597)
        at org.apache.xmlbeans.impl.store.Cur.getUser(Cur.java:2571)
        at org.apache.xmlbeans.impl.store.Cur.getObject(Cur.java:2565)
        at org.apache.xmlbeans.impl.store.Cursor._getObject(Cursor.java:817)
        at
org.apache.xmlbeans.impl.store.Cursor$$ExternalSyntheticLambda64.get(Unknown
Source:2)
        at
org.apache.xmlbeans.impl.store.Cursor.syncWrapHelper(Cursor.java:2520)
        at org.apache.xmlbeans.impl.store.Cursor.syncWrap(Cursor.java:2451)
        at org.apache.xmlbeans.impl.store.Cursor.getObject(Cursor.java:2078)
        at
org.apache.poi.xwpf.usermodel.XWPFParagraph.<init>(XWPFParagraph.java:79)
        at
org.apache.poi.xwpf.usermodel.XWPFDocument.onDocumentRead(XWPFDocument.java:214)
        at org.apache.poi.ooxml.POIXMLDocument.load(POIXMLDocument.java:169)
        at
org.apache.poi.xwpf.usermodel.XWPFDocument.<init>(XWPFDocument.java:159)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org

Reply via email to