8 Replies Latest reply on Aug 1, 2008 7:04 PM by Carlo de Wolf

    CNFE when using PojiProxy/Remoting

    Andrew Rubinger Master

      In integrating EJB3 Proxy w/ EJB3 Core I'm occasionally coming across a CNFE when making a remote invocation from the client to the Container.

      // Create a POJI Proxy to the Container
       Interceptor[] interceptors =
       {IsLocalProxyFactoryInterceptor.singleton, InvokeRemoteInterceptor.singleton};
       PojiProxy handler = new PojiProxy(this.getContainerName(), locator, interceptors);
       Class<?>[] interfaces = new Class<?>[]
       {InvokableContext.class};
       InvokableContext<? extends ContainerMethodInvocation> container = (InvokableContext<?>) Proxy.newProxyInstance(
       interfaces[0].getClassLoader(), interfaces, handler);
      ...
      
       // Invoke
       Object result = container.invoke(proxy, invokedMethod, args);
      


      Exception received is below. What do I need to do to get the RMI CL enabled, manually put a security manager in place?

      Caused by: java.lang.ClassNotFoundException: com.sun.ts.tests.ejb30.sec.stateful.common.lTest (no security manager: RMI class loader disabled)
       at sun.rmi.server.LoaderHandler.loadProxyClass(LoaderHandler.java:531)
       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:1500)
       at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1463)
       at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1699)
       at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
       at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1634)
       at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
       at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
       at java.rmi.MarshalledObject.get(MarshalledObject.java:135)
       at org.jboss.aop.joinpoint.MethodInvocation.getArguments(MethodInvocation.java:309)
       at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:118)
       at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
       at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:847)
       at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:681)
       at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:634)
       at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:459)
       at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:197)
       at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:203)
       at org.jboss.remoting.Client.invoke(Client.java:1685)
       at org.jboss.remoting.Client.invoke(Client.java:589)
       at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:60)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.ejb3.proxy.remoting.IsLocalProxyFactoryInterceptor.invoke(IsLocalProxyFactoryInterceptor.java:72)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:61)
       at $Proxy3.invoke(Unknown Source)
       at org.jboss.ejb3.proxy.handler.session.SessionSpecProxyInvocationHandlerBase.invoke(SessionSpecProxyInvocationHandlerBase.java:121)


      S,
      ALR