loader constraint violation in interface itable initialization for interface javax/ejb/EJBHome

Latest response

Hi,
during the implementation of an Oracle SOA client and the retrieval of a remote EJB from Jboss EAP, we encounter the following error:

loader constraint violation in interface itable initialization: when resolving method "oracle.bpel.services.workflow.query.ejb.TaskQueryService_oz1ipg_HomeImpl_1036_WLStub. remove(Ljavax/ejb/Handle; )V" the class loader (instance of weblogic/utils/classloaders/GenericClassLoader) of the current class, oracle/bpel/services/workflow/query/ejb/TaskQueryService_oz1ipg_HomeImpl_1036_WLStub, and the class loader (instance of org/jboss/modules/ModuleClassLoader) for interface javax/ejb/EJBHome have different Class objects for the type javax/ejb/Handle used in the signature

The complete stacktrace is attached.

The application looks like this:

APP-EE.EAR
|____app-business-ejb.jar
|____app-bda-ejb.jar
|____app-business-client.jar
|____app-web.war
|____ear/lib
|____wlfullclient.jar
|____clientSOA.jar

The jboss-deployment-structure.xml contains a reference to the custom module (com.custom.customlib). The complete xml is attached.
Products used for the current migration:

Jboss EAP 7.3.0
JDK 1.8.0_202

Weblogic Server 10.3.6
SOA Server 11.1.1.6
JDK 1.7.0_281

I believe it is a signature issue between oracle weblogic EJB and Jboss EAP EJB.
Any possible resolution?
Thanks!!!

Attachments

Responses

Hi, long time ago I did such migration ... and the way was alway to create a weblogic module in eap. See this : https://access.redhat.com/solutions/3259881

and then you reference to it:

<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
   <deployment>

      <dependencies>
         <module name="wls-module" />
      </dependencies>
   </deployment>
</jboss-deployment-structure>

I repackage even weblogic jar with maven to exclude some weblogic classes:

 <build>
        <plugins>
           <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-shade-plugin</artifactId>
            <version>2.4.3</version>
            <executions>
              <execution>
                <phase>package</phase>
                <goals>
                  <goal>shade</goal>
                </goals>
                <configuration>
                  <filters>
                    <filter>
                      <artifact>com.bea:wlfullclient</artifact>
                      <excludes>
                        <exclude>javax/**</exclude>
                        <exclude>lib/**</exclude>
                        <exclude>javatests/**</exclude>
                        <exclude>org/**</exclude>
                        <exclude>netscape/**</exclude>
                        <exclude>jxxload_help/**</exclude>
                        <exclude>kodo/**</exclude>
                        <exclude>notdemo/**</exclude>
                        <exclude>utils/**</exclude>
                        <exclude>oracle/**</exclude>
                        <exclude>OSGI-INF/**</exclude>
                        <exclude>antlr/**</exclude>
                        <exclude>bea/**</exclude>
                        <exclude>schemacom_bea_xml/**</exclude>
                        <exclude>com/oracle/**</exclude>
                        <exclude>com/rsa/**</exclude>
                        <exclude>com/oroinc/**</exclude>
                        <exclude>com/netscape/**</exclude>
                        <exclude>com/bluecast/**</exclude>
                        <exclude>com/ziclix/**</exclude>
                        <exclude>com/sun/**</exclude>
                        <exclude>com/octetstring/**</exclude>
                        <exclude>com/asn1c/**</exclude>
                        <exclude>com/beasys/**</exclude>
                        <exclude>com/bea/security/xacml/**</exclude>
                        <exclude>com/bea/security/saml2/**</exclude>
                        <exclude>com/bea/security/css/**</exclude>
                        <exclude>com/bea/security/providers/**</exclude>
                        <exclude>com/bea/common/**</exclude>
                        <exclude>com/bea/staxb/**</exclude>
                        <exclude>com/bea/xbeanmarshal/**</exclude>
                        <exclude>com/bea/wlw/**</exclude>

                        <exclude>weblogic/uddi/**</exclude>

                        <exclude>weblogic/jdbc/**</exclude>

                        <exclude>weblogic/security/ldap*/**</exclude>
                        <exclude>weblogic/security/jaspic/**</exclude>
                        <exclude>weblogic/wtc/**</exclude>
                        <exclude>weblogic/j2ee/**</exclude>
                        <exclude>weblogic/ejb/**</exclude>
                        <exclude>weblogic/ejb20/**</exclude>
                        <exclude>weblogic/ant/**</exclude>
                        <exclude>weblogic/ldap/**</exclude>
                        <exclude>weblogic/kodo/**</exclude>
                        <exclude>META-INF/wstx/**</exclude>
                        <exclude>META-INF/schemas/**</exclude>
                        <exclude>META-INF/catalog/**</exclude>
                        <exclude>weblogic/tools/**</exclude>
                        <exclude>weblogicx/**</exclude>
                        <exclude>LDAP*.class</exclude>
                        <exclude>META-INF/**/*.ser</exclude>
                      </excludes>
                    </filter>
                  </filters>
                </configuration>
              </execution>
            </executions>
          </plugin>

so u can exclude what ever u want

Thank you so much for your response. We solved the problem following your suggestions: a new custom module was created and it was inserted as dependencies in the jboss-deploy-structure.xml. The new module was created as shown below:

<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.6" name="com.app.bpm.client">
    <resources>
        <resource-root path="clientfull-10.3.jar">
            <filter>
                <exclude path="javax/**"/>
                <exclude path="org/**"/>
                <exclude path="com/oracle/**"/>
            </filter>
        </resource-root>
        <resource-root path="wsclient_extended.jar">
            <filter>
                <exclude path="javax/**"/>
                <exclude path="lib/**"/>
                <exclude path="org/**"/>
                <exclude path="oracle/**"/>
                <exclude path="com/oracle/**"/>
                <exclude path="com/sun/**"/>
            </filter>
        </resource-root>
        <resource-root path="wlfullclient-10.3.jar">
            <filter>
                <exclude path="javax/**"/>
                <exclude path="lib/**"/>
                <exclude path="javatests/**"/>
                <exclude path="org/**"/>
                <exclude path="netscape/**"/>
                <exclude path="jxxload_help/**"/>
                <exclude path="kodo/**"/>
                <exclude path="notdemo/**"/>
                <exclude path="utils/**"/>
                <exclude path="oracle/**"/>
                <exclude path="OSGI-INF/**"/>
                <exclude path="antlr/**"/>
                <exclude path="bea/**"/>
                <exclude path="schemacom_bea_xml/**"/>
                <exclude path="com/oracle/**"/>
                <exclude path="com/rsa/**"/>
                <exclude path="com/oroinc/**"/>
                <exclude path="com/netscape/**"/>
                <exclude path="com/bluecast/**"/>
                <exclude path="com/ziclix/**"/>
                <exclude path="com/sun/**"/>
                <exclude path="com/octetstring/**"/>
                <exclude path="com/asn1c/**"/>
                <exclude path="com/beasys/**"/>
                <exclude path="com/bea/security/xacml/**"/>
                <exclude path="com/bea/security/saml2/**"/>
                <exclude path="com/bea/security/css/**"/>
                <exclude path="com/bea/security/providers/**"/>
                <exclude path="com/bea/common/**"/>
                <exclude path="com/bea/staxb/**"/>
                <exclude path="com/bea/xbeanmarshal/**"/>
                <exclude path="com/bea/wlw/**"/>
                <exclude path="weblogic/uddi/**"/>
                <exclude path="weblogic/jdbc/**"/>
                <exclude path="weblogic/security/ldap*/**"/>
                <exclude path="weblogic/security/jaspic/**"/>
                <exclude path="weblogic/wtc/**"/>
                <exclude path="weblogic/j2ee/**"/>
                <exclude path="weblogic/ejb/**"/>
                <exclude path="weblogic/ejb20/**"/>
                <exclude path="weblogic/ant/**"/>
                <exclude path="weblogic/ldap/**"/>
                <exclude path="weblogic/kodo/**"/>
                <exclude path="META-INF/wstx/**"/>
                <exclude path="META-INF/schemas/**"/>
                <exclude path="META-INF/catalog/**"/>
                <exclude path="weblogic/tools/**"/>
                <exclude path="weblogicx/**"/>
                <exclude path="LDAP*.class"/>
                <exclude path="META-INF/**/*.ser"/>
            </filter>
        </resource-root>
        <resource-root path="wlsjmsclient-10.3.jar"/>
        <resource-root path="avalon-logkit-2.2.1.jar"/>
        <resource-root path="bpm-infra.jar"/>
        <resource-root path="bpm-services.jar"/>
        <resource-root path="oracle.bpm-services.client-11.1.0.jar"/>
        <resource-root path="oracle.bpm-services.interface-11.1.0.jar"/>
        <resource-root path="oracle.bpm.metadata.jar"/>
        <resource-root path="oracle.bpm.metadata-interface.jar"/>
        <resource-root path="oracle.bpm.project.model.jar"/>
        <resource-root path="oracle.bpm.web-resources.jar"/>
        <resource-root path="oracle.bpm-core-11.1.0.jar"/>
        <resource-root path="oracle.soa-infra-mgmt-1.0.jar"/>
        <resource-root path="fabric-runtime.jar"/>
        <resource-root path="xmlparserv2.jar"/>
        <resource-root path="avalon-framework-4.1.5.jar"/>
        <resource-root path="avalon-framework-api-4.3.1.jar"/>
        <resource-root path="avalon-framework-impl-4.3.1.jar"/>
    </resources>
    <dependencies>
        <module name="javax.api"/>
        <module name="sun.jdk" export="false" services="import">
            <exports>
                <include-set>
                    <path name="sun/security/acl"/>
                    <path name="META-INF/services"/>
                </include-set>
            </exports>
        </module>
        <module name="com.sun.xml.bind"/>
        <module name="org.omg.api"/>
        <module name="javax.ejb.api" export="false"/>
        <module name="javax.transaction.api" export="false"/>
        <module name="javax.jms.api" export="false"/>
        <module name="javax.xml.stream.api" export="false"/>
        <module name="org.picketbox" optional="true"/>
        <module name="javax.servlet.api" optional="true"/>
        <module name="org.jboss.logging" optional="true"/>
        <module name="org.jboss.as.web" optional="true"/>
        <module name="org.jboss.as.ejb3" optional="true"/>
        <module name="javax.xml.ws.api"/>
        <module name="org.codehaus.woodstox"/>
        <module name="javax.rmi.api"/>
    </dependencies>
</module>

Thanks again!!!