Spring hibernate is throwing java.lang.NoClassDefFoundError: javax/transaction/SystemException

0

I am upgrading our project to wildfly 30 with latest spring, hibernate-core with java 17. While deploying the server, I am facing this issue java.lang.NoClassDefFoundError: javax/transaction/SystemException. I dont have any javax related thing in my project .

Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.NoClassDefFoundError: javax/transaction/SystemException [in thread “ServerService Thread Pool – 86”] at java.lang.Class.forName0(Native Method) ~[?:?] at java.lang.Class.forName(Class.java:467) ~[?:?] at org.jboss.logging.Logger.doGetMessageLogger(Logger.java:2562) ~[jboss-logging-3.5.0.Final.jar:3.5.0.Final] at org.jboss.logging.Logger.getMessageLogger(Logger.java:2530) ~[jboss-logging-3.5.0.Final.jar:3.5.0.Final] at org.jboss.logging.Logger.getMessageLogger(Logger.java:2516) ~[jboss-logging-3.5.0.Final.jar:3.5.0.Final] at org.hibernate.cache.ehcache.internal.EhCacheMessageLogger.(EhCacheMessageLogger.java:31) ~[hibernate-ehcache-6.0.0.Alpha7.jar:6.0.0.Alpha7] at org.hibernate.cache.ehcache.internal.EhcacheRegionFactory.(EhcacheRegionFactory.java:46) ~[hibernate-ehcache-6.0.0.Alpha7.jar:6.0.0.Alpha7] at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?] at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77) ~[?:?] at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?] at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) ~[?:?] at java.lang.reflect.ReflectAccess.newInstance(ReflectAccess.java:128) ~[?:?] at jdk.internal.reflect.ReflectionFactory.newInstance(ReflectionFactory.java:347) ~[?:?] at java.lang.Class.newInstance(Class.java:645) ~[?:?] at org.hibernate.cache.internal.StrategyCreatorRegionFactoryImpl.create(StrategyCreatorRegionFactoryImpl.java:62) ~[hibernate-core-6.4.4.Final.jar:6.4.4.Final] at org.hibernate.cache.internal.StrategyCreatorRegionFactoryImpl.create(StrategyCreatorRegionFactoryImpl.java:23) ~[hibernate-core-6.4.4.Final.jar:6.4.4.Final] at org.hibernate.boot.registry.selector.internal.StrategySelectorImpl.resolveStrategy(StrategySelectorImpl.java:240) ~[hibernate-core-6.4.4.Final.jar:6.4.4.Final] at org.hibernate.boot.registry.selector.internal.StrategySelectorImpl.resolveStrategy(StrategySelectorImpl.java:189) ~[hibernate-core-6.4.4.Final.jar:6.4.4.Final] at org.hibernate.cache.internal.RegionFactoryInitiator.resolveRegionFactory(RegionFactoryInitiator.java:96) ~[hibernate-core-6.4.4.Final.jar:6.4.4.Final] at org.hibernate.cache.internal.RegionFactoryInitiator.initiateService(RegionFactoryInitiator.java:47) ~[hibernate-core-6.4.4.Final.jar:6.4.4.Final] at org.hibernate.cache.internal.RegionFactoryInitiator.initiateService(RegionFactoryInitiator.java:32) ~[hibernate-core-6.4.4.Final.jar:6.4.4.Final] at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:130) ~[hibernate-core-6.4.4.Final.jar:6.4.4.Final] at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:263) ~[hibernate-core-6.4.4.Final.jar:6.4.4.Final] at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:238) ~[hibernate-core-6.4.4.Final.jar:6.4.4.Final] at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:215) ~[hibernate-core-6.4.4.Final.jar:6.4.4.Final] at org.hibernate.boot.internal.MetadataBuilderImpl$MetadataBuildingOptionsImpl.(MetadataBuilderImpl.java:705) ~[hibernate-core-6.4.4.Final.jar:6.4.4.Final] at org.hibernate.boot.internal.MetadataBuilderImpl.(MetadataBuilderImpl.java:139) ~[hibernate-core-6.4.4.Final.jar:6.4.4.Final] at org.hibernate.boot.MetadataSources.getMetadataBuilder(MetadataSources.java:164) ~[hibernate-core-6.4.4.Final.jar:6.4.4.Final] at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:860) ~[hibernate-core-6.4.4.Final.jar:6.4.4.Final] at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:960) ~[hibernate-core-6.4.4.Final.jar:6.4.4.Final] at org.springframework.orm.hibernate5.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:616) ~[spring-orm-6.1.4.jar:6.1.4] at org.springframework.orm.hibernate5.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:600) ~[spring-orm-6.1.4.jar:6.1.4] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1833) ~[spring-beans-6.1.4.jar:6.1.4] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1782) ~[spring-beans-6.1.4.jar:6.1.4] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:600) ~[spring-beans-6.1.4.jar:6.1.4] at org.springframework.beans.factory.support.AbstractA

Could someone please help me to reslove this issue?

Whether we should hibernate-ehcache-6.0.0.Alpha7.jar or not? Which jar is compatable with jakara?

Regards, Poornima

The EHCache module was dropped in favor of the JCache module. Hibernate JARs are always released in sync, so you need matching versions. Here is the dependency: Maven Central: org.hibernate.orm:hibernate-jcache

Ok Thx @beikov will try with above version