CacheManager accountCacheManager = CacheManagerBuilder.newCacheManager(new XmlConfiguration(xmlUrl));
Then got ClassNotFoundException: javax.xml.bind.ValidationEventHandler when running:
Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/ValidationEventHandler
at org.ehcache.xml.XmlConfiguration.<init>(XmlConfiguration.java:116)
at org.ehcache.xml.XmlConfiguration.<init>(XmlConfiguration.java:92)
at org.ehcache.xml.XmlConfiguration.<init>(XmlConfiguration.java:78)
Here: https://repo1.maven.org/maven2/org/ehcache/modules/ehcache-xml/3.10.8/ehcache-xml-3.10.8.pom
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>[2.2,3)</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>[3,4)</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>
Both javax.xml.bind and jakarta.xml.bind-api are declared as dependencies of it.
Any chance the ehcache is working with ONLY jakarta jaxb ?