Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoClassDefFoundError was not logged, Jailer failed without showing reason #33

Closed
vsgfe opened this issue Sep 9, 2020 · 2 comments
Closed

Comments

@vsgfe
Copy link
Contributor

vsgfe commented Sep 9, 2020

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.

@Wisser Wisser closed this as completed in 25263fd Sep 9, 2020
@vsgfe
Copy link
Contributor Author

vsgfe commented Sep 9, 2020

wow, that was fast. Thank you!

@Wisser
Copy link
Owner

Wisser commented Sep 9, 2020

Many thanks for the suggestion.

@Wisser Wisser reopened this Sep 9, 2020
@Wisser Wisser closed this as completed Sep 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants