javax.xml.bind:jaxb-api not provided or excluded, but jakarta.xml.bind:jakarta.xml.bind-api:4.0.2 provided
The application throws exception
org.springframework.beans.factory.BeanCreationException: Error creating bean XXXXX: javax/xml/bind/ValidationEventHandler
...
Caused by: java.lang.NoClassDefFoundError: javax/xml/bind/ValidationEventHandler
at org.ehcache.xml.XmlConfiguration.(XmlConfiguration.java:116)
at org.ehcache.xml.XmlConfiguration.(XmlConfiguration.java:92)
at org.ehcache.jsr107.EhcacheCachingProvider$ConfigSupplier.getConfiguration(EhcacheCachingProvider.java:328)
at org.ehcache.jsr107.EhcacheCachingProvider.getCacheManager(EhcacheCachingProvider.java:134)
at org.ehcache.jsr107.EhcacheCachingProvider.getCacheManager(EhcacheCachingProvider.java:85)
at org.ehcache.jsr107.EhcacheCachingProvider.getCacheManager(EhcacheCachingProvider.java:194)
at org.hibernate.cache.jcache.internal.JCacheRegionFactory.resolveCacheManager(JCacheRegionFactory.java:208)
...
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.ValidationEventHandler
javax.xml.bind.ValidationEventHandler defined in javax.xml.bind:jaxb-api
but jakarta.xml.bind:jakarta.xml.bind-api defines jakarta.xml.bind.ValidationEventHandler
Will the be migrated to jakarta.xml any time soon?
javax.xml.bind » jaxb-api v2 is outdated for 6 years already and migrated to jakarta.xml.bind » jakarta.xml.bind-api v4, but Ehcache still depends on the old v2 API and implementation, in particular https://github.com/ehcache/ehcache3/blob/561af430d76847a2c8aa1ba507cf3e142ad9185e/ehcache-xml/src/main/java/org/ehcache/xml/ConfigurationParser.java#L43
For example, having:
spring-boot-starter-cache
,hibernate-jcache
,ehcache
hibernate.javax.cache.uri=ehcache.xml
(Hibernate Guide)javax.xml.bind:jaxb-api
not provided or excluded, butjakarta.xml.bind:jakarta.xml.bind-api:4.0.2
providedThe application throws exception
javax.xml.bind.ValidationEventHandler
defined injavax.xml.bind:jaxb-api
butjakarta.xml.bind:jakarta.xml.bind-api
definesjakarta.xml.bind.ValidationEventHandler
Will the be migrated to
jakarta.xml
any time soon?Thank you.