4 Replies Latest reply on Dec 19, 2012 4:11 AM by Prasad M

    Unable to get weblogic initialcontext from jboss-as-7.2.0.Alpha1-SNAPSHOT

    Prasad M Newbie

      I have a very simple application deployed on jboss-as-7.2.0.Alpha1-SNAPSHOT and the application tries to lookup a queue on a weblogic server(10.0) which runs on jdk1.5.

      Both the jboss and weblogic are running on my local machine.

      Below is the code in a java file related to the lookup:

       

      Hashtable prop = new Hashtable();
      prop.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
      prop.put(Context.PROVIDER_URL, "t3://localhost:7001/");
      InitialContext context = new InitialContext(prop);
      
      

       

      I have defined a module 'com.weblogic.context' to load wlclient.jar & wljmsclient.jar and below is the jboss deployment file content:

      <jboss-deployment-structure>     
                <sub-deployment name="mywebapp.war">                    
                          <dependencies> 
                                    <module name="com.weblogic.context" /> 
                          </dependencies>
                </sub-deployment>
      </jboss-deployment-structure>
      
      

       

      Below is the module.xml content:

       

      <?xml version="1.0" encoding="UTF-8"?>
      <module xmlns="urn:jboss:module:1.1" name="com.weblogic.context">   
          <resources>        
               <resource-root path="wlclient.jar"/>
               <resource-root path="wljmsclient.jar"/>       
          </resources>
          <dependencies>
               <module name="javax.api"/> 
              <module name="org.jboss.as.jacorb" /> 
          </dependencies>
      </module>
      
      

       

      Below is the exception stacktrace when I deploy the application in jboss and try to lookup the weblogic queue:

       

      H:\softwares\jboss-as-7.2.0\modules): java.lang.LinkageError: Failed to link weblogic/corba/client/ClientORBInitializer (Module "com.weblogic.context:main" from local module loader @e28b9 (roots: H:\softwares\jboss-as-7.2.0\modules))
                at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:396) [jboss-modules.jar:1.1.3.GA]
                at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:243) [jboss-modules.jar:1.1.3.GA]
                at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:73) [jboss-modules.jar:1.1.3.GA]
                at org.jboss.modules.Module.loadModuleClass(Module.java:527) [jboss-modules.jar:1.1.3.GA]
                at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:182) [jboss-modules.jar:1.1.3.GA]
                at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules.jar:1.1.3.GA]
                at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) [jboss-modules.jar:1.1.3.GA]
                at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423) [jboss-modules.jar:1.1.3.GA]
                at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) [jboss-modules.jar:1.1.3.GA]
                at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) [jboss-modules.jar:1.1.3.GA]
                at weblogic.jndi.WLInitialContextFactory.<init>(WLInitialContextFactory.java:29) [wlclient.jar:10.0.1.0]
                at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [rt.jar:1.6.0_35]
                at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) [rt.jar:1.6.0_35]
                at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) [rt.jar:1.6.0_35]
                at java.lang.reflect.Constructor.newInstance(Constructor.java:513) [rt.jar:1.6.0_35]
                at java.lang.Class.newInstance0(Class.java:355) [rt.jar:1.6.0_35]
                at java.lang.Class.newInstance(Class.java:308) [rt.jar:1.6.0_35]
                at org.jboss.as.naming.InitialContextFactoryBuilder.createInitialContextFactory(InitialContextFactoryBuilder.java:62)
                at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:664) [rt.jar:1.6.0_35]
                at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288) [rt.jar:1.6.0_35]
                at javax.naming.InitialContext.init(InitialContext.java:223) [rt.jar:1.6.0_35]
                at javax.naming.InitialContext.<init>(InitialContext.java:197) [rt.jar:1.6.0_35]
                at com.wellsfargo.dd.base.util.startup.MQBaseProps.connectToLocalWeblogicServer(MQBaseProps.java:411) [classes:]
                at com.wellsfargo.dd.base.util.startup.MQEnvProps.start(MQEnvProps.java:75) [classes:]
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_35]
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_35]
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_35]
                at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_35]
                at org.jboss.as.ee.component.ManagedReferenceLifecycleMethodInterceptorFactory$ManagedReferenceLifecycleMethodInterceptor.processInvocation(ManagedReferenceLifecycleMethodInterceptorFactory.java:130) [jboss-as-ee-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
                at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
                at org.jboss.as.ee.component.ManagedReferenceInterceptorFactory$ManagedReferenceInterceptor.processInvocation(ManagedReferenceInterceptorFactory.java:95) [jboss-as-ee-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
                at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
                at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50) [jboss-as-ee-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
                at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:251) [jboss-as-ejb3-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
                at org.jboss.as.ejb3.tx.CMTTxInterceptor.requiresNew(CMTTxInterceptor.java:354) [jboss-as-ejb3-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
                at org.jboss.as.ejb3.tx.LifecycleCMTTxInterceptor.processInvocation(LifecycleCMTTxInterceptor.java:66) [jboss-as-ejb3-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
                at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41) [jboss-as-ejb3-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
                at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45) [jboss-as-ee-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
                at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
                at org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:161) [jboss-as-ee-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
                at org.jboss.as.ee.component.BasicComponent.createInstance(BasicComponent.java:85) [jboss-as-ee-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
                at org.jboss.as.ejb3.component.singleton.SingletonComponent.getComponentInstance(SingletonComponent.java:118) [jboss-as-ejb3-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
                at org.jboss.as.ejb3.component.singleton.SingletonComponent.start(SingletonComponent.java:133) [jboss-as-ejb3-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
                at org.jboss.as.ee.component.ComponentStartService$1.run(ComponentStartService.java:54) [jboss-as-ee-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
                at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) [rt.jar:1.6.0_35]
                at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [rt.jar:1.6.0_35]
                at java.util.concurrent.FutureTask.run(FutureTask.java:138) [rt.jar:1.6.0_35]
                at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_35]
                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_35]
                at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_35]
                at org.jboss.threads.JBossThread.run(JBossThread.java:122)
      Caused by: java.lang.NoClassDefFoundError: org/omg/PortableInterceptor/ORBInitializer
                at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.6.0_35]
                at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) [rt.jar:1.6.0_35]
                at java.lang.ClassLoader.defineClass(ClassLoader.java:615) [rt.jar:1.6.0_35]
                at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) [rt.jar:1.6.0_35]
                at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:327) [jboss-modules.jar:1.1.3.GA]
                at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:391) [jboss-modules.jar:1.1.3.GA]
                ... 58 more
      Caused by: java.lang.ClassNotFoundException: org.omg.PortableInterceptor.ORBInitializer from [Module "com.weblogic.context:main" from local module loader @e28b9 (roots: H:\softwares\jboss-as-7.2.0\modules)]
                at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) [jboss-modules.jar:1.1.3.GA]
                at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules.jar:1.1.3.GA]
                at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) [jboss-modules.jar:1.1.3.GA]
                at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423) [jboss-modules.jar:1.1.3.GA]
                at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423) [jboss-modules.jar:1.1.3.GA]
                at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) [jboss-modules.jar:1.1.3.GA]
                at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) [jboss-modules.jar:1.1.3.GA]
                ... 64 more
      
      
      17:50:59,581 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 64) MSC00001: Failed to start service jboss.deployment.subunit."myear.ear"."mywebapp.war".component.MQEnvProps.START: org.jboss.msc.service.StartException in service jboss.deployment.subunit."myear.ear"."mywebapp.war".component.MQEnvProps.START: java.lang.IllegalStateException: JBAS011048: Failed to construct component instance
                at org.jboss.as.ee.component.ComponentStartService$1.run(ComponentStartService.java:57) [jboss-as-ee-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
                at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) [rt.jar:1.6.0_35]
                at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [rt.jar:1.6.0_35]
                at java.util.concurrent.FutureTask.run(FutureTask.java:138) [rt.jar:1.6.0_35]
                at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_35]
                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_35]
                at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_35]
                at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.0.0.GA.jar:2.0.0.GA]
      Caused by: java.lang.IllegalStateException: JBAS011048: Failed to construct component instance
                at org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:163) [jboss-as-ee-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
                at org.jboss.as.ee.component.BasicComponent.createInstance(BasicComponent.java:85) [jboss-as-ee-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
                at org.jboss.as.ejb3.component.singleton.SingletonComponent.getComponentInstance(SingletonComponent.java:118)
                at org.jboss.as.ejb3.component.singleton.SingletonComponent.start(SingletonComponent.java:133)
                at org.jboss.as.ee.component.ComponentStartService$1.run(ComponentStartService.java:54) [jboss-as-ee-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
                ... 7 more
      Caused by: javax.ejb.EJBException: JBAS014580: Unexpected Error
                at org.jboss.as.ejb3.tx.CMTTxInterceptor.handleExceptionInOurTx(CMTTxInterceptor.java:161)
                at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:253)
                at org.jboss.as.ejb3.tx.CMTTxInterceptor.requiresNew(CMTTxInterceptor.java:354)
                at org.jboss.as.ejb3.tx.LifecycleCMTTxInterceptor.processInvocation(LifecycleCMTTxInterceptor.java:66)
                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
                at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)
                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
                at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45) [jboss-as-ee-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
                at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
                at org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:161) [jboss-as-ee-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
                ... 11 more
      Caused by: java.lang.NoClassDefFoundError: weblogic/corba/client/ClientORBInitializer
                at weblogic.jndi.WLInitialContextFactory.<init>(WLInitialContextFactory.java:29)
                at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [rt.jar:1.6.0_35]
                at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) [rt.jar:1.6.0_35]
                at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) [rt.jar:1.6.0_35]
                at java.lang.reflect.Constructor.newInstance(Constructor.java:513) [rt.jar:1.6.0_35]
                at java.lang.Class.newInstance0(Class.java:355) [rt.jar:1.6.0_35]
                at java.lang.Class.newInstance(Class.java:308) [rt.jar:1.6.0_35]
                at org.jboss.as.naming.InitialContextFactoryBuilder.createInitialContextFactory(InitialContextFactoryBuilder.java:62) [jboss-as-naming-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
                at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:664) [rt.jar:1.6.0_35]
                at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288) [rt.jar:1.6.0_35]
                at javax.naming.InitialContext.init(InitialContext.java:223) [rt.jar:1.6.0_35]
                at javax.naming.InitialContext.<init>(InitialContext.java:197) [rt.jar:1.6.0_35]
                at com.wellsfargo.dd.base.util.startup.MQBaseProps.connectToLocalWeblogicServer(MQBaseProps.java:411)
                at com.wellsfargo.dd.base.util.startup.MQEnvProps.start(MQEnvProps.java:75)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_35]
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_35]
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_35]
                at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_35]
                at org.jboss.as.ee.component.ManagedReferenceLifecycleMethodInterceptorFactory$ManagedReferenceLifecycleMethodInterceptor.processInvocation(ManagedReferenceLifecycleMethodInterceptorFactory.java:130) [jboss-as-ee-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
                at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)
                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
                at org.jboss.as.ee.component.ManagedReferenceInterceptorFactory$ManagedReferenceInterceptor.processInvocation(ManagedReferenceInterceptorFactory.java:95) [jboss-as-ee-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
                at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)
                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
                at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50) [jboss-as-ee-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
                at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:251)
                ... 20 more
      Caused by: java.lang.ClassNotFoundException: weblogic.corba.client.ClientORBInitializer from [Module "com.weblogic.context:main" from local module loader @e28b9 (roots: H:\softwares\jboss-as-7.2.0\modules)]
                at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) [jboss-modules.jar:1.1.3.GA]
                at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules.jar:1.1.3.GA]
                at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) [jboss-modules.jar:1.1.3.GA]
                at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423) [jboss-modules.jar:1.1.3.GA]
                at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) [jboss-modules.jar:1.1.3.GA]
                at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) [jboss-modules.jar:1.1.3.GA]
                ... 49 more
      
      

       

      I think the issue should be with my module.xml, is it missing any other dependencies ?

      because the same piece code of works fine if i run it as standalone in my eclipse IDE,

      below are the jars that i have put on classpath while running in standalone mode:

      wljmsclient.jar

      wlclient.jar

      jboss-connector-api_1.6_spec-1.0.1.Final.jar ( included this when it complained about missing javax.resource.ResourceException)

        • 1. Re: Unable to get weblogic initialcontext from jboss-as-7.2.0.Alpha1-SNAPSHOT
          Tomaz Cerar Master

          Hi,

           

          for start add dependancy to module org.omg.api

           

          then we can see what happens next

          • 2. Re: Unable to get weblogic initialcontext from jboss-as-7.2.0.Alpha1-SNAPSHOT
            Prasad M Newbie

            Hi Tomaz,

             

            Thanks for your time.

             

            As suggested i did add the dependency on 'org.omg.api' but still facing issues.

            Below is my modified module.xml:

             

            <?xml version="1.0" encoding="UTF-8"?>
            <module xmlns="urn:jboss:module:1.1" name="com.weblogic.context">   
                <resources>        
                                <resource-root path="wlclient.jar"/>
                                <resource-root path="wljmsclient.jar"/>       
                </resources>
                <dependencies>
                                <module name="javax.api"/> 
                                   <module name="org.jboss.as.jacorb" />                     
                                <module name="org.omg.api" /> 
                </dependencies>
            </module>
            
            

             

            Below is the stacktrace:

             

            H:\softwares\jboss-as-7.2.0\modules): java.lang.LinkageError: Failed to link weblogic/corba/client/cluster/ORBSocketFactory (Module "com.weblogic.context:main" from local module loader @193a66f (roots: H:\softwares\jboss-as-7.2.0\modules))
                      at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:396) [jboss-modules.jar:1.1.3.GA]
                      at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:243) [jboss-modules.jar:1.1.3.GA]
                      at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:73) [jboss-modules.jar:1.1.3.GA]
                      at org.jboss.modules.Module.loadModuleClass(Module.java:527) [jboss-modules.jar:1.1.3.GA]
                      at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:182) [jboss-modules.jar:1.1.3.GA]
                      at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules.jar:1.1.3.GA]
                      at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) [jboss-modules.jar:1.1.3.GA]
                      at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423) [jboss-modules.jar:1.1.3.GA]
                      at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) [jboss-modules.jar:1.1.3.GA]
                      at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) [jboss-modules.jar:1.1.3.GA]
                      at java.lang.Class.forName0(Native Method) [rt.jar:1.6.0_35]
                      at java.lang.Class.forName(Class.java:169) [rt.jar:1.6.0_35]
                      at weblogic.corba.j2ee.naming.ORBHelper.<clinit>(ORBHelper.java:148) [wlclient.jar:10.0.1.0]
                      at weblogic.corba.client.ClientORBInitializer.initialize(ClientORBInitializer.java:91) [wlclient.jar:10.0.1.0]
                      at weblogic.jndi.WLInitialContextFactory.<init>(WLInitialContextFactory.java:29) [wlclient.jar:10.0.1.0]
                      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [rt.jar:1.6.0_35]
                      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) [rt.jar:1.6.0_35]
                      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) [rt.jar:1.6.0_35]
                      at java.lang.reflect.Constructor.newInstance(Constructor.java:513) [rt.jar:1.6.0_35]
                      at java.lang.Class.newInstance0(Class.java:355) [rt.jar:1.6.0_35]
                      at java.lang.Class.newInstance(Class.java:308) [rt.jar:1.6.0_35]
                      at org.jboss.as.naming.InitialContextFactoryBuilder.createInitialContextFactory(InitialContextFactoryBuilder.java:62)
                      at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:664) [rt.jar:1.6.0_35]
                      at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288) [rt.jar:1.6.0_35]
                      at javax.naming.InitialContext.init(InitialContext.java:223) [rt.jar:1.6.0_35]
                      at javax.naming.InitialContext.<init>(InitialContext.java:197) [rt.jar:1.6.0_35]
                      at com.wellsfargo.dd.base.util.startup.MQBaseProps.connectToLocalWeblogicServer(MQBaseProps.java:411) [classes:]
                      at com.wellsfargo.dd.base.util.startup.MQEnvProps.start(MQEnvProps.java:75) [classes:]
                      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_35]
                      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_35]
                      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_35]
                      at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_35]
                      at org.jboss.as.ee.component.ManagedReferenceLifecycleMethodInterceptorFactory$ManagedReferenceLifecycleMethodInterceptor.processInvocation(ManagedReferenceLifecycleMethodInterceptorFactory.java:130) [jboss-as-ee-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
                      at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
                      at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
                      at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
                      at org.jboss.as.ee.component.ManagedReferenceInterceptorFactory$ManagedReferenceInterceptor.processInvocation(ManagedReferenceInterceptorFactory.java:95) [jboss-as-ee-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
                      at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
                      at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
                      at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
                      at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50) [jboss-as-ee-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
                      at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
                      at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:251) [jboss-as-ejb3-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
                      at org.jboss.as.ejb3.tx.CMTTxInterceptor.requiresNew(CMTTxInterceptor.java:354) [jboss-as-ejb3-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
                      at org.jboss.as.ejb3.tx.LifecycleCMTTxInterceptor.processInvocation(LifecycleCMTTxInterceptor.java:66) [jboss-as-ejb3-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
                      at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
                      at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41) [jboss-as-ejb3-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
                      at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
                      at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45) [jboss-as-ee-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
                      at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
                      at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
                      at org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:161) [jboss-as-ee-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
                      at org.jboss.as.ee.component.BasicComponent.createInstance(BasicComponent.java:85) [jboss-as-ee-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
                      at org.jboss.as.ejb3.component.singleton.SingletonComponent.getComponentInstance(SingletonComponent.java:118) [jboss-as-ejb3-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
                      at org.jboss.as.ejb3.component.singleton.SingletonComponent.start(SingletonComponent.java:133) [jboss-as-ejb3-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
                      at org.jboss.as.ee.component.ComponentStartService$1.run(ComponentStartService.java:54) [jboss-as-ee-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
                      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) [rt.jar:1.6.0_35]
                      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [rt.jar:1.6.0_35]
                      at java.util.concurrent.FutureTask.run(FutureTask.java:138) [rt.jar:1.6.0_35]
                      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_35]
                      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_35]
                      at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_35]
                      at org.jboss.threads.JBossThread.run(JBossThread.java:122)
            Caused by: java.lang.NoClassDefFoundError: com/sun/corba/se/spi/legacy/connection/ORBSocketFactory
                      at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.6.0_35]
                      at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) [rt.jar:1.6.0_35]
                      at java.lang.ClassLoader.defineClass(ClassLoader.java:615) [rt.jar:1.6.0_35]
                      at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) [rt.jar:1.6.0_35]
                      at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:327) [jboss-modules.jar:1.1.3.GA]
                      at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:391) [jboss-modules.jar:1.1.3.GA]
                      ... 62 more
            Caused by: java.lang.ClassNotFoundException: com.sun.corba.se.spi.legacy.connection.ORBSocketFactory from [Module "com.weblogic.context:main" from local module loader @193a66f (roots: H:\softwares\jboss-as-7.2.0\modules)]
                      at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) [jboss-modules.jar:1.1.3.GA]
                      at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules.jar:1.1.3.GA]
                      at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) [jboss-modules.jar:1.1.3.GA]
                      at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423) [jboss-modules.jar:1.1.3.GA]
                      at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423) [jboss-modules.jar:1.1.3.GA]
                      at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) [jboss-modules.jar:1.1.3.GA]
                      at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) [jboss-modules.jar:1.1.3.GA]
                      ... 68 more
            
            
            09:52:28,168 ERROR [stderr] (ServerService Thread Pool -- 68) java.lang.ClassNotFoundException: org.jacorb.orb.ORB from [Module "com.weblogic.context:main" from local module loader @193a66f (roots: H:\softwares\jboss-as-7.2.0\modules)]
            
            
            09:52:28,168 ERROR [stderr] (ServerService Thread Pool -- 68)           at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
            
            
            09:52:28,184 ERROR [stderr] (ServerService Thread Pool -- 68)           at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
            
            
            09:52:28,184 ERROR [stderr] (ServerService Thread Pool -- 68)           at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
            
            
            09:52:28,184 ERROR [stderr] (ServerService Thread Pool -- 68)           at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423)
            
            
            09:52:28,200 ERROR [stderr] (ServerService Thread Pool -- 68)           at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
            
            
            09:52:28,200 ERROR [stderr] (ServerService Thread Pool -- 68)           at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
            
            
            09:52:28,200 ERROR [stderr] (ServerService Thread Pool -- 68)           at java.lang.Class.forName0(Native Method)
            
            
            09:52:28,215 ERROR [stderr] (ServerService Thread Pool -- 68)           at java.lang.Class.forName(Class.java:247)
            
            
            09:52:28,231 ERROR [stderr] (ServerService Thread Pool -- 68)           at org.omg.CORBA.ORB.create(ORB.java:97)
            
            
            09:52:28,231 ERROR [stderr] (ServerService Thread Pool -- 68)           at org.omg.CORBA.ORB.init(ORB.java:60)
            
            
            09:52:28,231 ERROR [stderr] (ServerService Thread Pool -- 68)           at weblogic.corba.j2ee.naming.ORBHelper.createORB(ORBHelper.java:420)
            
            
            09:52:28,246 ERROR [stderr] (ServerService Thread Pool -- 68)           at weblogic.corba.j2ee.naming.ORBHelper.getORBReferenceWithRetry(ORBHelper.java:567)
            
            
            09:52:28,246 ERROR [stderr] (ServerService Thread Pool -- 68)           at weblogic.corba.j2ee.naming.ORBHelper.getORBReference(ORBHelper.java:543)
            
            
            09:52:28,246 ERROR [stderr] (ServerService Thread Pool -- 68)           at weblogic.corba.j2ee.naming.InitialContextFactoryImpl.getInitialContext(InitialContextFactoryImpl.java:85)
            
            
            09:52:28,262 ERROR [stderr] (ServerService Thread Pool -- 68)           at weblogic.corba.j2ee.naming.InitialContextFactoryImpl.getInitialContext(InitialContextFactoryImpl.java:31)
            
            
            09:52:28,262 ERROR [stderr] (ServerService Thread Pool -- 68)           at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:41)
            
            
            09:52:28,262 ERROR [stderr] (ServerService Thread Pool -- 68)           at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
            
            
            09:52:28,262 ERROR [stderr] (ServerService Thread Pool -- 68)           at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
            
            
            09:52:28,278 ERROR [stderr] (ServerService Thread Pool -- 68)           at javax.naming.InitialContext.init(InitialContext.java:223)
            
            
            09:52:28,278 ERROR [stderr] (ServerService Thread Pool -- 68)           at javax.naming.InitialContext.<init>(InitialContext.java:197)
            
            
            09:52:28,278 ERROR [stderr] (ServerService Thread Pool -- 68)           at com.wellsfargo.dd.base.util.startup.MQBaseProps.connectToLocalWeblogicServer(MQBaseProps.java:411)
            
            
            09:52:28,278 ERROR [stderr] (ServerService Thread Pool -- 68)           at com.wellsfargo.dd.base.util.startup.MQEnvProps.start(MQEnvProps.java:75)
            
            
            09:52:28,293 ERROR [stderr] (ServerService Thread Pool -- 68)           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            
            
            09:52:28,309 ERROR [stderr] (ServerService Thread Pool -- 68)           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            
            
            09:52:28,309 ERROR [stderr] (ServerService Thread Pool -- 68)           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            
            
            09:52:28,309 ERROR [stderr] (ServerService Thread Pool -- 68)           at jav
            
            

             

            My guess is that may be some of the classes in wlclient.jar are overriding the jboss classes.

            Please suggest.

            • 3. Re: Unable to get weblogic initialcontext from jboss-as-7.2.0.Alpha1-SNAPSHOT
              Nicklas Karlsson Master

              That class is part of the JDK so you might want to try to add

               

                 <dependencies>

                      <system export="true">

                          <paths>

                             <path name="com/sun/corba"/>

               

              to the module.xml in the sun.jdk module

              • 4. Re: Unable to get weblogic initialcontext from jboss-as-7.2.0.Alpha1-SNAPSHOT
                Prasad M Newbie

                I had already tried by adding the following path: <path name="com/sun/corba/se/spi/legacy/connection"/> but with no luck.

                I just tried by following your suggestion of adding the path: <path name="com/sun/corba"/> but still getting the same issue.

                Below is the part of the stacktrace:

                 

                Caused by: java.lang.NoClassDefFoundError: com/sun/corba/se/spi/legacy/connection/ORBSocketFactory
                          at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.6.0_35]
                          at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) [rt.jar:1.6.0_35]
                          at java.lang.ClassLoader.defineClass(ClassLoader.java:615) [rt.jar:1.6.0_35]
                          at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) [rt.jar:1.6.0_35]
                          at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:327) [jboss-modules.jar:1.1.3.GA]
                          at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:391) [jboss-modules.jar:1.1.3.GA]
                          ... 45 more
                
                

                 

                On further experimenting I found that If i remove the 'org.jboss.as.jacorb' & 'org.omg.api' modules from jboss-deployemnt-structure.xml, I don't notice 'java.lang.NoClassDefFoundError: com/sun/corba/se/spi/legacy/connection/ORBSocketFactory' issue but getting the below exception:

                 

                java.lang.NoClassDefFoundError: org/omg/PortableInterceptor/ORBInitializer
                

                 

                If i add any of the orb moudles back then I am getting 'java.lang.NoClassDefFoundError: com/sun/corba/se/spi/legacy/connection/ORBSocketFactory' issue.