B4J Question [SOLVED] JPoi and integrated package builder

Peter Lewis

Active Member
Licensed User
Longtime User
I all I have written a program that imports a Spreadsheet file.

I have tested it on my Development machine and works perfectly, I then use the NEW integrated package builder and then then trying to use it it crashes.



I did see a line that pointed to a log but that is not all. The log is below. Any ideas would be appreciated . Thank you

XML-BEANS compiled schema: Could not locate compiled schema resource schemaorg_apache_xmlbeans/system/sD023D6490046BA0250A839A9AD24C443/index.xsb (schemaorg_apache_xmlbeans.system.sD023D6490046BA0250A839A9AD24C443.index) - code 0
org.apache.xmlbeans.SchemaTypeLoaderException: XML-BEANS compiled schema: Could not locate compiled schema resource schemaorg_apache_xmlbeans/system/sD023D6490046BA0250A839A9AD24C443/index.xsb (schemaorg_apache_xmlbeans.system.sD023D6490046BA0250A839A9AD24C443.index) - code 0
at b4j/org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl$XsbReader.<init>(Unknown Source)
at b4j/org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.initFromHeader(Unknown Source)
at b4j/org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.<init>(Unknown Source)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source)
at b4j/schemaorg_apache_xmlbeans.system.sD023D6490046BA0250A839A9AD24C443.TypeSystemHolder.loadTypeSystem(Unknown Source)
at b4j/schemaorg_apache_xmlbeans.system.sD023D6490046BA0250A839A9AD24C443.TypeSystemHolder.<clinit>(Unknown Source)
at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized0(Native Method)
at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized(Unknown Source)
at java.base/jdk.internal.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(Unknown Source)
at java.base/jdk.internal.reflect.ReflectionFactory.newFieldAccessor(Unknown Source)
at java.base/java.lang.reflect.Field.acquireFieldAccessor(Unknown Source)
at java.base/java.lang.reflect.Field.getFieldAccessor(Unknown Source)
at java.base/java.lang.reflect.Field.get(Unknown Source)
at b4j/org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(Unknown Source)
at b4j/org.openxmlformats.schemas.spreadsheetml.x2006.main.CTWorkbook.<clinit>(Unknown Source)
at b4j/org.openxmlformats.schemas.spreadsheetml.x2006.main.CTWorkbook$Factory.newInstance(Unknown Source)
at b4j/org.apache.poi.xssf.usermodel.XSSFWorkbook.onWorkbookCreate(Unknown Source)
at b4j/org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(Unknown Source)
at b4j/org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(Unknown Source)
at b4j/org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(Unknown Source)
at b4j/org.apache.poi.xssf.streaming.SXSSFWorkbook.<init>(Unknown Source)
at b4j/org.apache.poi.xssf.streaming.SXSSFWorkbook.<init>(Unknown Source)
at b4j/org.apache.poi.xssf.streaming.SXSSFWorkbook.<init>(Unknown Source)
at b4j/org.apache.poi.xssf.streaming.SXSSFWorkbook.<init>(Unknown Source)
at b4j/org.apache.poi.xssf.streaming.SXSSFWorkbook.<init>(Unknown Source)
at b4j/anywheresoftware.b4j.objects.PoiWorkbookWrapper.InitializeNew(Unknown Source)
at b4j/b4j.bettingprg.main._btnloadprofile_click(Unknown Source)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at b4j/anywheresoftware.b4a.BA.raiseEvent2(Unknown Source)
at b4j/anywheresoftware.b4a.BA$1.run(Unknown Source)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(Unknown Source)
at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)
at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)





Diagnostic XML Bean debug log file created: C:\Users\SUPERC~1\AppData\Local\Temp\xmlbeandebug13017992925777455049.log
main._btnloadprofile_click (java line: -1)
java.lang.ExceptionInInitializerError
at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized0(Native Method)
at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized(Unknown Source)
at java.base/jdk.internal.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(Unknown Source)
at java.base/jdk.internal.reflect.ReflectionFactory.newFieldAccessor(Unknown Source)
at java.base/java.lang.reflect.Field.acquireFieldAccessor(Unknown Source)
at java.base/java.lang.reflect.Field.getFieldAccessor(Unknown Source)
at java.base/java.lang.reflect.Field.get(Unknown Source)
at b4j/org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(Unknown Source)
at b4j/org.openxmlformats.schemas.spreadsheetml.x2006.main.CTWorkbook.<clinit>(Unknown Source)
at b4j/org.openxmlformats.schemas.spreadsheetml.x2006.main.CTWorkbook$Factory.newInstance(Unknown Source)
at b4j/org.apache.poi.xssf.usermodel.XSSFWorkbook.onWorkbookCreate(Unknown Source)
at b4j/org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(Unknown Source)
at b4j/org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(Unknown Source)
at b4j/org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(Unknown Source)
at b4j/org.apache.poi.xssf.streaming.SXSSFWorkbook.<init>(Unknown Source)
at b4j/org.apache.poi.xssf.streaming.SXSSFWorkbook.<init>(Unknown Source)
at b4j/org.apache.poi.xssf.streaming.SXSSFWorkbook.<init>(Unknown Source)
at b4j/org.apache.poi.xssf.streaming.SXSSFWorkbook.<init>(Unknown Source)
at b4j/org.apache.poi.xssf.streaming.SXSSFWorkbook.<init>(Unknown Source)
at b4j/anywheresoftware.b4j.objects.PoiWorkbookWrapper.InitializeNew(Unknown Source)
at b4j/b4j.bettingprg.main._btnloadprofile_click(Unknown Source)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at b4j/anywheresoftware.b4a.BA.raiseEvent2(Unknown Source)
at b4j/anywheresoftware.b4a.BA$1.run(Unknown Source)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(Unknown Source)
at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)
at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: Could not instantiate SchemaTypeSystemImpl (java.lang.reflect.InvocationTargetException): is the version of xbean.jar correct?
at b4j/schemaorg_apache_xmlbeans.system.sD023D6490046BA0250A839A9AD24C443.TypeSystemHolder.loadTypeSystem(Unknown Source)
at b4j/schemaorg_apache_xmlbeans.system.sD023D6490046BA0250A839A9AD24C443.TypeSystemHolder.<clinit>(Unknown Source)
... 34 more
Caused by: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source)
... 36 more
Caused by: org.apache.xmlbeans.SchemaTypeLoaderException: XML-BEANS compiled schema: Could not locate compiled schema resource schemaorg_apache_xmlbeans/system/sD023D6490046BA0250A839A9AD24C443/index.xsb (schemaorg_apache_xmlbeans.system.sD023D6490046BA0250A839A9AD24C443.index) - code 0
at b4j/org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl$XsbReader.<init>(Unknown Source)
at b4j/org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.initFromHeader(Unknown Source)
at b4j/org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.<init>(Unknown Source)
... 40 more


R:\source Code\press screen\Objects\temp\build\bin>pause
Press any key to continue . . .
 

Attachments

  • 1592154205301.png
    1592154205301.png
    134.1 KB · Views: 181

EnriqueGonzalez

Well-Known Member
Licensed User
Longtime User
I have tested it on my Development machine and works perfectly, I then use the NEW integrated package builder and then then trying to use it it crashes.
Make sure you are running the same JDK on both machines / intances. Usually JDK 8 is installed and you are compiling in JDK 11

another one is make sure you have mergelibraries in your project properties.
B4X:
    #MergeLibraries: True
 
Upvote 0
Top