13 Replies Latest reply on May 24, 2017 9:17 AM by garydux

    Integrating JBoss 7.1 & Websphere via EJB3

    krivko

      Hello!

       

      I'm trying to integrate JBoss 7.1 and Websphere 7 via remote EJB3 call. I made an standalone Java client which works just fine by including two Websphere libraries (com.ibm.ws.orb_7.0.0.jar & com.ibm.ws.admin.client_7.0.0.jar).

      Here is a code snippet from standalone client

              

                public static void main(String[] args) {
                          Hashtable env = new Hashtable();
                          env.put(Context.INITIAL_CONTEXT_FACTORY, "com.ibm.websphere.naming.WsnInitialContextFactory");
                          env.put("org.omg.CORBA.ORBClass", "com.ibm.CORBA.iiop.ORB");
                          env.put(Context.PROVIDER_URL, "corbaloc:iiop:172.30.3.107:2811");
      
                          Context context;
                          try {
        
                                    context = new InitialContext(env);
                                    String jndiName = "ejb/Vozniki/RmiRouterVoznikiEjb.jar/TestBean#si.src.vozniki.ejb.TestBeanRemote";
                                    System.out.println("lookup-!");
                                    Object obj = context.lookup(jndiName);
                                    System.out.println("after lookup-!");
                                    TestBeanRemote remote = (TestBeanRemote) obj;
                                    System.out.println("remote hello :" + remote.hello());
                          } catch (NamingException e) {
                                    throw new RuntimeException(e);
                          }
                          System.out.println("the end!");
                }
      

       

      When I try to run the same code on JBoss 7.1 (runs on the same JDK as standalone client) in web application's controller (the forementioned WAS libraries are included) I get a rather unpleasant exception

       

      08:15:06,077 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/dic-rmi].[spring-def/dispatcher]] (http--127.0.0.1-8080-1) Servlet.service() for servlet spring-def/dispatcher threw exception: java.lang.LinkageError: loader constraint violation in interface itable initialization: when resolving method "com.ibm.rmi.io.ValueHandlerImpl.readValue(Lorg/omg/CORBA/portable/InputStream;ILjava/lang/Class;Ljava/lang/String;Lorg/omg/SendingContext/RunTime;)Ljava/io/Serializable;" the class loader (instance of org/jboss/modules/ModuleClassLoader) of the current class, com/ibm/rmi/io/ValueHandlerImpl, and the class loader (instance of org/jboss/modules/ModuleClassLoader) for interface javax/rmi/CORBA/ValueHandler have different Class objects for the type org/omg/SendingContext/RunTime used in the signature
                at com.ibm.rmi.iiop.CDRWriter.<init>(CDRWriter.java:304) [com.ibm.ws.orb-7.0.0.jar:]
                at com.ibm.rmi.iiop.CDROutputStream.<init>(CDROutputStream.java:159) [com.ibm.ws.orb-7.0.0.jar:]
                at com.ibm.rmi.iiop.IIOPOutputStream.<init>(IIOPOutputStream.java:112) [com.ibm.ws.orb-7.0.0.jar:]
                at com.ibm.rmi.iiop.ORB.newOutputStream(ORB.java:426) [com.ibm.ws.orb-7.0.0.jar:]
                at com.ibm.CORBA.iiop.ORB.newOutputStream(ORB.java:895) [com.ibm.ws.orb-7.0.0.jar:]
                at com.ibm.rmi.iiop.Connection._locate(Connection.java:453) [com.ibm.ws.orb-7.0.0.jar:]
                at com.ibm.rmi.iiop.Connection.locate(Connection.java:439) [com.ibm.ws.orb-7.0.0.jar:]
                at com.ibm.rmi.iiop.GIOPImpl.locate(GIOPImpl.java:219) [com.ibm.ws.orb-7.0.0.jar:]
                at com.ibm.rmi.corba.Corbaloc.locateUsingINS(Corbaloc.java:307) [com.ibm.ws.orb-7.0.0.jar:]
                at com.ibm.rmi.corba.Corbaloc.resolve(Corbaloc.java:378) [com.ibm.ws.orb-7.0.0.jar:]
                at com.ibm.rmi.corba.ORB.objectURLToObject(ORB.java:3721) [com.ibm.ws.orb-7.0.0.jar:]
                at com.ibm.CORBA.iiop.ORB.objectURLToObject(ORB.java:3256) [com.ibm.ws.orb-7.0.0.jar:]
                at com.ibm.rmi.corba.ORB.string_to_object(ORB.java:3619) [com.ibm.ws.orb-7.0.0.jar:]
                at com.ibm.ws.naming.util.WsnInitCtxFactory.stringToObject(WsnInitCtxFactory.java:1567) [com.ibm.ws.admin.client-7.0.0.jar:]
                at com.ibm.ws.naming.util.WsnInitCtxFactory.getWsnNameService(WsnInitCtxFactory.java:1432) [com.ibm.ws.admin.client-7.0.0.jar:]
                at com.ibm.ws.naming.util.WsnInitCtxFactory.getRootContextFromServer(WsnInitCtxFactory.java:987) [com.ibm.ws.admin.client-7.0.0.jar:]
                at com.ibm.ws.naming.util.WsnInitCtxFactory.getRootJndiContext(WsnInitCtxFactory.java:909) [com.ibm.ws.admin.client-7.0.0.jar:]
                at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContextInternal(WsnInitCtxFactory.java:581) [com.ibm.ws.admin.client-7.0.0.jar:]
                at com.ibm.ws.naming.util.WsnInitCtx.getContext(WsnInitCtx.java:124) [com.ibm.ws.admin.client-7.0.0.jar:]
                at com.ibm.ws.naming.util.WsnInitCtx.getContextIfNull(WsnInitCtx.java:799) [com.ibm.ws.admin.client-7.0.0.jar:]
                at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:165) [com.ibm.ws.admin.client-7.0.0.jar:]
                at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:180) [com.ibm.ws.admin.client-7.0.0.jar:]
                at javax.naming.InitialContext.lookup(InitialContext.java:392) [rt.jar:1.6.0_22]
                at si.src.dic.sb.sand_box.DicController.getOK(DicController.java:32) [classes:]
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_22]
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_22]
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_22]
                at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_22]
                at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:213) [spring-web-3.1.1.RELEASE.jar:3.1.1.RELEASE]
                at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:126) [spring-web-3.1.1.RELEASE.jar:3.1.1.RELEASE]
                at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:96) [spring-webmvc-3.1.1.RELEASE.jar:3.1.1.RELEASE]
                at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:617) [spring-webmvc-3.1.1.RELEASE.jar:3.1.1.RELEASE]
                at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:578) [spring-webmvc-3.1.1.RELEASE.jar:3.1.1.RELEASE]
                at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80) [spring-webmvc-3.1.1.RELEASE.jar:3.1.1.RELEASE]
                at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923) [spring-webmvc-3.1.1.RELEASE.jar:3.1.1.RELEASE]
                at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852) [spring-webmvc-3.1.1.RELEASE.jar:3.1.1.RELEASE]
                at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882) [spring-webmvc-3.1.1.RELEASE.jar:3.1.1.RELEASE]
                at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778) [spring-webmvc-3.1.1.RELEASE.jar:3.1.1.RELEASE]
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:734) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.10.Final.jar:]
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.10.Final.jar:]
                at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) [spring-web-3.1.1.RELEASE.jar:3.1.1.RELEASE]
                at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) [spring-web-3.1.1.RELEASE.jar:3.1.1.RELEASE]
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.10.Final.jar:]
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.10.Final.jar:]
                at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.10.Final.jar:]
                at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.10.Final.jar:]
                at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:154) [jboss-as-web-7.1.0.Final.jar:7.1.0.Final]
                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.10.Final.jar:]
                at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.10.Final.jar:]
                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.10.Final.jar:]
                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.10.Final.jar:]
                at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.10.Final.jar:]
                at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.10.Final.jar:]
                at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.10.Final.jar:]
                at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_22]
      

       

      Can you please help me with some advices, tips or tutorials how to integrate this two application servers. If you need any further details, please don't hasitate to ask

       

       

      Thank you in advance!

        • 1. Re: Integrating JBoss 7.1 & Websphere via EJB3
          ctomc

          Hi and welcome to forums

           

          How does your application deployed to as7 looks like?

           

          can you post output of jar tf <name of your archive>

           

          What exactly is jdk you are using? sun(oracle)'s or ibm?

           

           

          --

          tomaz

          • 2. Re: Integrating JBoss 7.1 & Websphere via EJB3
            krivko

            Thanks for the warm welcome

             

            JDK is a Sun JDK 1.6.0_22.

             

            Application is deployed in a form of a .war file - here it is in detail:

             

            META-INF/
            META-INF/MANIFEST.MF
            WEB-INF/
            WEB-INF/classes/
            WEB-INF/classes/si/
            WEB-INF/classes/si/src/
            WEB-INF/classes/si/src/dic/
            WEB-INF/classes/si/src/dic/sb/
            WEB-INF/classes/si/src/dic/sb/sand_box/
            WEB-INF/classes/si/src/dic/web/
            WEB-INF/classes/si/src/dic/web/util/
            WEB-INF/jsp/
            WEB-INF/jsp/basic/
            WEB-INF/jsp/includes/
            WEB-INF/lib/
            WEB-INF/spring-def/
            WEB-INF/tiles/
            index.jsp
            WEB-INF/classes/si/src/dic/sb/sand_box/DicController.class
            WEB-INF/classes/si/src/dic/web/util/DicConstants.class
            WEB-INF/classes/si/src/dic/web/util/PageHelper.class
            WEB-INF/classes/si/src/dic/web/util/TilesManager.class
            WEB-INF/jboss-web.xml
            WEB-INF/jsp/basic/message.jsp
            WEB-INF/jsp/includes/prelude.jsp
            WEB-INF/lib/aopalliance-1.0.jar
            WEB-INF/lib/com.ibm.ws.admin.client-7.0.0.jar
            WEB-INF/lib/com.ibm.ws.orb-7.0.0.jar
            WEB-INF/lib/commons-beanutils-1.8.0.jar
            WEB-INF/lib/commons-digester-2.0.jar
            WEB-INF/lib/commons-logging-1.1.1.jar
            WEB-INF/lib/jackson-core-asl-1.9.4.jar
            WEB-INF/lib/jackson-mapper-asl-1.9.4.jar
            WEB-INF/lib/jcl-over-slf4j-1.5.8.jar
            WEB-INF/lib/RmiRouterVoznikiEjbClient-1.0.jar
            WEB-INF/lib/slf4j-api-1.5.8.jar
            WEB-INF/lib/spring-aop-3.1.1.RELEASE.jar
            WEB-INF/lib/spring-asm-3.1.1.RELEASE.jar
            WEB-INF/lib/spring-beans-3.1.1.RELEASE.jar
            WEB-INF/lib/spring-context-3.1.1.RELEASE.jar
            WEB-INF/lib/spring-context-support-3.1.1.RELEASE.jar
            WEB-INF/lib/spring-core-3.1.1.RELEASE.jar
            WEB-INF/lib/spring-expression-3.1.1.RELEASE.jar
            WEB-INF/lib/spring-web-3.1.1.RELEASE.jar
            WEB-INF/lib/spring-webmvc-3.1.1.RELEASE.jar
            WEB-INF/lib/tiles-api-2.2.2.jar
            WEB-INF/lib/tiles-core-2.2.2.jar
            WEB-INF/lib/tiles-jsp-2.2.2.jar
            WEB-INF/lib/tiles-servlet-2.2.2.jar
            WEB-INF/lib/tiles-template-2.2.2.jar
            WEB-INF/spring-def/common-beans.xml
            WEB-INF/spring-def/dispatcher-servlet.xml
            WEB-INF/tiles/dic.xml
            WEB-INF/web.xml
            META-INF/maven/
            META-INF/maven/si.src.dic.sb/
            META-INF/maven/si.src.dic.sb/sand-box/
            META-INF/maven/si.src.dic.sb/sand-box/pom.xml
            META-INF/maven/si.src.dic.sb/sand-box/pom.properties
            

             

            JBoss runs in standalone mode with standalone.xml configuration.

            • 3. Re: Integrating JBoss 7.1 & Websphere via EJB3
              sfcoy

              Try replacing:

               

              env.put("org.omg.CORBA.ORBClass", "com.ibm.CORBA.iiop.ORB");

               

              with:

               

              env.put("org.omg.CORBA.ORBClass", "org.jacorb.orb.ORB");

               

              Also, you should probably also remove com.ibm.ws.orb-7.0.0.jar from your WEB-INF/lib directory too.

               

              My CORBA is quite rusty these days, but the JBoss CORBA implementation is supposed to be able to communicate with the IBM CORBA implementation as it is an inter-operability standard.

              • 4. Re: Integrating JBoss 7.1 & Websphere via EJB3
                patshamiri

                Has anyone resolved this problem, coz, I'm having the same issue.

                I've tried the suggestion env.put("org.omg.CORBA.ORBClass", "org.jacorb.orb.ORB") and removed the Ibm Thin Client jars.

                 

                There's no error in looking up the context.

                 

                But I keep getting a nasty error as following when it tries to access the method in the ejb class.

                 

                16:37:14,723 ERROR [stderr] (http--127.0.0.1-8080-1) java.lang.IllegalStateException: No EJB receiver available for handling [appName:Ser
                vicesEAR,modulename:ServicesEJB,distinctname:] combination for invocation context org.jboss.ejb.client.EJBClientInvocationContext@5f4f76f
                5
                16:37:14,727 ERROR [stderr] (http--127.0.0.1-8080-1)    at org.jboss.ejb.client.EJBClientContext.requireEJBReceiver(EJBClientContext.java:584)
                16:37:14,729 ERROR [stderr] (http--127.0.0.1-8080-1)    at org.jboss.ejb.client.ReceiverInterceptor.handleInvocation(ReceiverInterceptor.java:119
                )
                16:37:14,730 ERROR [stderr] (http--127.0.0.1-8080-1)    at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext
                .java:181)
                16:37:14,733 ERROR [stderr] (http--127.0.0.1-8080-1)    at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:136)
                16:37:14,734 ERROR [stderr] (http--127.0.0.1-8080-1)    at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:121)
                16:37:14,736 ERROR [stderr] (http--127.0.0.1-8080-1)    at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:104)

                • 5. Re: Integrating JBoss 7.1 & Websphere via EJB3
                  sfcoy

                  You almost certainly need the IBM Thin Client jars. Only the CORBA implementation should have been removed.

                   

                  When you perform the JNDI lookup you should get a deserialised stub back from WebSphere which would be dependent upon those jars being present.

                   

                  Assuming that is what should happen, seeing org.jboss.ejb.client classes in your stack trace looks very wrong.

                   

                  What does the lookup and invoke code look like?

                  • 6. Re: Integrating JBoss 7.1 & Websphere via EJB3
                    patshamiri

                       Thanks for replying. This is my current context lookup without the IBM Thin Client jars.

                      

                        Properties props = new Properties();
                        props.put("org.omg.CORBA.ORBClass", "org.jacorb.orb.ORB");
                        props.put("java.naming.provider.url", "corbaloc::10.108.40.120:1031");

                     

                        System.out.println("Running test...");
                        Context intCtx = new InitialContext(props);
                        System.out.println("Found InitialContext");
                       
                        Object obj = intCtx.lookup( "ejb:ServicesEAR/ServicesEJB//FacadeBeanImpl!com.ejb.facade.FacadeBean") ;

                     

                        FacadeBean bean = (FacadeBean) obj;

                        bean.getList ("test");
                       

                    • 7. Re: Integrating JBoss 7.1 & Websphere via EJB3
                      sfcoy

                      According to http://pic.dhe.ibm.com/infocenter/wasinfo/v7r0/index.jsp?topic=%2Fcom.ibm.websphere.express.doc%2Finfo%2Fexp%2Fae%2Ftcli_ejbthinclient.html you need to use com.ibm.ws.ejb.thinclient_7.0.0.jar which is not listed in your file list above.

                       

                      It also says that you must use the com.ibm.ws.orb_7.0.0.jar. This bit of vendor tie-in is likely to make life difficult for you.

                      • 8. Re: Integrating JBoss 7.1 & Websphere via EJB3
                        patshamiri

                        Thank you for the reply.

                         

                        I created a standalone client to call the ejbs in Websphere and included the IBM jars com.ibm.ws.ejb.thinclient_7.0.0.jar  and com.ibm.ws.orb_7.0.0.jar. The following code works for standalone client and I can invoke the bean method successfully.

                         

                        public static void main (String args[]) {

                           try {

                         

                           Properties props = new Properties();
                           props.put("org.omg.CORBA.ORBClass", "com.ibm.CORBA.iiop.ORB");
                           props.put("java.naming.factory.initial", "com.ibm.websphere.naming.WsnInitialContextFactory");
                           props.put("java.naming.provider.url", "corbaloc::10.108.40.120:1031");
                          
                           System.out.println("Running IIOP test...");


                           Context intCtx = new InitialContext(props);
                            Object obj = intCtx.lookup( "cell/clusters/Services_Cluster/ejb/SessionFacade") ;
                           
                            System.out.println("Context Lookup found ");

                            SessionFacadeHome remote = (SessionFacadeHome) javax.rmi.PortableRemoteObject.narrow(obj, SessionFacadeHome.class);
                            System.out.println("Found IIOP EJB Remote");
                            SessionFacade bean = remote.create();
                            List list = bean.getAllMessages();

                            System.out.println ("List: " + list.toString ());
                          
                          } catch (NamingException e) {
                            System.out.println("Error!! NamingException" + e.getMessage());
                            e.printStackTrace();
                          } catch (RemoteException e) {

                             System.out.println("Error!! RemoteException" + e.getMessage());

                         

                             e.printStackTrace();
                           } catch (CreateException e) {

                              System.out.println("Error!! CreateException" + e.getMessage());

                         

                              e.printStackTrace();
                           } catch (Exception e) {

                               System.out.println ("General error: " + e.toString());
                          }

                        }

                         

                        I've included the IBM jars com.ibm.ws.ejb.thinclient_7.0.0.jar  and com.ibm.ws.orb_7.0.0.jar into my WAR/lib

                        And I tried to invoke the ejbs from my WAR, the same way as above which is working for my standalone client.

                         

                        This is the error I get when it does a lookup on the EJB:

                         

                        java.lang.LinkageError: loader constraint violation in interface itable initialization: when resolving method "com.ibm.rmi.io.ValueHandlerImpl.readValue(Lorg/omg/CORBA/portable/InputStream;ILjava/lang/Class;Ljava/lang/String;Lorg/omg/SendingContext/RunTime;)Ljava/io/Serializable;" the class loader (instance of org/jboss/modules/ModuleClassLoader) of the current class, com/ibm/rmi/io/ValueHandlerImpl, and the class loader (instance of org/jboss/modules/ModuleClassLoader) for interface javax/rmi/CORBA/ValueHandler have different Class objects for the type org/omg/SendingContext/RunTime used in the signature
                        com.ibm.rmi.iiop.CDRWriter.<init>(CDRWriter.java:304)
                        com.ibm.rmi.iiop.CDROutputStream.<init>(CDROutputStream.java:159)
                        com.ibm.rmi.iiop.IIOPOutputStream.<init>(IIOPOutputStream.java:112)
                        com.ibm.rmi.iiop.ORB.newOutputStream(ORB.java:426)
                        com.ibm.CORBA.iiop.ORB.newOutputStream(ORB.java:895)
                        com.ibm.rmi.iiop.Connection._locate(Connection.java:453)
                        com.ibm.rmi.iiop.Connection.locate(Connection.java:439)
                        com.ibm.rmi.iiop.GIOPImpl.locate(GIOPImpl.java:219)
                        com.ibm.rmi.corba.Corbaloc.locateUsingINS(Corbaloc.java:307)
                        com.ibm.rmi.corba.Corbaloc.resolve(Corbaloc.java:378)
                        com.ibm.rmi.corba.ORB.objectURLToObject(ORB.java:3721)
                        com.ibm.CORBA.iiop.ORB.objectURLToObject(ORB.java:3256)
                        com.ibm.rmi.corba.ORB.string_to_object(ORB.java:3619)
                        com.ibm.ws.naming.util.WsnInitCtxFactory.stringToObject(WsnInitCtxFactory.java:1524)
                        com.ibm.ws.naming.util.WsnInitCtxFactory.getWsnNameService(WsnInitCtxFactory.java:1389)
                        com.ibm.ws.naming.util.WsnInitCtxFactory.getRootContextFromServer(WsnInitCtxFactory.java:944)
                        com.ibm.ws.naming.util.WsnInitCtxFactory.getRootJndiContext(WsnInitCtxFactory.java:865)
                        com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContextInternal(WsnInitCtxFactory.java:545)
                        com.ibm.ws.naming.util.WsnInitCtx.getContext(WsnInitCtx.java:123)
                        com.ibm.ws.naming.util.WsnInitCtx.getContextIfNull(WsnInitCtx.java:798)
                        com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:164)
                        com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:179)
                        javax.naming.InitialContext.lookup(InitialContext.java:392)
                        com.web.controller.SubmitAccountAction.testIIOPInvocation(SubmitAccountAction.java:156)

                        • 9. Re: Integrating JBoss 7.1 & Websphere via EJB3
                          jesper.pedersen

                          Try and scan for the dependencies of the IBM JARs using http://www.jboss.org/tattletale

                          • 10. Re: Integrating JBoss 7.1 & Websphere via EJB3
                            glkishore

                            Has anyone able to make it work? I am facing the same exact LinkageError. I tried find the dependencies by scanning the 'tattletale'- only things that I found was IBM JAVA JAR in IBM_JAVA/JRE.

                            • 11. Re: Integrating JBoss 7.1 & Websphere via EJB3
                              glkishore

                              I was able to over come the error by using IBM JDK.

                              • 12. Re: Integrating JBoss 7.1 & Websphere via EJB3
                                babumahesh

                                hi

                                recently we have started ejb lookup from JBOSS Client to the WEBSphere server,

                                 

                                i am facing the same exact LinkageError.

                                can someone please help....

                                 

                                 

                                 

                                java.lang.LinkageError: loader constraint violation in interface itable initialization: when resolving method "com.ibm.rmi.io.ValueHandlerImpl.readValue(Lorg/omg/CORBA/portable/InputStream;ILjava/lang/Class;Ljava/lang/String;Lorg/omg/SendingContext/RunTime;)Ljava/io/Serializable;" the class loader (instance of org/jboss/modules/ModuleClassLoader) of the current class, com/ibm/rmi/io/ValueHandlerImpl, and the class loader (instance of org/jboss/modules/ModuleClassLoader) for interface javax/rmi/CORBA/ValueHandler have different Class objects for the type java/lang/Class;Ljava/lang/String;Lorg/omg/SendingContext/RunTime;)Ljava/io/Serializable; used in the signature

                                  at com.ibm.rmi.iiop.CDRWriter.<init>(CDRWriter.java:304)

                                  at com.ibm.rmi.iiop.CDROutputStream.<init>(CDROutputStream.java:159)

                                  at com.ibm.rmi.iiop.ORB.newOutputStream(ORB.java:406)

                                  at com.ibm.CORBA.iiop.ORB.newOutputStream(ORB.java:831)

                                  at com.ibm.rmi.IOR.stringify(IOR.java:524)

                                  at com.ibm.rmi.IOR.stringify(IOR.java:509)

                                  at com.ibm.ISecurityLocalObjectBaseL13Impl.SecurityConnectionInterceptor.getClassName(SecurityConnectionInterceptor.java:2759)

                                  at com.ibm.ISecurityLocalObjectBaseL13Impl.SecurityConnectionInterceptor.getConnectionKey(SecurityConnectionInterceptor.java:1040)

                                 

                                and we are using ORacle JDK at client side......

                                • 13. Re: Integrating JBoss 7.1 & Websphere via EJB3
                                  garydux

                                  Hello together,

                                   

                                  i think i have the solution for this problem. Had the similar scenario the same error. But with EAP6.4 and websphere 8.5.5.x.

                                   

                                  The problem is, the incopatibility of ORB-Implementations Java SDK  and client libs from websphere com.ibm.ws.orb_8.5.0.jar. If you tries to use com.ibm.ws.orb_8.5.0.jar (and others:com.ibm.ws.ejb.thinclient_8.5.0.jar,com.ibm.ws.sib.client.thin.jms_8.5.0.jar) on JBoss in ear or as jboss module defined, you will get that error.

                                   

                                  My solution is to exclude org.jboss.as.ejb3 and define own adjusted copy org.jboss.as.ejb3-websphere in jboss-deployment-strucrutre.xml.

                                   

                                  After that i could implement MessageListener as EJB on JBoss wich listens to a queue from Websphere.

                                   

                                  Here an Example for this Module.xml

                                  <module xmlns="urn:jboss:module:1.3" name="org.jboss.as.ejb3-websphere">

                                      <properties>

                                          <property name="jboss.api" value="private"/>

                                      </properties>

                                   

                                      <resources>

                                          <resource-root path="jboss-as-ejb3-7.5.0.Final-redhat-21.jar"/>

                                          <resource-root path="com.ibm.ws.admin.client_8.5.0.jar"/>

                                          <resource-root path="com.ibm.ws.ejb.thinclient_8.5.0.jar"/>

                                          <resource-root path="com.ibm.ws.orb_8.5.0.jar"/>

                                          <resource-root path="com.ibm.ws.sib.client.thin.jms_8.5.0.jar"/>

                                          <!-- Insert resources here -->

                                          <resource-root path="timers" />

                                      </resources>

                                   

                                      <dependencies>

                                          <module name="javax.annotation.api"/>

                                          <module name="javax.api"/>

                                          <!--module name="javax.ejb.api"/--> <!-- excluded for remote websphere jms client --> <!-- if still needed must be defined as new module with some excluded dependencies like in this module -->

                                          <module name="javax.interceptor.api"/>

                                          <module name="javax.jms.api"/>

                                          <module name="javax.persistence.api" />

                                          <module name="javax.security.jacc.api"/>

                                          <!-- For message inflow -->

                                          <module name="javax.resource.api"/>

                                          <!--module name="javax.rmi.api"/-->  <!-- excluded for remote websphere jms client-->

                                          <module name="org.hibernate"/>

                                          <!--module name="org.jacorb"/-->  <!-- excluded for remote websphere jms client-->

                                          <module name="org.jboss.as.clustering.api"/>

                                          <module name="org.jboss.as.clustering.ejb3.infinispan" services="import" optional="true"/>

                                          <module name="org.jboss.as.clustering.infinispan"/>

                                          <module name="org.jboss.as.clustering.registry"/>

                                          <module name="org.jboss.as.controller"/>

                                          <module name="org.jboss.as.weld"/>

                                          <!-- So we can access its integration API -->

                                          <module name="org.jboss.as.connector"/>

                                          <!-- Need access to org.jboss.as.core.security.ServerSecurityManager -->

                                          <module name="org.jboss.as.core-security"/>

                                          <!-- Need access to org.jboss.as.domain.management.SecurityRealm for authentication of EJB cluster nodes

                                           in EJB client context-->

                                          <module name="org.jboss.as.domain-management"/>

                                          <module name="org.jboss.as.ee"/>

                                          <!--module name="org.jboss.as.jacorb"/--> <!-- excluded for remote websphere jms client-->

                                          <module name="org.jboss.as.naming"/>

                                          <module name="org.jboss.as.network"/>

                                          <module name="org.jboss.as.remoting"/>

                                          <module name="org.jboss.as.security"/>

                                          <module name="org.jboss.as.server"/>

                                          <module name="org.jboss.as.threads"/>

                                          <module name="org.jboss.as.transactions"/>

                                          <module name="org.jboss.classfilewriter"/>

                                          <module name="org.jboss.threads"/>

                                          <module name="org.jboss.jboss-transaction-spi"/>

                                          <module name="org.jboss.common-core"/>

                                          <module name="org.jboss.ejb-client" services="import"/>

                                          <module name="org.jboss.ejb3"/>

                                          <module name="org.jboss.iiop-client"/>

                                          <module name="org.jboss.invocation"/>

                                          <module name="org.jboss.ironjacamar.api"/>

                                          <module name="org.jboss.jandex"/>

                                          <!-- For SubordinationManager for remote Xid Transaction propagation -->

                                          <module name="org.jboss.jts"/>

                                          <!-- For recovery manager (com.arjuna.ats.jbossatx.jta.RecoveryManagerService) -->

                                          <module name="org.jboss.jts.integration"/>

                                          <module name="org.jboss.logging"/>

                                          <module name="org.jboss.marshalling"/>

                                          <module name="org.jboss.marshalling.river" services="import"/>

                                          <!-- the EE metadata -->

                                          <module name="org.jboss.metadata"/>

                                          <!-- Access to the ModuleClassLoader -->

                                          <module name="org.jboss.modules"/>

                                          <!-- Access to ServiceName -->

                                          <module name="org.jboss.msc"/>

                                          <module name="org.jboss.remoting3"/>

                                          <module name="org.jboss.staxmapper"/>

                                          <!-- For parser DUP -->

                                          <module name="org.jboss.vfs"/>

                                          <module name="org.picketbox"/>

                                   

                                          <!--module name="org.omg.api"/--> <!-- excluded for remote websphere jms client-->

                                          <module name="org.picketbox"/>

                                      </dependencies>

                                  </module>

                                   

                                  Excerpt from EJB:

                                   

                                  @javax.ejb.Singleton

                                  @Startup

                                  MyMessageListenerEjb implements MessageListener {

                                   

                                  Connection connection;

                                   

                                      @PostConstruct

                                      void init() {

                                     System.out.println("Init...");
                                     listenAndReceiveJmsMessage();
                                     System.out.println("Initialized!");

                                      }

                                   

                                  public void listenAndReceiveJmsMessage() {

                                   

                                     try {

                                   

                                     final Properties env = new Properties();
                                     env.put(Context.INITIAL_CONTEXT_FACTORY, INITIAL_CONTEXT_FACTORY);
                                     env.put(Context.PROVIDER_URL, System.getProperty(Context.PROVIDER_URL, PROVIDER_URL));
                                     // env.put(Context.SECURITY_PRINCIPAL, DEFAULT_USERNAME);
                                     // env.put(Context.SECURITY_CREDENTIALS, DEFAULT_PASSWORD);

                                   

                                     // Look up administered objects
                                     InitialContext initContext = new InitialContext(env);
                                     ConnectionFactory factory = (ConnectionFactory) initContext.lookup(lookupConnectionFactoryName);
                                     Destination destination = (Destination) initContext.lookup(lookupQueueName);
                                     initContext.close();

                                   

                                     // Create JMS objects
                                     connection = factory.createConnection(DEFAULT_USERNAME, DEFAULT_PASSWORD);
                                     Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
                                     MessageConsumer receiver = session.createConsumer(destination);
                                     receiver.setMessageListener(this);
                                     connection.start();

                                   

                                     }
                                     catch (Exception e) {
                                     e.printStackTrace();
                                     System.exit(1);
                                     }

                                      }

                                   

                                  @Override

                                      public void onMessage(Message message) {

                                   

                                     try {
                                     String msgText = ((TextMessage) message).getText();
                                     System.out.println("Listening on: " + PROVIDER_URL);
                                     System.out.println(msgText);

                                   

                                     }
                                     catch (JMSException e) {
                                     e.printStackTrace();
                                     }

                                      }