B4J Question B4JPackager11 and B4XLocalizator error

Discussion in 'B4J Questions' started by janderkan, May 17, 2019.

  1. janderkan

    janderkan Active Member Licensed 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:
    Code:
    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)
     
  2. Erel

    Erel Administrator Staff Member Licensed 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.
     
  3. janderkan

    janderkan Active Member Licensed User

    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.
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    BuildDatabase is a sub in your code.
     
  5. janderkan

    janderkan Active Member Licensed User

    NO, BuildDatabase is a sub in Erels code, and it works fine.
    The problem only exists when I use B4JPackager11 to make a standalone program.
     
  6. Erel

    Erel Administrator Staff Member Licensed User

    Can you post its code?
     
  7. janderkan

    janderkan Active Member Licensed User

Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice