JAXB crashes on JAVA 8
See original GitHub issueDescribe the bug
JAXB crashes with a NullPointerException after the introduction of jakarta bundles in commit 90794b1b.
To Reproduce Steps to reproduce the behavior:
- use this snippet:
JAXBContext jaxbContext = JAXBContext.newInstance(MyPojo.class);
- JAXB crashes with the following stack:
java.lang.NullPointerException
at javax.xml.bind.ContextFinder.handleClassCastException(ContextFinder.java:114)
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:254)
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:240)
at javax.xml.bind.ContextFinder.find(ContextFinder.java:375)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:691)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:632)
...
Expected behavior In the previous commit, no crash happens.
Target Environment (please complete the following information): Tested with OpenJDK 1.8.0_302
openjdk version "1.8.0_302"
OpenJDK Runtime Environment (Zulu 8.56.0.21-CA-linux64) (build 1.8.0_302-b08)
OpenJDK 64-Bit Server VM (Zulu 8.56.0.21-CA-linux64) (build 25.302-b08, mixed mode)
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:8 (4 by maintainers)
Top Results From Across the Web
JAXB unmarshalling using Java crashes Oracle
Hi, I have loaded JAXB generated classes for xml schema into Oracle 11g2. When I tried to parse .xml using the classes (creating...
Read more >Error unmarshalling xml in java-8 "secure-processing org.xml ...
Here xercesImpl causes the unmarshaller to use some other sax parser (instead of the regular jaxb parser) causing it to throw different exception...
Read more >JAXB xjc crashes while parsing trivial 8-line XSD file ... - GitHub
The problem occurs when trying to run xjc (ver. 2.2.4) on C.xsd when both a catalog and a binding file is used (even...
Read more >Generate Java Code From Xml Schema Using JAXB crashes
When I try to generate java classes from an xml schema nothing happens and I get the following error in intellij's log: 2017-03-21...
Read more >'java.lang.LinkageError JAXB 2.0 API is being loaded from the ...
For the first cause: Upgrade the JDK past 1.6.0_4, eg. JVM 6 Update 17. Do not upgrade to JVM 6 Update 18 or...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

hi @MMaiero,
I confirm that this solved the problem.
Thank you.
Hi @robertodamiani I have created PR #3692. Could you please check if this solves your issue?
Thanks.