Wisser / Jailer

Database Subsetting and Relational Data Browsing Tool.

Home Page:https://wisser.github.io/Jailer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NoClassDefFoundError was not logged, Jailer failed without showing reason

vsgfe opened this issue · comments

commented

Description of the Issue

The execution environment was upgraded to JDK11. Jailer failed but no reason was stated in the logs or console output.
The reason was a NoClassDefFoundError caused by missing Jaxb.
This issue is not about the missing Jaxb, but for the missing logging of the Exception. It took some effort to get to the bottom of the problem.

Since it is an Error it slipped through the catch(Exception) in Jailer.jailerMain. The subsequent catch(Throwable) in Jailer.main does not log it, because it assumes exceptions were already logged.

The missing stacktrace:

java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
        at net.sf.jailer.datamodel.PrimaryKeyFactory.createPrimaryKey(PrimaryKeyFactory.java:85)
        at net.sf.jailer.datamodel.DataModel.<init>(DataModel.java:429)
        at net.sf.jailer.datamodel.DataModel.<init>(DataModel.java:324)
        at net.sf.jailer.extractionmodel.ExtractionModel.<init>(ExtractionModel.java:200)
        at net.sf.jailer.datamodel.PrimaryKeyFactory.createUPKScope(PrimaryKeyFactory.java:191)
        at net.sf.jailer.Jailer.jailerMain(Jailer.java:211)
        at net.sf.jailer.Jailer.main(Jailer.java:120)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBException
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
        ... 7 more

Expected Behavior

The stacktrace of the error should be logged.

commented

wow, that was fast. Thank you!

Many thanks for the suggestion.