B4J Question B4JPackager11 with UCanAccess - java.lang.NoClassDefFoundError


Active Member
Licensed User
Longtime User
I have an app which uses UCanAccess. It runs fine through the IDE in Debug & Release modes but when running the packaged app (via run_debug.bat), it fails with:
Error: Unable to load main class test.test.test.main in module b4j
        java.lang.NoClassDefFoundError: javafx/application/Application

I've narrowed the problem right down to the additional jars required for UCanAccess, specifically the hsqldb-2.6.1.jar which is now included after the update (at my request, sorry!) in Nov last year - https://www.b4x.com/android/forum/threads/opening-ms-access-databases-mdb.107963/post-862370.

The attached project demonstrates the problem. A packaged app fails to run with the error above, but if you comment the line
#AdditionalJar: hsqldb-2.6.1
then the packaged app runs OK.

I note that the first comment from @Erel in the UCanAccess thread says
Instructions were updated based on a new version of the libraries that will work with B4JPackager11.

Note that you need to add several files to the Files folder.
Does something in the index_codes_***.txt files need updating to accommodate hsqldb-2.6.1.jar?


  • test.zip
    228.5 KB · Views: 157
Last edited:
I've uploaded a new package with an updated hsqldb-2.6.1.jar file. Please try it. It compiles / builds fine. I haven't tested it with an actual Access db.