[jboss-jira] [JBoss JIRA] (WFLY-5743) Module org.javassist not excluded when persistence.xml contains property <property name="jboss.as.jpa.providerModule" value="application" />
Juraj Staník (JIRA)
issues at jboss.org
Fri Nov 27 10:23:00 EST 2015
Juraj Staník created WFLY-5743:
----------------------------------
Summary: Module org.javassist not excluded when persistence.xml contains property <property name="jboss.as.jpa.providerModule" value="application" />
Key: WFLY-5743
URL: https://issues.jboss.org/browse/WFLY-5743
Project: WildFly
Issue Type: Bug
Components: Class Loading
Affects Versions: 9.0.2.Final
Environment: OS: Windows 7
JVM: jdk1.7.0_79,
WF: wildfly-9.0.2.Final
DB: h2
Reporter: Juraj Staník
Assignee: David Lloyd
Attachments: class-loading-problem.zip
Excluding the module 'org.javassit' in the jboss-deployment-structure.xml does not work correctly for all modules in EAR when shipping custom version of Hibernate and Javassist and setting property
<property name="jboss.as.jpa.providerModule" value="application" />
in the persistence.xml.
In case of the following EAR structure:
{noformat}
EAR
|`-- lib
| |`-- javassist-3.20.0-GA.jar
| `-- <hibernate 4.2.19 jars>
|`-- META-INF
| |`-- jboss-deployment-structure.xml
| `-- application.xml
|`-- EJB-JAR
| `-- META-INF
| `-- persistence.xml
`-- WAR
{noformat}
and the content of the jboss-deployment-structure.xml
{code:title=jboss-deployment-structure.xml|xml}
<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.1">
<ear-subdeployments-isolated>false</ear-subdeployments-isolated>
<deployment>
<exclusions>
<module name="org.hibernate" />
<module name="org.javassist" />
</exclusions>
</deployment>
</jboss-deployment-structure>
{code}
and persistence.xml
{code:title=persistence.xml|xml}
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://xmlns.jcp.org/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd"
version="2.1">
<persistence-unit name="cce-example" transaction-type="JTA">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>jdbc/CCE_DS</jta-data-source>
<properties>
<property name="jboss.as.jpa.providerModule" value="application" />
</properties>
</persistence-unit>
</persistence>
{code}
The module EJB-JAR loads javassist classes not from the bundled {{EAR/lib/javassist-3.20.0-GA.jar}} but from {{<WF>/modules/system/layers/base/org/javassist/main/javassist-3.18.1-GA.jar}}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
More information about the jboss-jira
mailing list