Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-5743

Module org.javassist not excluded when persistence.xml contains property <property name="jboss.as.jpa.providerModule" value="application" />

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • Major
    • None
    • 9.0.2.Final
    • None
    • Hide

      In my case the output points to <WF>/modules/system/layers/base/org/javassist/main/javassist-3.18.1-GA.jar. The output in my case was:

      16:07:25,255 INFO  [stdout] (default task-1) (jar:file:/d:/wildfly-9.0.2.Final/modules/system/layers/base/org/javassist/main/javassist-3.18.1-GA.jar!/ <no signer certificates>)
      
      Show
      Extract the attached project class-loading-problem.zip and build it with maven Setup a datasource: jdbc/CCE_DS in standalone.xml Deploy the built EAR to the WildFly Open browser and enter URL http://localhost:8080/class-loading-problem-war/class In the server log there should be an output saying the code source of the class javassist.util.proxy.ProxyFactory . In my case the output points to <WF>/modules/system/layers/base/org/javassist/main/javassist-3.18.1-GA.jar . The output in my case was: 16:07:25,255 INFO [stdout] (default task-1) (jar:file:/d:/wildfly-9.0.2.Final/modules/system/layers/base/org/javassist/main/javassist-3.18.1-GA.jar!/ <no signer certificates>)

    Description

      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:

      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
      

      and the content of the jboss-deployment-structure.xml

      jboss-deployment-structure.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>
      

      and persistence.xml

      persistence.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>
      

      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

      Attachments

        Activity

          People

            kathermanova Katarína Hermanová
            jstanik Juraj Staník (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: