question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

JAXB crashes on JAVA 8

See original GitHub issue

Describe the bug JAXB crashes with a NullPointerException after the introduction of jakarta bundles in commit 90794b1b.

To Reproduce Steps to reproduce the behavior:

  1. use this snippet:
JAXBContext jaxbContext = JAXBContext.newInstance(MyPojo.class);
  1. 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:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
robertodamianicommented, Nov 26, 2021

hi @MMaiero,

I confirm that this solved the problem.

Thank you.

1reaction
MMaierocommented, Nov 25, 2021

Hi @robertodamiani I have created PR #3692. Could you please check if this solves your issue?

Thanks.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found