Philip Chatzigeorgiadis Active Member Licensed User Longtime User May 5, 2020 #1 My App runs fine from the IDE. After packing with B4JPackager 11, i get this error, which seems related to xstream library. B4X: D:\ALLDOCS\JAVAPROGRAMS\JAVA11PACKBUILDS\BOXGRAPHICS\bin>java.exe @release_java_modules.txt -m b4j/b4j.example.main showreport._repshow (java line: -1) java.lang.ExceptionInInitializerError: Cannot access defaults field of Properties at b4j/com.thoughtworks.xstream.converters.collections.PropertiesConverter.<clinit>(Unknown Source) at b4j/com.thoughtworks.xstream.XStream.setupConverters(Unknown Source) at b4j/com.thoughtworks.xstream.XStream.<init>(Unknown Source) at b4j/com.thoughtworks.xstream.XStream.<init>(Unknown Source) at b4j/com.thoughtworks.xstream.XStream.<init>(Unknown Source) at b4j/ro.nextreports.engine.XStreamFactory.createXStream(Unknown Source) at b4j/ro.nextreports.engine.util.ReportUtil.loadReport(Unknown Source) at b4j/ro.nextreports.integration.ReportSupport.loadReport(Unknown Source) at b4j/ro.nextreports.integration.ReportExec.reportPrepAndRun(Unknown Source) at b4j/b4j.example.showreport._repshow(Unknown Source) at b4j/b4j.example.main._btnpallets_action(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) I found this suggestion (about adding this: permission java.lang.reflect.ReflectPermission "suppressAccessChecks"; ) in a rather old thread here: User - ExceptionInInitializerError: Cannot access defaults field of Properties ExceptionInInitializerError: Cannot access defaults field of Properties. Hello All, I'm having a problem using XStream in my Lotus environment (but this shouldn't matter). I'm developing an app.... xstream.10960.n7.nabble.com but I have no idea how I could implement and test it. Last edited: May 6, 2020
My App runs fine from the IDE. After packing with B4JPackager 11, i get this error, which seems related to xstream library. B4X: D:\ALLDOCS\JAVAPROGRAMS\JAVA11PACKBUILDS\BOXGRAPHICS\bin>java.exe @release_java_modules.txt -m b4j/b4j.example.main showreport._repshow (java line: -1) java.lang.ExceptionInInitializerError: Cannot access defaults field of Properties at b4j/com.thoughtworks.xstream.converters.collections.PropertiesConverter.<clinit>(Unknown Source) at b4j/com.thoughtworks.xstream.XStream.setupConverters(Unknown Source) at b4j/com.thoughtworks.xstream.XStream.<init>(Unknown Source) at b4j/com.thoughtworks.xstream.XStream.<init>(Unknown Source) at b4j/com.thoughtworks.xstream.XStream.<init>(Unknown Source) at b4j/ro.nextreports.engine.XStreamFactory.createXStream(Unknown Source) at b4j/ro.nextreports.engine.util.ReportUtil.loadReport(Unknown Source) at b4j/ro.nextreports.integration.ReportSupport.loadReport(Unknown Source) at b4j/ro.nextreports.integration.ReportExec.reportPrepAndRun(Unknown Source) at b4j/b4j.example.showreport._repshow(Unknown Source) at b4j/b4j.example.main._btnpallets_action(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) I found this suggestion (about adding this: permission java.lang.reflect.ReflectPermission "suppressAccessChecks"; ) in a rather old thread here: User - ExceptionInInitializerError: Cannot access defaults field of Properties ExceptionInInitializerError: Cannot access defaults field of Properties. Hello All, I'm having a problem using XStream in my Lotus environment (but this shouldn't matter). I'm developing an app.... xstream.10960.n7.nabble.com but I have no idea how I could implement and test it.
Erel B4X founder Staff member Licensed User Longtime User May 6, 2020 #2 Looks like a problematic library. What do you need it for? The solution in that link will not help with newer versions of Java. Upvote 0
Looks like a problematic library. What do you need it for? The solution in that link will not help with newer versions of Java.
Philip Chatzigeorgiadis Active Member Licensed User Longtime User May 6, 2020 #3 Erel said: Looks like a problematic library. What do you need it for? The solution in that link will not help with newer versions of Java. Click to expand... The xstream library is used by the nextreports-engine library, which is the basis for the B4JNextreports library. It has been working fine with Java 8. It still works fine with OpenJDK11 for non-UI applications and UI applcations running from the B4J IDE. The problem only appears after packing a UI app with B4JPackager11. I tried visiting the Next-Reports support forum to see if any similar problem has been reported, but the forum has been discontinued. Upvote 0
Erel said: Looks like a problematic library. What do you need it for? The solution in that link will not help with newer versions of Java. Click to expand... The xstream library is used by the nextreports-engine library, which is the basis for the B4JNextreports library. It has been working fine with Java 8. It still works fine with OpenJDK11 for non-UI applications and UI applcations running from the B4J IDE. The problem only appears after packing a UI app with B4JPackager11. I tried visiting the Next-Reports support forum to see if any similar problem has been reported, but the forum has been discontinued.
Philip Chatzigeorgiadis Active Member Licensed User Longtime User May 9, 2020 #4 Erel said: Looks like a problematic library. What do you need it for? The solution in that link will not help with newer versions of Java. Click to expand... Erel, can you please confirm that no solution can be suggested? If so, I should start looking for alternative methods to create reports, instead of Next-Reports. Thanks. Upvote 0
Erel said: Looks like a problematic library. What do you need it for? The solution in that link will not help with newer versions of Java. Click to expand... Erel, can you please confirm that no solution can be suggested? If so, I should start looking for alternative methods to create reports, instead of Next-Reports. Thanks.
Erel B4X founder Staff member Licensed User Longtime User May 10, 2020 #5 You can continue to use Java 8. Currently I don't have other suggestions. Upvote 0