1 Reply Latest reply on Sep 29, 2008 4:20 AM by Armin Vogt

    Cannot load @Remote interfaces with remote class loader into

    Armin Vogt Newbie

      Im looking desperately for a solution to my problem:

      I tried to lookup an session bean - named ServiceEjb - from which i only have one @Remote interface in my class loader (ie. in the ear or in the unit test runner) from within another session bean, say the SessionBeanFactory.

      That session bean - named ServiceEjb - implements other @Remote interfaces. But i dont care for them. My code is like the user of the factory pattern: InitialContext().lookup() ist the factory, i get an session bean, i communicate with it across the one @Remote interface known to me.

      Reason why the other @Remote interface needs to be loaded is that the deserialized statelessproxystub references it in its internals.

      When I activate remote class loading ... i can see that the referenced session bean interfaces get remotely downloaded... but they are not available for the container that hosts the referencing session bean.

      I have a complete example project I can offer to anyone interested (unfortunately one cannot attach files here). So please ask.


      java.lang.RuntimeException: javax.naming.NamingException: Could not dereference object [Root exception is java.lang.ClassNotFoundExcep
      remote.classloading.problem.integration.remote.UnknownRemoteInterface]
       at remote.classloading.problem.integration.ear2.SessionBeanFactoryEjb.createBean(SessionBeanFactoryEjb.java:27)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
       at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
       at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
       at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:95)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
       at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:304)
       at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106)
       at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
       at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:809)
       at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:572)
       at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:373)
       at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:166)
       at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:163)
       at org.jboss.remoting.Client.invoke(Client.java:1634)
       at org.jboss.remoting.Client.invoke(Client.java:548)
       at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:62)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:67)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:53)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:74)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:107)
       at $Proxy6.createBean(Unknown Source)
       at remote.classloading.problem.integration.SessionBeanFactoryTest.testLookupWithoutInterface(SessionBeanFactoryTest.java:25)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)



      Here the server tells us that he is loading class bytecode.

      00:16:18,203 DEBUG [MarshallerLoaderHandler] MarshallerLoaderHandler received invocation with param of load_class and data type of
       null
      00:16:18,203 DEBUG [MarshallerLoaderHandler] MarshallerLoaderHandler: loading class: remote.classloading.problem.integration.remot
      e.UnknownRemoteInterface
      00:16:18,203 DEBUG [MarshallerLoaderHandler] searching repository integration:loader=integration-1.0.EAR
      00:16:18,203 DEBUG [MarshallerLoaderHandler] found class in repository integration:loader=integration-1.0.EAR
      00:16:18,203 DEBUG [MarshallerLoaderHandler] MarshallerLoaderHandler: returning class: remote.classloading.problem.integration.rem
      ote.UnknownRemoteInterface: ClassBytes [class=remote.classloading.problem.integration.remote.UnknownRemoteInterface,value=[B@9f6c2
      b]
      00:16:18,203 DEBUG [ClassByteClassLoader] loaded from network: ClassBytes [class=remote.classloading.problem.integration.remote.Un
      knownRemoteInterface,value=[B@18b9d9b]
      00:16:18,203 DEBUG [ClassByteClassLoader] attempting to load from network: remote.classloading.problem.integration.remote.KnownRem
      oteInterface



      In the deploy/ejb3.deployer/META-INF/jboss-service.xml I put this configuration:
       <mbean code="org.jboss.remoting.transport.Connector"
       name="jboss.remoting:type=Connector,name=DefaultEjb3Connector,handler=ejb3">
       <depends>jboss.aop:service=AspectDeployer</depends>
       <attribute name="Configuration">
       <config>
       <invoker transport="socket">
       <attribute name="loaderport" isParam="true">4873</attribute>
       <attribute name="serverBindAddress">${jboss.bind.address}</attribute>
       <attribute name="serverBindPort">3873</attribute>
       <attribute name="numAcceptThreads">2</attribute>
       <attribute name="maxPoolSize">300</attribute>
       <attribute name="clientMaxPoolSize" isParam="true">50</attribute>
       <attribute name="timeout" isParam="true">120000</attribute>
       <attribute name="serializationtype" isParam="true">java</attribute>
       <attribute name="byvalue" isParam="true">true</attribute>
       <attribute name="force_remote" isParam="true">true</attribute>
       </invoker>
      
       <repositories>
       <repository>integration:loader=integration-1.0.EAR</repository>
       </repositories>
      
       <handlers>
       <handler subsystem="AOP">org.jboss.aspects.remoting.AOPRemotingInvocationHandler</handler>
       </handlers>
       </config>
       </attribute>
       </mbean>


      The server jboss starts with
      set JAVA_OPTS=-Djava.security.manager=java.rmi.RMISecurityManager -Djava.security.policy=server.policy %JAVA_OPTS%



        • 1. Re: Cannot load @Remote interfaces with remote class loader
          Armin Vogt Newbie

          If the lookup takes place outside of the ejb container, i.e. in an unit test, the lookup succeeds and the unknown remote interface gets loaded by the rmi class loader.

          21:28:30,859 DEBUG [ClassByteClassLoader] attempting to load from network: remote.classloading.problem.integration.remote.KnownRem
          oteInterface
          21:28:30,875 DEBUG [MarshallerLoaderHandler] MarshallerLoaderHandler received invocation with param of load_class and data type of
           null
          21:28:30,875 DEBUG [MarshallerLoaderHandler] MarshallerLoaderHandler: loading class: remote.classloading.problem.integration.remot
          e.KnownRemoteInterface
          21:28:30,875 DEBUG [MarshallerLoaderHandler] searching repository integration:loader=integration-1.0.EAR
          21:28:30,875 DEBUG [MarshallerLoaderHandler] found class in repository integration:loader=integration-1.0.EAR
          21:28:30,875 DEBUG [MarshallerLoaderHandler] MarshallerLoaderHandler: returning class: remote.classloading.problem.integration.rem
          ote.KnownRemoteInterface: ClassBytes [class=remote.classloading.problem.integration.remote.KnownRemoteInterface,value=[B@62a94b]
          21:28:30,875 DEBUG [ClassByteClassLoader] loaded from network: ClassBytes [class=remote.classloading.problem.integration.remote.Kn
          ownRemoteInterface,value=[B@f140d0]
          21:28:30,937 DEBUG [InvokerRegistry] removed SocketClientInvoker[1d9e3d9, socket://localhost:3873] from registry
          21:28:30,937 DEBUG [MicroSocketClientInvoker] SocketClientInvoker[1d9e3d9, socket://localhost:3873] disconnecting ...
          21:28:30,937 DEBUG [ServerThread] WorkerThread#1[127.0.0.1:4909] closing socketWrapper: ServerSocketWrapper[Socket[addr=/127.0.0.1
          ,port=4909,localport=4873].112a81c]
          21:28:30,937 DEBUG [ServerSocketWrapper] wrote CLOSING


          That concludes:
          the server-side of the problem works: the missing class is served and made available for remote class loading.
          the client side - when the client is the lookup - failes, once the lookup takes place within the ejb container (from the stateful session bean, using the EJBContext.lookup(name) method).

          Why can't the ejb container accept the served classbytes? where is he 'ignoring' them - because as you can see they are requested and then served to the client.


          Here is the exception when i do this:
          @Stateless
          public class SessionBeanFactoryEjb implements SessionBeanFactory {

          @Resource
          EJBContext ejbContext;
          @Resource
          SessionContext session;

          public void createBean(String jndiName) {
          try {
          Object lookup = new InitialContext().lookup(jndiName);
          KnownRemoteInterface vbean = (KnownRemoteInterface) lookup;
          assert null != vbean;
          String doService = vbean.doService();
          assert doService != null;
          } catch (Exception e) {
          throw new RuntimeException(e);
          }

          }
          }


          javax.ejb.EJBException: java.lang.RuntimeException: javax.naming.NamingException: Could not dereference object [Root exception is java.lang.ClassNotFoundException: remote.classloading.problem.integration.remote.UnknownRemoteInterface]; nested exception is: java.lang.RuntimeException: javax.naming.NamingException: Could not dereference object [Root exception is java.lang.ClassNotFoundException: remote.classloading.problem.integration.remote.UnknownRemoteInterface]
          java.lang.RuntimeException: javax.naming.NamingException: Could not dereference object [Root exception is java.lang.ClassNotFoundException: remote.classloading.problem.integration.remote.UnknownRemoteInterface]
           at remote.classloading.problem.integration.ear2.SessionBeanFactoryEjb.createBean(SessionBeanFactoryEjb.java:27)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
           at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
           at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
           at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:95)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
           at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:304)
           at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106)
           at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
           at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:809)
           at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:572)
           at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:373)
           at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:166)
           at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:163)
           at org.jboss.remoting.Client.invoke(Client.java:1634)
           at org.jboss.remoting.Client.invoke(Client.java:548)
           at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:62)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:67)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:53)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:74)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:107)
           at $Proxy6.createBean(Unknown Source)
           at remote.classloading.problem.integration.SessionBeanFactoryTest.testLookupWithoutInterface(SessionBeanFactoryTest.java:25)
           at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:74)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:67)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:53)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:74)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:107)
           at $Proxy6.createBean(Unknown Source)
           at remote.classloading.problem.integration.SessionBeanFactoryTest.testLookupWithoutInterface(SessionBeanFactoryTest.java:25)
          Caused by: javax.naming.NamingException: Could not dereference object [Root exception is java.lang.ClassNotFoundException: remote.classloading.problem.integration.remote.UnknownRemoteInterface]
           at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1298)
           at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:763)
           at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
           at javax.naming.InitialContext.lookup(InitialContext.java:392)
           at remote.classloading.problem.integration.ear2.SessionBeanFactoryEjb.createBean(SessionBeanFactoryEjb.java:21)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
           at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
           at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
           at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:95)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
           at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:304)
           at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106)
           at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
           at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:809)
           at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:572)
           at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:373)
           at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:166)
          Caused by: java.lang.ClassNotFoundException: remote.classloading.problem.integration.remote.UnknownRemoteInterface
           at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
           at java.security.AccessController.doPrivileged(Native Method)
           at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
           at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
           at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
           at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
           at java.lang.Class.forName0(Native Method)
           at java.lang.Class.forName(Class.java:247)
           at sun.rmi.server.LoaderHandler.loadProxyInterfaces(LoaderHandler.java:711)
           at sun.rmi.server.LoaderHandler.loadProxyClass(LoaderHandler.java:655)
           at sun.rmi.server.LoaderHandler.loadProxyClass(LoaderHandler.java:592)
           at java.rmi.server.RMIClassLoader$2.loadProxyClass(RMIClassLoader.java:628)
           at org.jboss.system.JBossRMIClassLoader.loadProxyClass(JBossRMIClassLoader.java:82)
           at java.rmi.server.RMIClassLoader.loadProxyClass(RMIClassLoader.java:294)
           at sun.rmi.server.MarshalInputStream.resolveProxyClass(MarshalInputStream.java:238)
           at java.io.ObjectInputStream.readProxyDesc(ObjectInputStream.java:1531)
           at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1493)
           at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1732)
           at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
           at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
           at java.rmi.MarshalledObject.get(MarshalledObject.java:142)
           at org.jnp.interfaces.MarshalledValuePair.get(MarshalledValuePair.java:72)
           at org.jboss.ejb3.JndiProxyFactory.getObjectInstance(JndiProxyFactory.java:55)
           at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
           at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1273)
           at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1290)
           ... 37 more
          javax.ejb.EJBException: java.lang.RuntimeException: javax.naming.NamingException: Could not dereference object [Root exception is java.lang.ClassNotFoundException: remote.classloading.problem.integration.remote.UnknownRemoteInterface]; nested exception is: java.lang.RuntimeException: javax.naming.NamingException: Could not dereference object [Root exception is java.lang.ClassNotFoundException: remote.classloading.problem.integration.remote.UnknownRemoteInterface]
           at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:63)
           at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:83)
           at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:95)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
           at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:304)
           at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106)
           at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
           at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:809)
           at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:572)
           at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:373)
           at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:166)
          Caused by: java.lang.RuntimeException: javax.naming.NamingException: Could not dereference object [Root exception is java.lang.ClassNotFoundException: remote.classloading.problem.integration.remote.UnknownRemoteInterface]
           at remote.classloading.problem.integration.ear2.SessionBeanFactoryEjb.createBean(SessionBeanFactoryEjb.java:27)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
           at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
           at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
           at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:95)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
           at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:304)
           at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106)
           at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
           at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:809)
           at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:572)
           at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:373)
           at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:166)
           at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:163)
           at org.jboss.remoting.Client.invoke(Client.java:1634)
           at org.jboss.remoting.Client.invoke(Client.java:548)
           at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:62)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:67)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:53)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:74)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:107)
           at $Proxy6.createBean(Unknown Source)
           at remote.classloading.problem.integration.SessionBeanFactoryTest.testLookupWithoutInterface(SessionBeanFactoryTest.java:25)
           at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:74)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:67)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:53)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:74)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:107)
           at $Proxy6.createBean(Unknown Source)
           at remote.classloading.problem.integration.SessionBeanFactoryTest.testLookupWithoutInterface(SessionBeanFactoryTest.java:25)
          Caused by: javax.naming.NamingException: Could not dereference object [Root exception is java.lang.ClassNotFoundException: remote.classloading.problem.integration.remote.UnknownRemoteInterface]
           at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1298)
           at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:763)
           at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
           at javax.naming.InitialContext.lookup(InitialContext.java:392)
           at remote.classloading.problem.integration.ear2.SessionBeanFactoryEjb.createBean(SessionBeanFactoryEjb.java:21)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
           at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
           at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
           at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:95)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
           at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:304)
           at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106)
           at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
           at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:809)
           at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:572)
           at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:373)
           at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:166)
          Caused by: java.lang.ClassNotFoundException: remote.classloading.problem.integration.remote.UnknownRemoteInterface
           at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
           at java.security.AccessController.doPrivileged(Native Method)
           at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
           at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
           at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
           at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
           at java.lang.Class.forName0(Native Method)
           at java.lang.Class.forName(Class.java:247)
           at sun.rmi.server.LoaderHandler.loadProxyInterfaces(LoaderHandler.java:711)
           at sun.rmi.server.LoaderHandler.loadProxyClass(LoaderHandler.java:655)
           at sun.rmi.server.LoaderHandler.loadProxyClass(LoaderHandler.java:592)
           at java.rmi.server.RMIClassLoader$2.loadProxyClass(RMIClassLoader.java:628)
           at org.jboss.system.JBossRMIClassLoader.loadProxyClass(JBossRMIClassLoader.java:82)
           at java.rmi.server.RMIClassLoader.loadProxyClass(RMIClassLoader.java:294)
           at sun.rmi.server.MarshalInputStream.resolveProxyClass(MarshalInputStream.java:238)
           at java.io.ObjectInputStream.readProxyDesc(ObjectInputStream.java:1531)
           at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1493)
           at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1732)
           at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
           at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
           at java.rmi.MarshalledObject.get(MarshalledObject.java:142)
           at org.jnp.interfaces.MarshalledValuePair.get(MarshalledValuePair.java:72)
           at org.jboss.ejb3.JndiProxyFactory.getObjectInstance(JndiProxyFactory.java:55)
           at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
           at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1273)
           at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1290)
           ... 37 more