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

Error occurred by updating from 3.8.1 to 3.9.9 #2980

Closed
gogo-boot opened this issue Jan 4, 2022 · 1 comment
Closed

Error occurred by updating from 3.8.1 to 3.9.9 #2980

gogo-boot opened this issue Jan 4, 2022 · 1 comment

Comments

@gogo-boot
Copy link

gogo-boot commented Jan 4, 2022

Hello,

I just updated the Ehcache from 3.8.1 to 3.9.9. I just used the same ehcache.xml file and got following error. It seems, it has missing Jaxb library. I am using the OpenJDK 15.

Caused by: org.ehcache.xml.exceptions.XmlConfigurationException: Error parsing XML configuration at file:/builds/streckenkunde40/videoaufnahmen/authorization/authorization-service/target/classes/ehcache.xml
at org.ehcache.xml.XmlConfiguration.(XmlConfiguration.java:124) ~[ehcache-3.9.9.jar:3.9.9]
at org.ehcache.xml.XmlConfiguration.(XmlConfiguration.java:90) ~[ehcache-3.9.9.jar:3.9.9]
at org.ehcache.jsr107.EhcacheCachingProvider$ConfigSupplier.getConfiguration(EhcacheCachingProvider.java:328) ~[ehcache-3.9.9.jar:3.9.9]
... 108 common frames omitted
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) ~[jakarta.xml.bind-api-2.3.3.jar:2.3.3]
at javax.xml.bind.ContextFinder.find(ContextFinder.java:375) ~[jakarta.xml.bind-api-2.3.3.jar:2.3.3]
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:691) ~[jakarta.xml.bind-api-2.3.3.jar:2.3.3]
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:632) ~[jakarta.xml.bind-api-2.3.3.jar:2.3.3]
at org.ehcache.xml.ConfigurationParser.(ConfigurationParser.java:130) ~[ehcache-3.9.9.jar:3.9.9]
at org.ehcache.xml.XmlConfiguration.(XmlConfiguration.java:114) ~[ehcache-3.9.9.jar:3.9.9]
... 110 common frames omitted
Caused by: java.lang.ClassNotFoundException: com.sun.xml.bind.v2.ContextFactory
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581) ~[na:na]
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) ~[na:na]
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) ~[na:na]
at javax.xml.bind.ServiceLoaderUtil.nullSafeLoadClass(ServiceLoaderUtil.java:92) ~[jakarta.xml.bind-api-2.3.3.jar:2.3.3]
at javax.xml.bind.ServiceLoaderUtil.safeLoadClass(ServiceLoaderUtil.java:125) ~[jakarta.xml.bind-api-2.3.3.jar:2.3.3]
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:230) ~[jakarta.xml.bind-api-2.3.3.jar:2.3.3]
... 115 common frames omitted

@chrisdennis
Copy link
Member

chrisdennis commented Jan 4, 2022

In 3.9.9 the jaxb dependencies are provided scope. This means you will need to add an explicit dependency on a jaxb-runtime if you want to use XML configurations.

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