Unable to start the JBoss EAP 6.4.x due to hibernate cache related error
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 6.4.x
Issue
- After migrating the JBoss server from EAP 6.3.x (or earlier) to 6.4.x below exception is seen in server log file:
Caused by: java.util.ServiceConfigurationError: org.infinispan.commands.module.ModuleCommandExtensions: Provider org.hibernate.cache.infinispan.util.CacheCommandExtensions not a subtype
Resolution
- This is a classloading related This content is not included.bug in the
hibernatemodule in JBoss EAP 6.4.x.
The issue is scheduled for the 6.4.9 CP release.
Workaround:
- Add an exclusion and dependency of
org.hibernatemodule injboss-deployment-structure.xml:
<jboss-deployment-structure>
<deployment>
<exclusions>
<module name="org.hibernate" />
</exclusions>
<dependencies>
<module name="org.hibernate" />
</dependencies>
</deployment>
</jboss-deployment-structure>
The same exclusion and dependencies element might need to be added to the inner subdeployment element as well.
<sub-deployment name="some-inner-module.jar">
<exclusions>
<module name="org.hibernate" />
</exclusions>
<dependencies>
<module name="org.hibernate" />
</dependencies>
</sub-deployment>
Root Cause
- The dependencies added automatically to a JPA application expose a
META-INF/servicesfile that conflicts withInfinispan/JDGpackaged in the application.
Components
Category
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.