users@glassfish.java.net

IIOP and SSL

From: Gerald Holl <gerald_at_holl.co.at>
Date: Mon, 14 Jan 2008 14:14:14 +0100

Hello,

I'm trying to get SSL and IIOP working.

I have a standalone client where I lookup a remote EJB stateless session
bean.
The lookup works fine if I don't use SSL. When I switch to SSL I get the
following error:

javax.naming.CommunicationException: Can't find SerialContextProvider
[Root exception is org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code:
208 completed: Maybe]
        at
com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:165)
        at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:398)
        at javax.naming.InitialContext.lookup(InitialContext.java:392)
...

Here's the lookup code of the client:
System.setProperty("javax.net.ssl.trustStore", "client.keystore");
System.setProperty("javax.net.ssl.trustStorePassword", "changeit");
System.setProperty("javax.net.ssl.keyStore", "client.keystore");
System.setProperty("javax.net.ssl.keyStorePassword", "changeit");
System.setProperty("org.omg.CORBA.ORBInitialHost", "localhost");
System.setProperty("org.omg.CORBA.ORBInitialPort", "3820");
InitialContext ctx = new InitialContext();
server = (Server) ctx.lookup("Server");

I added the servers' public key to the client's keystore and vice versa.

The appserv-rt.jar and javaee.jar are on the client's classpath.


Thanks for your help,
Gerald