Hey,
I've been banging my head on this for a while and I cannot figure out what is wrong.
I had a standalone client lookup a remote EJB stateless session bean, and it works fine without using SSL, but when I enable SSL connection it messes up. Am I forgetting to do something?
This is how I lookup my bean
Properties props = new Properties();
props.put(Context.INITIAL_CONTEXT_FACTORY,
"com.sun.enterprise.naming.SerialInitContextFactory");
props.setProperty("java.naming.factory.url.pkgs",
"com.sun.enterprise.naming");
props.setProperty("java.naming.factory.state",
"com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl");
props.setProperty("org.omg.CORBA.ORBInitialHost",
"myserver");
props.setProperty("org.omg.CORBA.ORBInitialPort", "3700");
InitialContext ctx = new InitialContext(props);
return (SomeServiceRemote) ctx
.lookup("ejb/some/stateless/SomeServiceBean.v1.0.1");
This is what my sun-ejb-jar.xml looks like
<enterprise-beans>
<unique-id>0</unique-id>
<ejb>
<ejb-name>SomeServiceBean</ejb-name>
<jndi-name>
ejb/some/stateless/SomeServiceBean.v1.0.1
</jndi-name>
<ior-security-config>
<transport-config>
<integrity>required</integrity>
<confidentiality>required</confidentiality>
<establish-trust-in-target>supported</establish-trust-in-target>
<establish-trust-in-client>supported</establish-trust-in-client>
</transport-config>
<as-context>
<auth-method>USERNAME_PASSWORD</auth-method>
<realm>some_realm</realm>
<required>true</required>
</as-context>
</ior-security-config>
<gen-classes />
</ejb>
</enterprise-beans>
And here is my output when I try to connect to my EJB. It looks like it is going fine at first but then something interrupts to connection and just goes crazy.
[#|2009-01-14T10:35:51.281-0600|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=22;_ThreadName=p: thread-pool-1; w: 11;|
Cipher Suite: SSL_RSA_WITH_3DES_EDE_CBC_SHA|#]
[#|2009-01-14T10:35:51.281-0600|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=22;_ThreadName=p: thread-pool-1; w: 11;|
Compression Method: 0|#]
[#|2009-01-14T10:35:51.281-0600|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=22;_ThreadName=p: thread-pool-1; w: 11;|
***|#]
[#|2009-01-14T10:35:51.281-0600|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=22;_ThreadName=p: thread-pool-1; w: 11;|
Cipher suite: SSL_RSA_WITH_3DES_EDE_CBC_SHA|#]
[#|2009-01-14T10:35:51.281-0600|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=22;_ThreadName=p: thread-pool-1; w: 11;|
*** Certificate chain|#]
[#|2009-01-14T10:35:51.281-0600|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=22;_ThreadName=p: thread-pool-1; w: 11;|
/**
*
* DELETED MY SERVER CERTIFICATE INFO HERE
*
*/
]|#]
[#|2009-01-14T10:35:51.281-0600|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=22;_ThreadName=p: thread-pool-1; w: 11;|
***|#]
[#|2009-01-14T10:35:51.281-0600|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=22;_ThreadName=p: thread-pool-1; w: 11;|
*** ServerHelloDone|#]
[#|2009-01-14T10:35:51.281-0600|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=22;_ThreadName=p: thread-pool-1; w: 11;|
p: thread-pool-1; w: 11, WRITE: TLSv1 Handshake, length = 939|#]
[#|2009-01-14T10:35:51.296-0600|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=22;_ThreadName=p: thread-pool-1; w: 11;|
p: thread-pool-1; w: 11, READ: TLSv1 Alert, length = 2|#]
[#|2009-01-14T10:35:51.296-0600|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=22;_ThreadName=p: thread-pool-1; w: 11;|
p: thread-pool-1; w: 11|#]
[#|2009-01-14T10:35:51.296-0600|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=22;_ThreadName=p: thread-pool-1; w: 11;|, RECV TLSv1 ALERT: |#]
[#|2009-01-14T10:35:51.296-0600|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=22;_ThreadName=p: thread-pool-1; w: 11;|fatal, |#]
[#|2009-01-14T10:35:51.296-0600|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=22;_ThreadName=p: thread-pool-1; w: 11;|internal_error|#]
[#|2009-01-14T10:35:51.296-0600|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=22;_ThreadName=p: thread-pool-1; w: 11;|
p: thread-pool-1; w: 11, called closeSocket()|#]
[#|2009-01-14T10:35:51.296-0600|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=22;_ThreadName=p: thread-pool-1; w: 11;|
p: thread-pool-1; w: 11, handling exception: javax.net.ssl.SSLException: Received fatal alert: internal_error|#]
[#|2009-01-14T10:35:51.296-0600|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=22;_ThreadName=p: thread-pool-1; w: 11;|
p: thread-pool-1; w: 11, called close()|#]
[#|2009-01-14T10:35:51.296-0600|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=22;_ThreadName=p: thread-pool-1; w: 11;|
p: thread-pool-1; w: 11, called closeInternal(true)|#]
[#|2009-01-14T10:35:51.296-0600|WARNING|sun-appserver9.1|javax.enterprise.resource.corba.ee._CORBA_.rpc.transport|_ThreadID=22;_ThreadName=p: thread-pool-1; w: 11;Thread[p: thread-pool-1; w: 11,5,main];org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 203 completed: No;_RequestID=06e4953b-3a79-46f5-93b3-c2ac7dc781dc;|"IOP00710311: (INTERNAL) Worker thread Thread[p: thread-pool-1; w: 11,5,main] caught throwable org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 203 completed: No while executing work."
org.omg.CORBA.INTERNAL: vmcid: SUN minor code: 311 completed: No
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.workerThreadDoWorkThrowable(ORBUtilSystemException.java:7680)
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.workerThreadDoWorkThrowable(ORBUtilSystemException.java:7704)
at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:527)
I know there is nothing wrong with my certificate because it works just fine with my http-listener. Can somebody please help me on this?
[Message sent by forum member 'vsgster' (vsgster)]
http://forums.java.net/jive/thread.jspa?messageID=326017