B4J Question B4JPackager11 and B4XLocalizator error

janderkan

Well-Known Member
Licensed User
Longtime User
I am using the latest of both projects.
When I run B4XLocalizator everything works fine and the file strings.db is created.
I pack it using B4JPackager11.
Now B4XLocalizator creates 2 files, strings.db and strings.db-journal, and when I try to access it following error 'tabel data do not exist'

Using run_debug.bat i get the following error in command window:
B4X:
Diagnostic XML Bean debug log file created: C:\Users\Jan\AppData\Local\Temp\xmlbeandebug8607996363371867283.log
main._builddatabase (java line: -1)
java.lang.ClassCastException: class java.lang.ExceptionInInitializerError cannot be cast to class java.lang.Exception (java.lang.ExceptionInInitializerError and java.lang.Exception are in module java.base of loader 'bootstrap')
        at b4j/anywheresoftware.b4a.BA.setLastException(Unknown Source)
        at b4j/b4j.example.main._builddatabase(Unknown Source)
        at b4j/b4j.example.main._btnbuild_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)
 

janderkan

Well-Known Member
Licensed User
Longtime User
The error happens in BuildDatabase sub. Where is the code? Are you catching any error there? If so, remove the Try / Catch block and let it print the original error message.

I have not changed anything, so the code for B4XLocalizator is the one from here .
There are no error when I run the program, the error appears after I use B4JPackager11 to make it standalone.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…