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

Implementation of JAXB-API has not been found on module path or classpath. #2930

Closed
Majstr opened this issue Aug 12, 2021 · 3 comments
Closed

Comments

@Majstr
Copy link

Majstr commented Aug 12, 2021

Hi,

I am using Spring Boot with Ehcache 3 and Maven. After upgrading Ehcache to 3.9.3 (or later) I am getting this error:

Caused by: javax.xml.bind.JAXBException: Implementation of JAXB-API has not been found on module path or classpath.
	at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:232)
	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)
	at org.ehcache.xml.ConfigurationParser.<init>(ConfigurationParser.java:130)
	at org.ehcache.xml.XmlConfiguration.<init>(XmlConfiguration.java:114)
	... 101 common frames omitted

I checked maven dependencies and in version 3.9.3 and on the org.glashfish.jaxb is missing.

@chrisdennis
Copy link
Member

chrisdennis commented Aug 12, 2021 via email

@Majstr
Copy link
Author

Majstr commented Aug 12, 2021

So I added this to my dependecies:

<dependency>
	<groupId>org.glassfish.jaxb</groupId>
	<artifactId>jaxb-runtime</artifactId>
	<version>3.0.2</version>
</dependency>

Same error.

@chrisdennis
Copy link
Member

The version range expression in the provided dependency: [2.2,3) means: greater than or equal to 2.2 but less than 3. 3.0.2 is greater than 3. Version 3+ of JAXB uses the new jakarta.xml.bind namespace so cannot trivially be supported alongside the existing java.xml.bind namespace.

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