1 Reply Latest reply on May 9, 2006 4:35 PM by Anil Saldanha

    SSL Socket Factory changes

    Anil Saldanha Master

      Related to http://jira.jboss.com/jira/browse/JBAS-3190

      There is usage of Javaassist ProxyFactory to generate a proxy:

      org.jboss.security.ssl.DomainServerSocketFactory
      
      ------------------------------------------------------------
      DomainServerSocket handler = new DomainServerSocket(socket);
       ProxyFactory pf = new ProxyFactory();
       pf.setHandler(handler);
       pf.setSuperclass(SSLServerSocket.class);
       Class[] sig = {};
       Object[] args = {};
      
       SSLServerSocket proxy = null;
       try
       {
       proxy = (SSLServerSocket) pf.create(sig, args);
       }
       catch (Exception e)
       {
       IOException ioe = new IOException("Failed to create SSLServerSocket proxy");
       ioe.initCause(e);
       }
      -----------------------------------------------------------
      



      There is a null pointer exception in the Sun's RMI implementation because of the above:
      java.lang.NullPointerException
       at sun.rmi.transport.tcp.TCPEndpoint.newServerSocket(TCPEndpoint.java:62
      0)
       at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:231)^M
       at sun.rmi.transport.tcp.TCPTransport.exportObject(TCPTransport.java:178
      )
       at sun.rmi.transport.tcp.TCPEndpoint.exportObject(TCPEndpoint.java:382)
       at sun.rmi.transport.LiveRef.exportObject(LiveRef.java:116)
       at sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:14
      5)
       at sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:12
      9)
       at java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.
      java:275)
       at java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.
      java:206)
       at org.jboss.invocation.jrmp.server.JRMPInvoker.exportCI(JRMPInvoker.jav
      a:451)
       at org.jboss.invocation.jrmp.server.JRMPInvoker.startService(JRMPInvoker
      .java:373)
       at org.jboss.invocation.jrmp.server.JRMPInvoker$1.startService(JRMPInvok
      er.java:150)
      


      Related to:
      http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3941970

        • 1. Re: SSL Socket Factory changes
          Anil Saldanha Master

          With the fix on http://jira.jboss.com/jira/browse/JASSIST-18, the ProxyFactory issue with javassist seems to be fixed.

          But the SSL factory testcases still have an issue:

          2006-05-09 15:30:18,515 ERROR [org.jboss.security.ssl.DomainServerSocketFactory]
           Failed to create SSLServerSocket proxy
          java.lang.RuntimeException: by java.lang.NoClassDefFoundError: javassist/util/proxy/ProxyObject
           at javassist.util.proxy.ProxyFactory.createClass(ProxyFactory.java:173)
           at javassist.util.proxy.ProxyFactory.create(ProxyFactory.java:205)
           at org.jboss.security.ssl.DomainServerSocketFactory.createServerSocket(D
          omainServerSocketFactory.java:254)
           at org.jboss.security.ssl.DomainServerSocketFactory.createServerSocket(D
          omainServerSocketFactory.java:203)
           at org.jboss.security.ssl.RMISSLServerSocketFactory.createServerSocket(R
          MISSLServerSocketFactory.java:120)
           at sun.rmi.transport.tcp.TCPEndpoint.newServerSocket(TCPEndpoint.java:61
          5)
           at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:231)
           at sun.rmi.transport.tcp.TCPTransport.exportObject(TCPTransport.java:178
          )
          
          Caused by: java.lang.NoClassDefFoundError: javassist/util/proxy/ProxyObject
           at java.lang.ClassLoader.defineClass0(Native Method)
           at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
           at java.lang.ClassLoader.defineClass(ClassLoader.java:448)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)