<div dir="ltr">It seems that <a href="https://docs.jboss.org/jbossas/javadoc/7.1.2.Final/org/jboss/com/sun/corba/se/impl/corba/CORBAObjectImpl.html">https://docs.jboss.org/jbossas/javadoc/7.1.2.Final/org/jboss/com/sun/corba/se/impl/corba/CORBAObjectImpl.html</a> does implement <a href="http://docs.oracle.com/javase/7/docs/api/org/omg/CORBA/Object.html">http://docs.oracle.com/javase/7/docs/api/org/omg/CORBA/Object.html</a> so my guess is that the org.omg.CORBA classes are coming out of a different classloader to the com.sun.corba.se.impl.corba ones.</div><div class="gmail_extra"><br><div class="gmail_quote">On 15 February 2016 at 12:14, Michael Musgrove <span dir="ltr"><<a href="mailto:mmusgrov@redhat.com" target="_blank">mmusgrov@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thanks,<div><br></div><div>That has got me much further. Now I can successfully lookup the EJB that is on WLS but when I narrow (using PortableRemoteObject.narrow) the object I get java.lang.ClassCastException: com.sun.corba.se.impl.corba.CORBAObjectImpl cannot be cast to org.omg.CORBA.Object</div><div><br></div><div>I guess that is a different issue but I cannot figure out how to proceed - any ideas?</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 15, 2016 at 9:50 AM, Stuart Douglas <span dir="ltr"><<a href="mailto:stuart.w.douglas@gmail.com" target="_blank">stuart.w.douglas@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Did you try adding <span style="font-size:12.8px">com.sun.corba.se.internal.Interceptors to the jboss-deployment-structure.xml file?<span><font color="#888888"><br><br></font></span></span></div><span><font color="#888888"><span style="font-size:12.8px">Stuart<br></span></font></span></div><div><div><br><div class="gmail_quote"><div dir="ltr">On Mon, 15 Feb 2016 at 20:27 Michael Musgrove <<a href="mailto:mmusgrov@redhat.com" target="_blank">mmusgrov@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Wait you asked for the stacktrace when I include the dependency in <span style="font-size:12.8px">jboss-deployment-structure.xml, sorry - here is the error when I do that:</span><div><span style="font-size:12.8px"><br></span><div><div><span style="font-size:12.8px">2016-02-15 09:24:15,210 SEVERE [support.jboss.ejb.session.SessionBean] (p: default-threadpool; w: Idle) WFLYNAM0027: Failed instantiate InitialContextFactory com.sun.jndi.cosnaming.CNCtxFactory from classloader ModuleClassLoader for Module "deployment.jboss.eap-1.0-SNAPSHOT.jar:main" from Service Module Loader: javax.naming.NamingException: WFLYNAM0027: Failed instantiate InitialContextFactory com.sun.jndi.cosnaming.CNCtxFactory from classloader ModuleClassLoader for Module "deployment.jboss.eap-1.0-SNAPSHOT.jar:main" from Service Module Loader [Root exception is org.omg.CORBA.INITIALIZE: can't instantiate default ORB implementation com.sun.corba.se.internal.Interceptors.PIORB vmcid: 0x0 minor code: 0 completed: No]</span></div></div></div></div><div dir="ltr"><div><div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.as.naming.InitialContext.getDefaultInitCtx(InitialContext.java:118)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.as.naming.InitialContext.init(InitialContext.java:99)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at javax.naming.ldap.InitialLdapContext.<init>(InitialLdapContext.java:154)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.as.naming.InitialContext.<init>(InitialContext.java:89)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.as.naming.InitialContextFactory.getInitialContext(InitialContextFactory.java:43)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:684)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:313)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at javax.naming.InitialContext.init(InitialContext.java:244)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at javax.naming.InitialContext.<init>(InitialContext.java:216)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at support.jboss.ejb.session.SessionBean.getRemoteSession(SessionBean.java:289)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at support.jboss.ejb.session.SessionBean.test(SessionBean.java:156)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at java.lang.reflect.Method.invoke(Method.java:497)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:437)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:82)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:93)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.as.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:437)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:73)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:83)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.as.ee.concurrent.ConcurrentContextInterceptor.processInvocation(ConcurrentContextInterceptor.java:45)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:52)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:51)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:275)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:327)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:239)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.as.ejb3.remote.EJBRemoteTransactionPropagatingInterceptor.processInvocation(EJBRemoteTransactionPropagatingInterceptor.java:79)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.as.ejb3.component.invocationmetrics.WaitTimeInterceptor.processInvocation(WaitTimeInterceptor.java:43)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:100)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.as.ejb3.deployment.processors.EjbSuspendInterceptor.processInvocation(EjbSuspendInterceptor.java:44)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:66)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.as.ejb3.component.interceptors.EjbExceptionTransformingInterceptorFactories$1.processInvocation(EjbExceptionTransformingInterceptorFactories.java:75)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.as.ejb3.iiop.EjbIIOPTransactionInterceptor.processInvocation(EjbIIOPTransactionInterceptor.java:71)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:54)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.ContextClassLoaderInterceptor.processInvocation(ContextClassLoaderInterceptor.java:64)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:356)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:636)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.AccessCheckingInterceptor.processInvocation(AccessCheckingInterceptor.java:61)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:356)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.PrivilegedWithCombinerInterceptor.processInvocation(PrivilegedWithCombinerInterceptor.java:80)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:195)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.as.ejb3.iiop.EjbCorbaServant._invoke(EjbCorbaServant.java:318)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at com.sun.corba.se.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:654)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at com.sun.corba.se.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:205)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1700)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1558)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:940)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at com.sun.corba.se.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:198)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:712)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:471)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1230)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.performWork(ThreadPoolImpl.java:490)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:519)</span></div></div></div></div><div dir="ltr"><div><div><div><span style="font-size:12.8px">Caused by: org.omg.CORBA.INITIALIZE: can't instantiate default ORB implementation com.sun.corba.se.internal.Interceptors.PIORB vmcid: 0x0 minor code: 0 completed: No</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.omg.CORBA.ORB.create_impl(ORB.java:311)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.omg.CORBA.ORB.init(ORB.java:351)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at com.sun.jndi.toolkit.corba.CorbaUtils.getOrb(CorbaUtils.java:203)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at com.sun.jndi.cosnaming.CNCtx.getDefaultOrb(CNCtx.java:71)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at com.sun.jndi.cosnaming.CNCtx.initOrbAndRootContext(CNCtx.java:235)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at com.sun.jndi.cosnaming.CNCtx.<init>(CNCtx.java:105)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at com.sun.jndi.cosnaming.CNCtxFactory.getInitialContext(CNCtxFactory.java:49)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.jboss.as.naming.InitialContext.getDefaultInitCtx(InitialContext.java:114)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>... 87 more</span></div><div><span style="font-size:12.8px">Caused by: java.lang.ClassCastException: class com.sun.corba.se.internal.Interceptors.PIORB</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at java.lang.Class.asSubclass(Class.java:3404)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>at org.omg.CORBA.ORB.create_impl(ORB.java:308)</span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>... 94 more</span></div><div style="font-size:12.8px"><br></div></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px"><br></span></div><div><div><br></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 15, 2016 at 9:23 AM, Michael Musgrove <span dir="ltr"><<a href="mailto:mmusgrov@redhat.com" target="_blank">mmusgrov@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>The lookup code is:</div><div><br></div><div><div> private ISession getRemoteSession() throws Throwable {</div><div> final Properties env = new Properties();</div><div> env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.cosnaming.CNCtxFactory");</div><div> env.put(Context.PROVIDER_URL, "corbaloc::localhost:7001/NameService");</div><div><br></div><div> final InitialContext context = new InitialContext(env);</div><div> final Object iiopObj = context.lookup("SessionBean");</div><div> return ISessionHome.class.cast(javax.rmi.PortableRemoteObject.narrow(iiopObj, ISessionHome.class)).create();</div><div> }</div></div><div><br></div><div>and the stacktrace is:</div><div><br></div><div>2016-02-15 09:18:47,720 SEVERE [support.jboss.ejb.session.SessionBean] (p: default-threadpool; w: Idle) WFLYNAM0027: Failed instantiate InitialContextFactory com.sun.jndi.cosnaming.CNCtxFactory from classloader ModuleClassLoader for Module "deployment.jboss.eap-1.0-SNAPSHOT.jar:main" from Service Module Loader: javax.naming.NamingException: WFLYNAM0027: Failed instantiate InitialContextFactory com.sun.jndi.cosnaming.CNCtxFactory from classloader ModuleClassLoader for Module "deployment.jboss.eap-1.0-SNAPSHOT.jar:main" from Service Module Loader [Root exception is java.lang.ClassNotFoundException: com.sun.jndi.cosnaming.CNCtxFactory from [Module "deployment.jboss.eap-1.0-SNAPSHOT.jar:main" from Service Module Loader]]</div><div><div><span style="white-space:pre-wrap">        </span>at org.jboss.as.naming.InitialContext.getDefaultInitCtx(InitialContext.java:118)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.as.naming.InitialContext.init(InitialContext.java:99)</div><div><span style="white-space:pre-wrap">        </span>at javax.naming.ldap.InitialLdapContext.<init>(InitialLdapContext.java:154)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.as.naming.InitialContext.<init>(InitialContext.java:89)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.as.naming.InitialContextFactory.getInitialContext(InitialContextFactory.java:43)</div><div><span style="white-space:pre-wrap">        </span>at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:684)</div><div><span style="white-space:pre-wrap">        </span>at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:313)</div><div><span style="white-space:pre-wrap">        </span>at javax.naming.InitialContext.init(InitialContext.java:244)</div><div><span style="white-space:pre-wrap">        </span>at javax.naming.InitialContext.<init>(InitialContext.java:216)</div><div><span style="white-space:pre-wrap">        </span>at support.jboss.ejb.session.SessionBean.getRemoteSession(SessionBean.java:289)</div><div><span style="white-space:pre-wrap">        </span>at support.jboss.ejb.session.SessionBean.test(SessionBean.java:156)</div><div><span style="white-space:pre-wrap">        </span>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)</div><div><span style="white-space:pre-wrap">        </span>at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)</div><div><span style="white-space:pre-wrap">        </span>at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)</div><div><span style="white-space:pre-wrap">        </span>at java.lang.reflect.Method.invoke(Method.java:497)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:437)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:82)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:93)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.as.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:437)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:73)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:83)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.as.ee.concurrent.ConcurrentContextInterceptor.processInvocation(ConcurrentContextInterceptor.java:45)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:52)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:51)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:275)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:327)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:239)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.as.ejb3.remote.EJBRemoteTransactionPropagatingInterceptor.processInvocation(EJBRemoteTransactionPropagatingInterceptor.java:79)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.as.ejb3.component.invocationmetrics.WaitTimeInterceptor.processInvocation(WaitTimeInterceptor.java:43)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:100)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.as.ejb3.deployment.processors.EjbSuspendInterceptor.processInvocation(EjbSuspendInterceptor.java:44)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:66)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.as.ejb3.component.interceptors.EjbExceptionTransformingInterceptorFactories$1.processInvocation(EjbExceptionTransformingInterceptorFactories.java:75)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.as.ejb3.iiop.EjbIIOPTransactionInterceptor.processInvocation(EjbIIOPTransactionInterceptor.java:71)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:54)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.ContextClassLoaderInterceptor.processInvocation(ContextClassLoaderInterceptor.java:64)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:356)</div><div><span style="white-space:pre-wrap">        </span>at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:636)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.AccessCheckingInterceptor.processInvocation(AccessCheckingInterceptor.java:61)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:356)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.PrivilegedWithCombinerInterceptor.processInvocation(PrivilegedWithCombinerInterceptor.java:80)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:195)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.as.ejb3.iiop.EjbCorbaServant._invoke(EjbCorbaServant.java:318)</div><div><span style="white-space:pre-wrap">        </span>at com.sun.corba.se.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:654)</div><div><span style="white-space:pre-wrap">        </span>at com.sun.corba.se.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:205)</div><div><span style="white-space:pre-wrap">        </span>at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1700)</div><div><span style="white-space:pre-wrap">        </span>at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1558)</div><div><span style="white-space:pre-wrap">        </span>at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:940)</div><div><span style="white-space:pre-wrap">        </span>at com.sun.corba.se.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:198)</div><div><span style="white-space:pre-wrap">        </span>at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:712)</div><div><span style="white-space:pre-wrap">        </span>at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:471)</div><div><span style="white-space:pre-wrap">        </span>at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1230)</div><div><span style="white-space:pre-wrap">        </span>at com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.performWork(ThreadPoolImpl.java:490)</div><div><span style="white-space:pre-wrap">        </span>at com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:519)</div><div>Caused by: java.lang.ClassNotFoundException: com.sun.jndi.cosnaming.CNCtxFactory from [Module "deployment.jboss.eap-1.0-SNAPSHOT.jar:main" from Service Module Loader]</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:205)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:455)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:404)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:385)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:130)</div><div><span style="white-space:pre-wrap">        </span>at java.lang.Class.forName0(Native Method)</div><div><span style="white-space:pre-wrap">        </span>at java.lang.Class.forName(Class.java:348)</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.as.naming.InitialContext.getDefaultInitCtx(InitialContext.java:113)</div><div><span style="white-space:pre-wrap">        </span>... 87 more</div><div><br></div></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Feb 14, 2016 at 10:46 PM, Stuart Douglas <span dir="ltr"><<a href="mailto:stuart.w.douglas@gmail.com" target="_blank">stuart.w.douglas@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Oops, disregard that, looks like it is actually not defined in any of our pre-defined modules.<br><br></div><div>What is the full stack trace you get when you include the path in your jboss-deployment-structure.xml ? (and what does this file look like)<span><font color="#888888"><br></font></span></div><span><font color="#888888"><div><br></div>Stuart<br></font></span></div><div><div><br><div class="gmail_quote"><div dir="ltr">On Mon, 15 Feb 2016 at 09:44 Stuart Douglas <<a href="mailto:stuart.w.douglas@gmail.com" target="_blank">stuart.w.douglas@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>You should be able to use this if you have a dependency on the sun.jdk module.<br><br></div></div><div dir="ltr">Stuart<br></div><br><div class="gmail_quote"><div dir="ltr">On Mon, 15 Feb 2016 at 09:41 Michael Musgrove <<a href="mailto:mmusgrov@redhat.com" target="_blank">mmusgrov@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>I am attempting to lookup a remote EJB from WildFly to WLS.</div><div><br></div><div>If I use COSNaming as required by [1] (by setting INITIAL_CONTEXT_FACTORY to "com.sun.jndi.cosnaming.CNCtxFactory") I get the following error on the WildFly end:</div><div> "ClassNotFoundException: com.sun.jndi.cosnaming.CNCtxFactory"</div><div><br></div><div>If I use the default wildfly name service (new InitialContext().lookup("corbaname:iiop:localhost:7001/NameService#SessionBean")) I get the following error on the WLS end (presumably because I am not using CNCtxFactory):</div><div> "A RuntimeException was generated by the RMI server: weblogic.corba.cos.naming.RootNamingContextImpl.resolve([Lorg.omg.CosNaming.NameComponent"</div><div><br></div><div>I did try adding the CosNaming dependency (<path name="com/sun/jndi/cosnaming"/>) to modules/system/layers/base/sun/jdk/main/module.xml or to jboss-deployment-structure.xml in my deployment but that approach did not work.</div><div><br></div><div> </div><div>[1] row 3 of Table 2-1 in <a href="https://docs.oracle.com/cd/E13222_01/wls/docs81/rmi_iiop/rmiiiop2.html" style="border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:orange" target="_blank">https://docs.oracle.com/cd/E13222_01/wls/docs81/rmi_iiop/rmiiiop2.html</a></div><div><br></div>-- <br><div><div dir="ltr"><div>Michael Musgrove</div><div>Transactions Team</div><div>e: <a href="mailto:mmusgrov@redhat.com" target="_blank">mmusgrov@redhat.com</a></div><div>t: <a href="tel:%2B44%20191%20243%200870" value="+441912430870" target="_blank">+44 191 243 0870</a></div><div><br></div><div>Registered in England and Wales under Company Registration No. 03798903</div><div>Directors: Michael Cunningham (US), Paul Hickey (Ireland), Matt Parson</div><div>(US), Charles Peters (US)</div><div><br></div><div>Michael Cunningham (US), Charles Peters (US), Matt Parson (US), Michael O'Neill(Ireland)</div></div></div>
</div>
_______________________________________________<br>
wildfly-dev mailing list<br>
<a href="mailto:wildfly-dev@lists.jboss.org" target="_blank">wildfly-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/wildfly-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/wildfly-dev</a></blockquote></div></blockquote></div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr"><div>Michael Musgrove</div><div>Transactions Team</div><div>e: <a href="mailto:mmusgrov@redhat.com" target="_blank">mmusgrov@redhat.com</a></div><div>t: <a href="tel:%2B44%20191%20243%200870" value="+441912430870" target="_blank">+44 191 243 0870</a></div><div><br></div><div>Registered in England and Wales under Company Registration No. 03798903</div><div>Directors: Michael Cunningham (US), Paul Hickey (Ireland), Matt Parson</div><div>(US), Charles Peters (US)</div><div><br></div><div>Michael Cunningham (US), Charles Peters (US), Matt Parson (US), Michael O'Neill(Ireland)</div></div></div>
</div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr"><div>Michael Musgrove</div><div>Transactions Team</div><div>e: <a href="mailto:mmusgrov@redhat.com" target="_blank">mmusgrov@redhat.com</a></div><div>t: <a href="tel:%2B44%20191%20243%200870" value="+441912430870" target="_blank">+44 191 243 0870</a></div><div><br></div><div>Registered in England and Wales under Company Registration No. 03798903</div><div>Directors: Michael Cunningham (US), Paul Hickey (Ireland), Matt Parson</div><div>(US), Charles Peters (US)</div><div><br></div><div>Michael Cunningham (US), Charles Peters (US), Matt Parson (US), Michael O'Neill(Ireland)</div></div></div>
</div>
</blockquote></div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr"><div>Michael Musgrove</div><div>Transactions Team</div><div>e: <a href="mailto:mmusgrov@redhat.com" target="_blank">mmusgrov@redhat.com</a></div><div>t: <a href="tel:%2B44%20191%20243%200870" value="+441912430870" target="_blank">+44 191 243 0870</a></div><div><br></div><div>Registered in England and Wales under Company Registration No. 03798903</div><div>Directors: Michael Cunningham (US), Paul Hickey (Ireland), Matt Parson</div><div>(US), Charles Peters (US)</div><div><br></div><div>Michael Cunningham (US), Charles Peters (US), Matt Parson (US), Michael O'Neill(Ireland)</div></div></div>
</div>
</div></div><br>_______________________________________________<br>
wildfly-dev mailing list<br>
<a href="mailto:wildfly-dev@lists.jboss.org">wildfly-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/wildfly-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/wildfly-dev</a><br></blockquote></div><br></div>