Meaningless Drivel is fun!*
The moose likes Oracle/OAS and the fly likes OC4J standalone using RMI/IIOP with SSL problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Products » Oracle/OAS
Bookmark "OC4J standalone using RMI/IIOP with SSL problem" Watch "OC4J standalone using RMI/IIOP with SSL problem" New topic
Author

OC4J standalone using RMI/IIOP with SSL problem

Jessica Tan
Greenhorn

Joined: Mar 01, 2005
Posts: 11
Hi...

Me again, I also face the OC4J problem with RMI/IIOP + SSL.

I had manage setup OC4J using RMI/IIOP:
env.put(Context.PROVIDER_URL, "corbaname:iiop:localhost:5555#SSOApiEJB");

If I turn on SSL for RMI/IIOP + SSL and use init the context with:
env.put(Context.PROVIDER_URL, "corbaname:iiop:localhost:5556#SSOApiEJB");
, when using java console application (EJB client), I manage to make client init the SSL connection by add in extra parameter:
-Dejb_sec_properties_location=<location for ejb_sec.properties>

It work for java console application.

But the problem is when the EJB client is locate at another OC4J. According to Oracle tutorial:
http://www.oracle.com/technology/tech/java/oc4j/htdocs/how-to-rmi-iiop.html

If that is web app, I can just put the ejb_sec.properties to <j2ee_home>/config/
or start the oj4c from console with:
-Dejb_sec_properties_location=<location for ejb_sec.properties>

both method also seem not working as the client never init the SSL connection.

The problem show in server side:
05/03/02 10:19:08 com.sun.corba.ee.internal.iiop.ConnectionTable(Thread[JavaIDL Listener,5,main]): Server getConnection(1ef7de4[Unknown 0x0:0x0: Socket[addr=/127.0.0.1,port=3049,localport=5556]], SSL)
05/03/02 10:19:09 com.sun.corba.ee.internal.iiop.ConnectionTable(Thread[JavaIDL Listener,5,main]): host = 127.0.0.1 port = 3049
05/03/02 10:19:09 com.sun.corba.ee.internal.iiop.ConnectionTable(Thread[JavaIDL Listener,5,main]): Created connection Connection[type=SSL remote_host=127.0.0.1 remote_port=3049 state=ESTABLISHED]
com.sun.corba.ee.internal.iiop.MessageMediator(Thread[JavaIDL Reader for 127.0.0.1:3049,5,main]): Creating message from stream
05/03/02 10:19:09 JavaIDL Reader for 127.0.0.1:3049, handling exception: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
05/03/02 10:19:09 JavaIDL Reader for 127.0.0.1:3049, SEND TLSv1 ALERT: fatal, description = unexpected_message
05/03/02 10:19:09 JavaIDL Reader for 127.0.0.1:3049, WRITE: TLSv1 Alert, length = 2
05/03/02 10:19:09 JavaIDL Reader for 127.0.0.1:3049, called closeSocket()
05/03/02 10:19:09 com.sun.corba.ee.internal.iiop.ReaderThread(Thread[JavaIDL Reader for 127.0.0.1:3049,5,main]): IOException in createInputStream: javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
05/03/02 10:19:09 javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
05/03/02 10:19:09 at com.sun.net.ssl.internal.ssl.SSLSocketImpl.d(DashoA12275)
05/03/02 10:19:09 at com.sun.net.ssl.internal.ssl.AppInputStream.read(DashoA12275)
05/03/02 10:19:09 at com.sun.corba.ee.internal.iiop.messages.MessageBase.readFully(MessageBase.java:520)
05/03/02 10:19:09 at com.sun.corba.ee.internal.iiop.messages.MessageBase.createFromStream(MessageBase.java:58)
05/03/02 10:19:09 at com.sun.corba.ee.internal.iiop.MessageMediator.processRequest(MessageMediator.java:110)
05/03/02 10:19:09 at com.sun.corba.ee.internal.iiop.IIOPConnection.processInput(IIOPConnection.java:339)
05/03/02 10:19:09 at com.sun.corba.ee.internal.iiop.ReaderThread.run(ReaderThread.java:63)
05/03/02 10:19:09 Caused by: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
05/03/02 10:19:09 at com.sun.net.ssl.internal.ssl.InputRecord.b(DashoA12275)
05/03/02 10:19:09 at com.sun.net.ssl.internal.ssl.InputRecord.read(DashoA12275)
05/03/02 10:19:09 at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
05/03/02 10:19:09 at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA12275)
05/03/02 10:19:09 at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
05/03/02 10:19:10 ... 6 more
05/03/02 10:19:10 com.sun.corba.ee.internal.iiop.IIOPConnection(Thread[JavaIDL Reader for 127.0.0.1:3049,5,main]): purge_calls: starting: code = 1398079696 die = true
05/03/02 10:19:10 JavaIDL Reader for 127.0.0.1:3049, called close()

Then at client side with have problem that "Could not locate the bean.javax.naming.NamingException: Cannot connect to ORB" as show below:

05/03/02 10:19:09 com.sun.corba.ee.internal.iiop.ReaderThread(Thread[JavaIDL Reader for localhost:5556,5,main]): IOException in createInputStream: java.io.IOException
05/03/02 10:19:09 java.io.IOException
05/03/02 10:19:09 at com.sun.corba.ee.internal.iiop.messages.MessageBase.readFully(MessageBase.java:529)
05/03/02 10:19:09 at com.sun.corba.ee.internal.iiop.messages.MessageBase.createFromStream(MessageBase.java:58)
05/03/02 10:19:09 at com.sun.corba.ee.internal.iiop.MessageMediator.processRequest(MessageMediator.java:110)
05/03/02 10:19:09 at com.sun.corba.ee.internal.iiop.IIOPConnection.processInput(IIOPConnection.java:339)
05/03/02 10:19:09 at com.sun.corba.ee.internal.iiop.ReaderThread.run(ReaderThread.java:63)
05/03/02 10:19:09 com.sun.corba.ee.internal.iiop.IIOPConnection(Thread[JavaIDL Reader for localhost:5556,5,main]): purge_calls: starting: code = 1398079696 die = true
05/03/02 10:19:09 javax.naming.CommunicationException: Cannot connect to ORB [Root exception is org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 208 completed: Maybe]
05/03/02 10:19:09 at com.sun.jndi.cosnaming.CNCtx.setOrbAndRootContext(CNCtx.java:362)
05/03/02 10:19:09 at com.sun.jndi.cosnaming.CNCtx.initUsingCorbanameUrl(CNCtx.java:321)

Any help on that?

Rgds,
Jessica
 
 
subject: OC4J standalone using RMI/IIOP with SSL problem