ClassCastException while narrow an EJV using RMI-IIOP

Hi,
I'm trying to deploy an EJB on weblogic 6.1 SP4 on an AIX system, and a client
(JSP) running on weblogic 6.1 SP4 on a SUN system. And, the dialog between EJB
and servlet has to use RMI-IIOP (due to exploitation constraints).
I receive this exception when getting the reference of the EJB's home :
java.lang.ClassCastException: Cannot narrow remote object to ejbMweb.TstEjbMwebHome
at weblogic.iiop.PortableRemoteObjectDelegateImpl.narrow(PortableRemoteObjectDelegateImpl.java:124)
at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:132)
at cliEjbMweb.cliTstMweb.narrow(cliTstMweb.java:133)
at cliEjbMweb.cliTstMweb.getHome(cliTstMweb.java:31)
at cliEjbMweb.cliTstMweb.testBean1(cliTstMweb.java:53)
at jsp_servlet.__index._jspService(__index.java:91)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:262)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:321)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:198)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2637)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2359)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
The same test using t3 is running OK (there is no problem of classpath).
Can you hel me ?
Thank you !
Marc

"Marc" <[email protected]> writes:
It can't download the stub, you need to set an appropriate security
manager for the RMIClassLoader to work, or make sure the stubs are on
the client.
andy
Hi,
I'm trying to deploy an EJB on weblogic 6.1 SP4 on an AIX system, and a client
(JSP) running on weblogic 6.1 SP4 on a SUN system. And, the dialog between EJB
and servlet has to use RMI-IIOP (due to exploitation constraints).
I receive this exception when getting the reference of the EJB's home :
java.lang.ClassCastException: Cannot narrow remote object to ejbMweb.TstEjbMwebHome
at weblogic.iiop.PortableRemoteObjectDelegateImpl.narrow(PortableRemoteObjectDelegateImpl.java:124)
at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:132)
at cliEjbMweb.cliTstMweb.narrow(cliTstMweb.java:133)
at cliEjbMweb.cliTstMweb.getHome(cliTstMweb.java:31)
at cliEjbMweb.cliTstMweb.testBean1(cliTstMweb.java:53)
at jsp_servlet.__index._jspService(__index.java:91)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:262)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:321)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:198)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2637)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2359)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
The same test using t3 is running OK (there is no problem of classpath).
Can you hel me ?
Thank you !
Marc

Similar Messages

  • Error while using RMI IIOP

    Hi all,
    this is my client code which access EJB 2.1 and SUN JES AS 8.1 using RMI IIOP
    i get the remote home interface well but when i use home.create(), it retruns null.
    can anyone help me???
    Here is the coding,
    Properties props = new Properties();
    //props.put("javax.rmi.CORBA.UtilClass",
    // "com.sun.corba.ee.impl.javax.rmi.CORBA.Util");
    props.put("org.omg.CORBA.ORBClass","com.ooc.OBServer.ORB");
    props.put("org.omg.CORBA.ORBSingletonClass","com.ooc.CORBA.ORBSingleton");
    props.put(Context.INITIAL_CONTEXT_FACTORY,
    "com.sun.jndi.cosnaming.CNCtxFactory");
    props.put(Context.PROVIDER_URL, "iiop://10.24.17.68:3360"); // the port of the application server
    props.put("ooc.orb.service.NameService",
    "corbaloc:iiop:10.24.17.68:3360/NameService");
    String[] args = null;
    ORB orb = ORB.init(args, props);
    Context ctx;
    Object obj;
    try {
    ctx = new InitialContext(props);
    System.out.println("RMI: 1");
    obj = ctx.lookup("ejb/NewSessionBean");
    System.out.println("RMI: 2");
    System.out.println("object name: "+obj.getClass().getName());
    System.out.println("object class loader: "+obj.getClass().getClassLoader());
    NewSessionRemoteHome home = (NewSessionRemoteHome) PortableRemoteObject.
    narrow(obj, NewSessionRemoteHome.class);
    System.out.println("Interface name: "+home.getClass().getName());
    System.out.println("RMI: 3: " + home.toString());
    if (home == null){
    System.out.println("home is null");
    NewSessionRemote remo = (NewSessionRemote)home.create();
    System.out.println("RMI: 4");
    remo.printText("Welcome to RMI world"); //the message send by the client
    System.out.println("The sending of RMI is succeed");
    } catch (Exception ex) {
    System.out.println("exception starts:");
    ex.printStackTrace();
    System.out.println("Exception occurs. Exception: " + ex.getMessage());
    Here is the traces,
    RMI: 1
    RMI: 2
    object name: com.ooc.CORBA.StubForObject
    object class loader: null
    Interface name: fr.teleca.orangebenchosa.cdrstat._NewSessionRemoteHome_Stub
    RMI: 3: IOR:000000000000004b524d493a66722e74656c6563612e6f72616e676562656e63686f73612e6 36472737461742e4e657753657373696f6e52656d6f7465486f6d653a30303030303030303030303 0303030300000000000010000000000000188000102000000000c31302e32342e31372e3638000d2 0000000000056afabcb00000000260000003f00000009533141532d4f52420000000000000002000 00008526f6f74504f41000000001237353732393838353136303237353936380000000000000d010 d0bede7dc000000000001ff140000000000070000000100000020000000000001000100000002050 10001000100200001010900000001000101000000002600000002000200000000000300000016000 000000000000c31302e32342e31372e3638000d1600000000000300000016000000000000000c313 02e32342e31372e3638000d1300000000001f0000000400000003000000200000000400000001000 000210000007c000000000000000100000000000000240000001e000000660000000000000001000 0000c31302e32342e31372e3638000d1600400000000000000008060667810201010100000017040 1000806066781020101010000000764656661756c740004000000000000000000000100000008060 66781020101010000000f
    exception starts:
    java.lang.ClassCastException
    at com.sun.corba.se.internal.iiop.ShutdownUtilDelegate.isLocal(Unknown Source)
    at javax.rmi.CORBA.Util.isLocal(Unknown Source)
    at fr.teleca.orangebenchosa.cdrstat._NewSessionRemoteHome_Stub.create(Unknown Source)
    at fr.teleca.orangebenchosa.servicelogic.CallHandler$EndState.sendCDRStat(CallHand ler.java:1385)
    at fr.teleca.orangebenchosa.servicelogic.CallHandler$EndState.start(CallHandler.ja va:1047)
    at com.appium.TAS.SessionContainer.StatefulObject.enterState(StatefulObject.java)
    at fr.teleca.orangebenchosa.servicelogic.CallHandler.access$4800(CallHandler.java: 61)
    at fr.teleca.orangebenchosa.servicelogic.CallHandler$SuccessfulLogicState.routeRes (CallHandler.java:902)
    at com.appium.TAS.SessionComponents.CallControl.a.exec(a.java)
    at com.appium.Basement.Synchronization.Asynchronizer.d(Asynchronizer.java)
    at com.appium.Basement.Synchronization.g.run(g.java)
    Exception occurs. Exception: null

    Hi ejp,
    because my stand alone client application runs on telecom server which uses orbacus. It calls the remote method on sun AS using RMI IIOP
    I specifed the properties of the client to use SUN AS naming services.
    I added j2ee.jar and appserv-rt.jar in my client program. but i dont know eventhough i specified the Util properties to use as below
    props.put("javax.rmi.CORBA.UtilClass","com.sun.corba.ee.impl.javax.rmi.CORBA.Util");
    props.put("org.omg.CORBA.ORBClass", "com.sun.corba.ee.impl.orb.ORBImpl");
    props.put("org.omg.CORBA.ORBSingletonClass", "com.sun.corba.ee.impl.orb.ORBSingleton");
    props.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.cosnaming.CNCtxFactory");
    props.put(Context.PROVIDER_URL,"iiop://10.24.17.68:3360"); // the port of the application server
    props.put("ooc.orb.service.NameService", "corbaloc:iiop:10.24.17.68:3360/NameService");
    ORB orb = ORB.init(args,props);
    Context ctx;
    Object obj;
    try {
    ctx = new InitialContext(props);
    obj= ctx.lookup("ejb/NewSessionBean");
    NamingEnumeration ne = ctx.listBindings("ejb");
    while (ne.hasMore()) {
    System.out.println("Binding: " + ne.next());
    System.out.println("object name"+obj.getClass().getName());
    System.out.println("object class loader"+obj.getClass().getClassLoader());
    NewSessionRemoteHome home=(NewSessionRemoteHome)PortableRemoteObject.narrow(obj,NewSessionRemoteHome.class);
    System.out.println("Interface name: "+home.getClass().getName());
    NewSessionRemote remo=home.create();
    System.out.println("Remote name: "+remo.getClass().getName());
    remo.printText("Welcome"); //the message send by the client
    } catch (Exception ex) {
    ex.printStackTrace();
    but it uses J2SE Util. Is there any other workaround to do?
    Thanks
    mdb

  • Java.lang.ClassCastException: Cannot narrow remote object weblogic.rmi.inte

    Hi,
    I am trying to deploy ejb3.0 on weblogic 10 server. I am able to find the JNDI name of the stateless session bean correctly, but getting an exception while narrowing it down. My ejb3.0 client is a standalone java client. I am trying to access the stateless session ejb3.0 bean.Please help me. i have been trying it for many days.
    thanks in advance,
    Sanjeev
    [sanpraka@localhost certEjb]$ java -cp ./:/usr/weblogic/bea/wlserver_10.0/server/lib/weblogic.jar:/usr/weblogic/bea/wlserver_10.0/server/lib/wlclient.jar com.titan.clients.Client
    Object is weblogic.rmi.internal.BasicRemoteRef - hostID: '5337880647112897730S:127.0.0.1:[7001,7001,-1,-1,-1,-1,-1]:wl_server:examplesServer', oid: '302', channel: 'null'
    java.lang.ClassCastException: Cannot narrow remote object weblogic.rmi.internal.BasicRemoteRef - hostID: '5337880647112897730S:127.0.0.1:[7001,7001,-1,-1,-1,-1,-1]:wl_server:examplesServer', oid: '302', channel: 'null' to com.titan.travelagent.TravelAgentRemote
    at weblogic.corba.server.naming.ReferenceHelperImpl.narrow(ReferenceHelperImpl.java:206)
    at weblogic.rmi.extensions.PortableRemoteObject.narrow(PortableRemoteObject.java:88)
    at weblogic.iiop.PortableRemoteObjectDelegateImpl.narrow(PortableRemoteObjectDelegateImpl.java:32)
    at javax.rmi.PortableRemoteObject.narrow(Unknown Source)
    at com.titan.clients.Client.main(Client.java:24)
    [sanpraka@localhost certEjb]$

    We have a similar problem. We have a web application (on server A) that invokes an EJB on a remote server (server B). This works fine, until we deploy another web application to server A at which point the existing web application starts to throw java.lang.ClassCastException when narrowing the remote EJB interface. The exception starts to be thrown at the moment the latter web application is deployed - start is not required.
    The latter web application contains (actually in APP-INF/lib) the old version of the EJB remote interface, that somehow gets to be loaded into the classpath of the existing web application. The solution is to delete the old version of the EJB remote interface from APP-INF/lib of the latter web application (we didn't need it anyway), but it would be interesting to know in which circumstances classes can get mixed between enterprise applications.
    I failed to reproduce the error in simple scenario, so this does not happen always.

  • How to configure OC4J using RMI/IIOP with SSL

    Any help?
    I just mange configure the OC4J using RMI/IIOP but base on
    But when I follow further to use RMI/IIOP with SSL I face the problem with: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
    p/s: I use self generate keystore which should be ok as I can use it for https connection.
    Any one can help?
    Below is the OC4J log:
    D:\oc4j\j2ee\home>java -Djavax.net.debug=all -DGenerateIIOP=true -Diiop.runtime.debug=true -jar oc4j.jar
    05/02/23 16:43:16 ================ IIOPServerExtensionProvider.preInitApplicationServer
    05/02/23 16:43:38 ================= IIOPServerExtensionProvider.postInitApplicationServer
    05/02/23 16:43:38 ================== config = {SEPS={IIOP={ssl-port=5556, port=5555, ssl=true, trusted-clients=*, ssl-client-server-auth-port=5557, keystore=D:\\oc4j\\j2ee\\home\\server.keystore, keystore-password=123456, truststore=D:\\oc4j\\j2ee\\home\\server.keystore, truststore-password=123456, ClassName=com.oracle.iiop.server.IIOPServerExtensionProvider, host=localhost}}}
    05/02/23 16:43:38 ================== server.getAttributes() = {threadPool=com.evermind.server.ApplicationServerThreadPool@968fda}
    05/02/23 16:43:38 ================== pool: null
    05/02/23 16:43:38 ====================== In startServer ...
    05/02/23 16:43:38 ==================== Creating an IIOPServer ...
    05/02/23 16:43:38 ========= IIOP server being initialized
    05/02/23 16:43:38 SSL port: 5556
    05/02/23 16:43:38 SSL port 2: 5557
    05/02/23 16:43:43 com.sun.corba.ee.internal.iiop.GIOPImpl(Thread[Orion Launcher,5,main]): getEndpoint(IIOP_CLEAR_TEXT, 5555, null)
    05/02/23 16:43:43 com.sun.corba.ee.internal.iiop.GIOPImpl(Thread[Orion Launcher,5,main]): createListener( socketType = IIOP_CLEAR_TEXT port = 5555 )
    05/02/23 16:43:44 com.sun.corba.ee.internal.iiop.GIOPImpl(Thread[Orion Launcher,5,main]): getEndpoint(SSL, 5556, null)
    05/02/23 16:43:44 com.sun.corba.ee.internal.iiop.GIOPImpl(Thread[Orion Launcher,5,main]): createListener( socketType = SSL port = 5556 )
    05/02/23 16:43:45 ***
    05/02/23 16:43:45 found key for : mykey
    05/02/23 16:43:45 chain [0] = [
    Version: V1
    Subject: CN=Server, OU=Bar, O=Foo, L=Some, ST=Where, C=UN
    Signature Algorithm: MD5withRSA, OID = 1.2.840.113549.1.1.4
    Key: SunJSSE RSA public key:
    public exponent:
    010001
    modulus:
    b1239fff 2ae5d31d b01a0cfb 1186bae0 bbc7ac41 94f24464 e92a7e33 6a5b0844
    109e30fb d24ad770 99b3ff86 bd96c705 56bf2e7a b3bb9d03 40fdcc0a c9bea9a1
    c21395a4 37d8b2ce ff00eb64 e22a6dd6 97578f92 29627229 462ebfee 061c99a4
    1c69b3a0 aea6a95b 7ed3fd89 f829f17e a9362efe ccf8034a 0910989a a8573305
    Validity: [From: Wed Feb 23 15:57:28 SGT 2005,
                   To: Tue May 24 15:57:28 SGT 2005]
    Issuer: CN=Server, OU=Bar, O=Foo, L=Some, ST=Where, C=UN
    SerialNumber: [    421c3768]
    Algorithm: [MD5withRSA]
    Signature:
    0000: 34 F4 FA D4 6F 23 7B 84 30 42 F3 5C 4B 5E 18 17 4...o#..0B.\K^..
    0010: 73 69 73 A6 BF 9A 5D C0 67 8D C3 56 DF A9 4A AC sis...].g..V..J.
    0020: 88 AF 24 28 C9 39 16 22 29 81 01 93 86 AA 1A 5D ..$(.9.")......]
    0030: 07 89 26 22 91 F0 8F DE E1 4A CF 17 9A 02 51 7D ..&".....J....Q.
    0040: 92 D3 6D 9B EF 5E C1 C6 66 F9 11 D4 EB 13 8F 17 ..m..^..f.......
    0050: E7 66 58 9F 6C B0 60 7C 39 B4 E0 B7 04 A7 7F A6 .fX.l.`.9.......
    0060: 4D A5 89 E7 F4 8A DC 59 B4 E7 A5 D4 0A 35 9A F1 M......Y.....5..
    0070: A2 CD 3A 04 D6 8F 16 B1 9E 6F 34 40 E8 C0 47 03 ..:[email protected].
    05/02/23 16:43:45 ***
    05/02/23 16:43:45 adding as trusted cert:
    05/02/23 16:43:45 Subject: CN=Client, OU=Bar, O=Foo, L=Some, ST=Where, C=UN
    05/02/23 16:43:45 Issuer: CN=Client, OU=Bar, O=Foo, L=Some, ST=Where, C=UN
    05/02/23 16:43:45 Algorithm: RSA; Serial number: 0x421c3779
    05/02/23 16:43:45 Valid from Wed Feb 23 15:57:45 SGT 2005 until Tue May 24 15:57:45 SGT 2005
    05/02/23 16:43:45 adding as trusted cert:
    05/02/23 16:43:45 Subject: CN=Server, OU=Bar, O=Foo, L=Some, ST=Where, C=UN
    05/02/23 16:43:45 Issuer: CN=Server, OU=Bar, O=Foo, L=Some, ST=Where, C=UN
    05/02/23 16:43:45 Algorithm: RSA; Serial number: 0x421c3768
    05/02/23 16:43:45 Valid from Wed Feb 23 15:57:28 SGT 2005 until Tue May 24 15:57:28 SGT 2005
    05/02/23 16:43:45 trigger seeding of SecureRandom
    05/02/23 16:43:45 done seeding SecureRandom
    05/02/23 16:43:45 com.sun.corba.ee.internal.iiop.GIOPImpl(Thread[Orion Launcher,5,main]): getEndpoint(SSL_MUTUALAUTH, 5557, null)
    05/02/23 16:43:45 com.sun.corba.ee.internal.iiop.GIOPImpl(Thread[Orion Launcher,5,main]): createListener( socketType = SSL_MUTUALAUTH port = 5557 )
    05/02/23 16:43:45 matching alias: mykey
    matching alias: mykey
    05/02/23 16:43:46 ORB created ..com.oracle.iiop.server.OC4JORB@65b738
    05/02/23 16:43:47 com.sun.corba.ee.internal.corba.ClientDelegate(Thread[Orion Launcher,5,main]): invoke(ClientRequest) called
    05/02/23 16:43:47 com.oracle.iiop.server.OC4JORB(Thread[Orion Launcher,5,main]): process: dispatching to scid 2
    05/02/23 16:43:47 com.oracle.iiop.server.OC4JORB(Thread[Orion Launcher,5,main]): dispatching to sc [email protected]7
    05/02/23 16:43:48 com.sun.corba.ee.internal.corba.ClientDelegate(Thread[Orion Launcher,5,main]): invoke(ClientRequest) called
    05/02/23 16:43:48 com.oracle.iiop.server.OC4JORB(Thread[Orion Launcher,5,main]): process: dispatching to scid 2
    05/02/23 16:43:48 com.oracle.iiop.server.OC4JORB(Thread[Orion Launcher,5,main]): dispatching to sc com.sun.corba.ee.internal.corba.ServerDelegate@9300cc
    05/02/23 16:43:48 com.sun.corba.ee.internal.corba.ServerDelegate(Thread[Orion Launcher,5,main]): Entering dispatch method
    05/02/23 16:43:48 com.sun.corba.ee.internal.corba.ServerDelegate(Thread[Orion Launcher,5,main]): Consuming service contexts, GIOP version: 1.2
    05/02/23 16:43:48 com.sun.corba.ee.internal.corba.ServerDelegate(Thread[Orion Launcher,5,main]): Has code set context? false
    05/02/23 16:43:48 com.sun.corba.ee.internal.corba.ServerDelegate(Thread[Orion Launcher,5,main]): Dispatching to servant
    05/02/23 16:43:48 com.sun.corba.ee.internal.corba.ServerDelegate(Thread[Orion Launcher,5,main]): Handling invoke handler type servant
    05/02/23 16:43:48 NS service created and started ..org.omg.CosNaming._NamingContextExtStub:IOR:000000000000002b49444c3a6f6d672e6f72672f436f734e616d696e672f4e616d696e67436f6e746578744578743a312e30000000000001000000000000007c000102000000000c31302e312e3231342e31310015b3000000000031afabcb0000000020d309e06a0000000100000000000000010000000c4e616d65536572766963650000000004000000000a0000000000000100000001000000200000000000010001000000020501000100010020000101090000000100010100
    05/02/23 16:43:48 NS ior = ..IOR:000000000000002b49444c3a6f6d672e6f72672f436f734e616d696e672f4e616d696e67436f6e746578744578743a312e30000000000001000000000000007c000102000000000c31302e312e3231342e31310015b3000000000031afabcb0000000020d309e06a0000000100000000000000010000000c4e616d65536572766963650000000004000000000a0000000000000100000001000000200000000000010001000000020501000100010020000101090000000100010100
    05/02/23 16:43:48 Oracle Application Server Containers for J2EE 10g (9.0.4.0.0) initialized
    05/02/23 16:45:14 com.sun.corba.ee.internal.iiop.ConnectionTable(Thread[JavaIDL Listener,5,main]): Server getConnection(119e583[Unknown 0x0:0x0: Socket[addr=/127.0.0.1,port=1281,localport=5556]], SSL)
    05/02/23 16:45:14 com.sun.corba.ee.internal.iiop.ConnectionTable(Thread[JavaIDL Listener,5,main]): host = 127.0.0.1 port = 1281
    05/02/23 16:45:14 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=1281 state=ESTABLISHED]
    com.sun.corba.ee.internal.iiop.MessageMediator(Thread[JavaIDL Reader for 127.0.0.1:1281,5,main]): Creating message from stream
    05/02/23 16:45:14 JavaIDL Reader for 127.0.0.1:1281, handling exception: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
    05/02/23 16:45:14 JavaIDL Reader for 127.0.0.1:1281, SEND TLSv1 ALERT: fatal, description = unexpected_message
    05/02/23 16:45:14 JavaIDL Reader for 127.0.0.1:1281, WRITE: TLSv1 Alert, length = 2
    05/02/23 16:45:14 JavaIDL Reader for 127.0.0.1:1281, called closeSocket()
    05/02/23 16:45:14 com.sun.corba.ee.internal.iiop.ReaderThread(Thread[JavaIDL Reader for 127.0.0.1:1281,5,main]): IOException in createInputStream: javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
    05/02/23 16:45:14 javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
    05/02/23 16:45:14 at com.sun.net.ssl.internal.ssl.SSLSocketImpl.d(DashoA12275)
    05/02/23 16:45:14 at com.sun.net.ssl.internal.ssl.AppInputStream.read(DashoA12275)
    05/02/23 16:45:14 at com.sun.corba.ee.internal.iiop.messages.MessageBase.readFully(MessageBase.java:520)
    05/02/23 16:45:14 at com.sun.corba.ee.internal.iiop.messages.MessageBase.createFromStream(MessageBase.java:58)
    05/02/23 16:45:14 at com.sun.corba.ee.internal.iiop.MessageMediator.processRequest(MessageMediator.java:110)
    05/02/23 16:45:14 at com.sun.corba.ee.internal.iiop.IIOPConnection.processInput(IIOPConnection.java:339)
    05/02/23 16:45:14 at com.sun.corba.ee.internal.iiop.ReaderThread.run(ReaderThread.java:63)
    05/02/23 16:45:14 Caused by: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
    05/02/23 16:45:14 at com.sun.net.ssl.internal.ssl.InputRecord.b(DashoA12275)
    05/02/23 16:45:14 at com.sun.net.ssl.internal.ssl.InputRecord.read(DashoA12275)
    05/02/23 16:45:14 at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
    05/02/23 16:45:14 at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA12275)
    05/02/23 16:45:14 at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
    05/02/23 16:45:14 ... 6 more
    05/02/23 16:45:14 com.sun.corba.ee.internal.iiop.IIOPConnection(Thread[JavaIDL Reader for 127.0.0.1:1281,5,main]): purge_calls: starting: code = 1398079696 die = true
    05/02/23 16:45:14 JavaIDL Reader for 127.0.0.1:1281, called close()
    05/02/23 16:45:14 JavaIDL Reader for 127.0.0.1:1281, called closeInternal(true)
    05/02/23 16:45:14 JavaIDL Reader for 127.0.0.1:1281, called close()
    05/02/23 16:45:14 JavaIDL Reader for 127.0.0.1:1281, called closeInternal(true)
    05/02/23 16:45:14 JavaIDL Reader for 127.0.0.1:1281, called close()
    05/02/23 16:45:14 JavaIDL Reader for 127.0.0.1:1281, called closeInternal(true)
    05/02/23 16:45:14 com.sun.corba.ee.internal.iiop.ConnectionTable(Thread[JavaIDL Reader for 127.0.0.1:1281,5,main]): DeleteConn called: host = 127.0.0.1 port = 1281

    Good point, I do belive what you are referring to is this:
    Any client, whether running inside a server or not, has EJB security properties. Table 15-2 lists the EJB client security properties controlled by the ejb_sec.properties file. By default, OC4J searches for this file in the current directory when running as a client, or in ORACLE_HOME/j2ee/home/config when running in the server. You can specify the location of this file explicitly with the system property setting -Dejb_sec_properties_location=pathname.
    Table 15-2 EJB Client Security Properties
    Property Meaning
    # oc4j.iiop.keyStoreLoc
    The path and name of the keystore. An absolute path is recommended.
    # oc4j.iiop.keyStorePass
    The password for the keystore.
    # oc4j.iiop.trustStoreLoc
    The path name and name of the truststore. An absolute path is recommended.
    # oc4j.iiop.trustStorePass
    The password for the truststore.
    # oc4j.iiop.enable.clientauth
    Whether the client supports client-side authentication. If this property is set to true, you must specify a keystore location and password.
    # oc4j.iiop.ciphersuites
    Which cipher suites are to be enabled. The valid cipher suites are:
    TLS_RSA_WITH_RC4_128_MD5
    SSL_RSA_WITH_RC4_128_MD5
    TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA
    SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA
    TLS_RSA_EXPORT_WITH_RC4_40_MD5
    SSL_RSA_EXPORT_WITH_RC4_40_MD5
    TLS_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA
    SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA
    nameservice.useSSL
    Whether to use SSL when making the initial connection to the server.
    client.sendpassword
    Whether to send user name and password in clear form (unencrypted) in the service context when not using SSL. If this property is set to true, the user name and password are sent only to servers listed in the trustedServer list.
    oc4j.iiop.trustedServers
    A list of servers that can be trusted to receive passwords sent in clear form. This has no effect if client.sendpassword is set to false. The list is comma-delimited. Each entry in the list can be an IP address, a host name, a host name pattern (for example, *.example.com), or * (where "*" alone means that all servers are trusted.

  • How to get InitialContextFactory using RMI/IIOP without using weblogic.jar

    Hi Robert
    I know this is an old post. but I am interested in knowing how to get the
    initial context using RMI/IIOP without the use weblogic specific classes
    like weblogic.jndi.WLInitialContextFactory . If you have a code snippet that
    you can provide as an example, it would be just great.
    thanx in advance
    Daya Sharma
    See comments inline...
    Stewart Wachs wrote:
    I would like to get an initial context to Weblogic JNDI from a client.
    code snippet:
    Hashtable ht = new Hashtable();
    ht.put(Context.INITIAL_CONTEXT_FACTORY,
    "weblogic.jndi.WLInitialContextFacorty");
    ht.put(Context.PROVIDER_URL, "t3://localhost:7001");
    try {
    Context ctx = new InitialContext(ht);
    catch(...) {
    This works fine when I include weblogic.jar (and other dependend weblogic
    jar's) in the classpath.
    Is there a way to access WL JNDI from a client without the weblogicclasses
    in the classpath?If you are using WLS 6.1, you could use RMI/IIOP to do this but in general,
    the
    answer is no, you will need at least some of the weblogic classes on the
    client.
    If not, is there a lightweight jar available for distribution for client
    JNDI connectivity?This is something in the works. In addition, a colleague and I are working
    on
    a white paper that describes the "Thin Client Options with WebLogic Server"
    that we hope to make available in the not too distant future...
    Are there any licencing issues with distributing the weblogic classes to
    clients that need to access WL JNDI?No. WLS is licensed by the server so you are free to distribute
    weblogic.jar
    to your clients.
    Hope this helps,
    Robert

    Take a look at the RMI/IIOP section of our whitepaper "Small Footprint
    Client options for BEA WebLogic Server" at:
    http://dev2dev.bea.com/resourcelibrary/whitepapers.jsp?highlight=whitepapers
    Daya Sharma wrote:
    Hi Robert
    I know this is an old post. but I am interested in knowing how to get the
    initial context using RMI/IIOP without the use weblogic specific classes
    like weblogic.jndi.WLInitialContextFactory . If you have a code snippet that
    you can provide as an example, it would be just great.
    thanx in advance
    Daya Sharma
    See comments inline...
    Stewart Wachs wrote:
    I would like to get an initial context to Weblogic JNDI from a client.
    code snippet:
    Hashtable ht = new Hashtable();
    ht.put(Context.INITIAL_CONTEXT_FACTORY,
    "weblogic.jndi.WLInitialContextFacorty");
    ht.put(Context.PROVIDER_URL, "t3://localhost:7001");
    try {
    Context ctx = new InitialContext(ht);
    catch(...) {
    This works fine when I include weblogic.jar (and other dependend weblogic
    jar's) in the classpath.
    Is there a way to access WL JNDI from a client without the weblogic
    classes
    in the classpath?
    If you are using WLS 6.1, you could use RMI/IIOP to do this but in general,
    the
    answer is no, you will need at least some of the weblogic classes on the
    client.
    If not, is there a lightweight jar available for distribution for client
    JNDI connectivity?
    This is something in the works. In addition, a colleague and I are working
    on
    a white paper that describes the "Thin Client Options with WebLogic Server"
    that we hope to make available in the not too distant future...
    Are there any licencing issues with distributing the weblogic classes to
    clients that need to access WL JNDI?
    No. WLS is licensed by the server so you are free to distribute
    weblogic.jar
    to your clients.
    Hope this helps,
    Robert

  • Use RMI-IIOP with wls 5.1 or 6.0 ???

    Morning,
    I was wondering if is was possible to use RMI-IIOP with
    WebLogic Server 5.1 or 6.0 and if possible with which version
    of the RMI-IIOP specification ???
    I've not seen any information about that in the documentation ; if anybody could
    help, I would appreciate !
    Thanks a lot.
    Pierre-Yves FOURMOND
    Axway Software. a Sopra Group Company
    Direction Edition de Progiciels
    EAI - R&D XTalk
    Puteaux 2 - Bureau n°204
    [email protected]
    01 47 17 22 55

    "Pierre-Yves Fourmond" <[email protected]> writes:
    I was wondering if is was possible to use RMI-IIOP with
    WebLogic Server 5.1 or 6.0 and if possible with which version
    of the RMI-IIOP specification ???WLS 5.1SP11 has the same RMI-IIOP runtime as WLS6.1SP2. 6.0 contains
    the old runtime, at the moment it seems most customers are happy to
    upgrade to 6.1 from 6.0
    andy
    >
    I've not seen any information about that in the documentation ; if anybody could
    help, I would appreciate !
    Thanks a lot.
    Pierre-Yves FOURMOND
    Axway Software. a Sopra Group Company
    Direction Edition de Progiciels
    EAI - R&D XTalk
    Puteaux 2 - Bureau n°204
    [email protected]
    01 47 17 22 55--
    " .sigs are like your face - rarely seen by you and uglier than you think"
    mail: [email protected]

  • When we use RMI-IIOP?

    Dear,
    Can anyone tell me when we use RMI-IIOP? When we use RMI-IIOP and
    EJB? When will use JSP? When will use servlet?
    Sorry for that silly question, but i really want to know it?
    kurt

    As I know, If using RMI-IIOP, we have to handle lots of stuffs like
    connection pool, security...etc.
    Am I right?
    Kurt
    Tom Barnes <[email protected]> wrote in message
    news:[email protected]..
    >
    >
    Andy Piper wrote:
    RMI-IIOP is useful for:
    a) Interop, i.e. between different appservers
    b) C++ client integration
    Customers also sometimes want it because they have security
    restrictions on what protocols they can put through a firewall.
    It is also useful for light-weight Java clients. RMI-IIOP clients need
    not use the (large) weblogic.jar jar.
    Tom

  • ClassCastException While Narrowing

    Hi,
    I have my application deployed as EAR file, with a WAR and two JAR for the statelesss session beans. On Server start up I call a servlet (in the WAR), which invokes the EJB deployed in one of the JAR file. At that instance it is giving the following Error:
    Exception :Cannot narrow remote object to au.com.three.hutchison.hss.ejb.staticinfo.StaticInfoHome
    java.lang.ClassCastException: Cannot narrow remote object to au.com.three.hutchison.hss.ejb.staticinfo.StaticInfoHome
         at weblogic.iiop.PortableRemoteObjectDelegateImpl.narrow(PortableRemoteObjectDelegateImpl.java:242)
         at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:134)
         at au.com.three.hutchison.hss.service.HSSServiceFactory.narrow(Unknown Source)
         at au.com.three.hutchison.hss.service.HSSServiceFactory.lookupHome(Unknown Source)
         at au.com.three.hutchison.hss.service.HSSServiceFactory.getRemote(Unknown Source)
         at au.com.three.hutchison.init.InitConfigInfoServlet.init(Unknown Source)
         at weblogic.servlet.internal.ServletStubImpl$ServletInitAction.run(ServletStubImpl.java:1070)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
         at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:893)
         at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java:842)
         at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:782)
         at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:3236)
    The same code used to work fine before, but I had some class loader issues to resolve which i set the 'prefer-web-inf-classes' to true in the weblogic.xml of the WAR. However after that I started getting the ClassCastException problem..
    Any Help Would be Hghly Appreciated
    Thanks
    Nitin

    here's the weblogic-application.xml that i have used to specify different classloaders
    <!DOCTYPE weblogic-application PUBLIC '-//BEA Systems, Inc.//DTD WebLogic Application 8.1.0//EN' 'http://www.bea.com/servers/wls810/dtd/weblogic-application_2_0.dtd'>
    <weblogic-application>
         <classloader-structure>
              <module-ref>
                   <module-uri>hssWebApp.war</module-uri>
              </module-ref>
              <module-ref>
                   <module-uri>StaticInfoBean/StaticInfoBean.jar</module-uri>
              </module-ref>
              <module-ref>
                   <module-uri>HSSGWSBean/HSSGWSBean.jar</module-uri>
              </module-ref>
         </classloader-structure>
    </weblogic-application>

  • Obtaining an IOR for RMI-IIOP

    Hi -
    I'm working to modify a C program (gnuplot) so that it can remotely call functions in Java.
    My current plan is to use RMI-IIOP on the Java side. I'd like to create a class that implements java.rmi.Remote via some local implementation class, instantiate it, then obtain a stringified IOR for that object and pass it to gnuplot, which can then use the IOR to call remote methods.
    Also, I'm planning to use CORBA DII on the client side, since I want a generic program where the remote method names can be set by user options at run time.
    Does this make sense? I'm working with this tutorial code:
    http://java.sun.com/j2se/1.5.0/docs/guide/rmi-iiop/tutorial.html
    and am stuck on obtaining an IOR in the server code.
    Any help would be appreciated...

    Well, I figured it out. The key method is remoteToCorba in com.sun.jndi.toolkit.corba.CorbaUtils. Here's my server code:
    //HelloServer.java
    import java.io.*;
    import org.omg.CORBA.ORB;
    import com.sun.jndi.toolkit.corba.CorbaUtils;
    public class HelloServer {
        public static void main(String[] args) {
            try {
                // Step 1: Instantiate the Hello servant
                HelloImpl helloRef = new HelloImpl();
                // Step 2: Initialize the ORB
                ORB orb = ORB.init(args, null);
                // Step 3: Convert the Hello servant to a CORBA object
                org.omg.CORBA.Object corba_obj;
                corba_obj = CorbaUtils.remoteToCorba(helloRef, orb);
                // Step 4a: Announce the IOR to STDOUT
                String ior = orb.object_to_string(corba_obj);
                System.out.println("IOR: " + ior);
                // Step 4b: Announce the IOR to a file
                FileWriter fw = new FileWriter("hello.ior");
                fw.write(ior);
                fw.close();
                System.out.println("Hello Server: Ready...");
             } catch (Exception e) {
                System.out.println("Trouble: " + e);
                e.printStackTrace();
    }And here's the matching client code:
    //HelloClient.java
    import java.io.*;
    import org.omg.CORBA.ORB;
    import javax.rmi.PortableRemoteObject;
    public class HelloClient {
        public static void  main( String args[] ) {
            HelloInterface hi;
            try {
                // Step 1: Initialize the ORB
                ORB orb = ORB.init(args, null);
                // Step 2: Obtain the stringified IOR from a file
                FileReader fr = new FileReader("hello.ior");
                BufferedReader br = new BufferedReader(fr);
                String ior = br.readLine();
                // Step 3: Convert the IOR to a CORBA object reference
                org.omg.CORBA.Object objref = orb.string_to_object(ior);
                // Step 4: Narrow the CORBA object reference to the concrete type
                hi = (HelloInterface) PortableRemoteObject.narrow(
                    objref, HelloInterface.class);
                // Step 5: Invoke the method.
                hi.sayHello( " MARS " );
            } catch( Exception e ) {
                System.err.println( "Exception " + e + "Caught" );
                e.printStackTrace( );
                return;
    }The other two files are unchanged from the original example:
    //HelloInterface.java
    import java.rmi.Remote;
    public interface HelloInterface extends java.rmi.Remote {
       public void sayHello( String from ) throws java.rmi.RemoteException;
    //HelloImpl.java
    import javax.rmi.PortableRemoteObject;
    public class HelloImpl extends PortableRemoteObject implements HelloInterface {
       public HelloImpl() throws java.rmi.RemoteException {
           super();     // invoke rmi linking and remote object initialization
       public void sayHello( String from ) throws java.rmi.RemoteException {
           System.out.println( "Hello from " + from + "!!" );
           System.out.flush();
    }Compilation and usage is straightforward:
    javac *.java
    rmic -iiop HelloImpl
    java -cp . HelloServer
    java -cp . HelloClientIt gives warnings about using a Sun proprietary interface, but that's the only problem that I've had with the Java end. Getting the C end working has been more challenging. ORBit seems to have some serious interoperability problems. I haven't gotten it working yet with Java.

  • EJB client connection [RMI/IIOP]

    1) Just to test the communication between EJB client and EJB using RMI/IIOP in WLS 9.2, I have created two InitialContexts and I have seen that here are only two InitialContext. But, I can see only a single connection displayed (Monitoring Channels tab for the default [IIOP] channel). Is this expected? Doesn’t is suppose to create two connections?
    2) If only one connection is established. What is the way this model will scale up?? I can have multiple calls..right?
    3) What is the connection time out works on this? If I have a stub cached. Does that mean my RMI/IIOP connection still be alive?

    MC Sreeram <> writes:
    1) Just to test the communication between EJB client and EJB using RMI/IIOP in WLS 9.2, I have created two InitialContexts and I have seen that here are only two InitialContext. But, I can see only a single connection displayed (Monitoring Channels tab for the default [IIOP] channel). Is this expected? Doesn???t is suppose to create two connections?Connections are share beween the same port and ip addresses.
    2) If only one connection is established. What is the way this model will scale up?? I can have multiple calls..right?Yes. It scales up nicely.
    3) What is the connection time out works on this? If I have a stub cached. Does that mean my RMI/IIOP connection still be alive?The stub should transparently re-establish the connection if it is timed out
    andy

  • RMI-IIOP, C++ and mobile code

    Hi,
    I'd like to know whether it is possible to use RMI-IIOP [1] to connect a Java component to a C++ component on a remote end and use "mobile code" [2]. In other words, a C++ client connects to a remote Java component, downloads a class file and executes it locally. On the flip side, a C++ component uploads a class file to a Java end for remote execution.
    I see much discussion about the value of RMI-IIOP for connecting Java and C++ components but I see little value for this if you lose the "mobile code" capability. What are the advantages of using RMI vs RMI-IIOP vs "web services"? Am I missing something?
    Thank you,
    Gili
    [1] http://java.sun.com/products/rmi-iiop/
    [2] http://en.wikipedia.org/wiki/Mobile_code

    I'd like to know whether it is possible to use RMI-IIOP [1] to connect a Java component to a C++ component on a remote endYes, provided you start with a Java interface and generate IDL from that.
    and use "mobile code" [2]. In other words, a C++ client connects to a remote Java component, downloads a class file and executes it locally. On the flip side, a C++ component uploads a class file to a Java end for remote execution.C++ can execute or create Java objects via JNI but that implies a JVM anyway at the C++ end, so why not just use Java? IOW it's a lot of trouble for nothing.
    I see much discussion about the value of RMI-IIOP for connecting Java and C++ components but I see little value for this if you lose the "mobile code" capability.All the rest of RMI and Corba is 'little'?

  • RMI/IIOP + WLS cluster

    Two questions:
              Can I access a WLS cluster using RMI/IIOP?
              If positive, will the load-balancing and fail-over work the same way as with
              T3?
              Thanks
              Serhii Sokolenko
              

              Serhii Sokolenko wrote:
              > Two questions:
              >
              > Can I access a WLS cluster using RMI/IIOP?
              yes you can
              >
              >
              > If positive, will the load-balancing and fail-over work the same way as with
              > T3?
              no because IIOP stubs are not smart and cluster-aware
              >
              >
              > Thanks
              > Serhii Sokolenko
              

  • RMI-IIOP nulls out Hashtable in 6.1 SP2

    Hi,
    We have a client communicating with a server via a session bean, using RMI-IIOP.
    The client that is sending "sessionBean.foo(A a)", where "A" is a serializable
    object that contains a Hashtable "h", and "a.h" is initialized to a new Hashtable.
    When we look at A inside the sessionBean, "h" contains null. Is it possible that
    somewhere in the marshalling process, "h" was nulled out?
    We have tried this, all in WLS 6.1 SP2:
    - compiling and running in JDK1.3.1_02, client and server
    - compiling and running in JDK1.3.1_01, client and server
    Thanks for your help,
    Joel

    Thanks for the quick response(s),
    Where we can get this patch to SP2?
    It doesn't appear to be available through support.bea.com or the developer area.
    Is it on the web, or do we have to e-mail support?
    Joel
    Andy Piper <[email protected]> wrote:
    "Cameron Purdy" <[email protected]> writes:
    Right. Also, JDK 1.3 does not encode null objects correctly so you
    will find that we trim Vectors to not contain nulls because of this
    problem.
    You know, Hashtables are custom marshaled and we found a number of
    problems with custom marshaling in SP2. These are all fixed in SP3 and
    a patch is available from BEA support for SP2 users. However, it seems
    unlikely that this is your problem since you don't get any marshaling
    errors.
    andy
    Only if h is transient or you have over-ridden serialization (e.g.
    readObject / writeObject).
    Peace,
    Cameron Purdy
    Tangosol, Inc.
    Clustering Weblogic? You're either using Coherence, or you should be!
    Download a Tangosol Coherence eval today at http://www.tangosol.com/
    "Joel Lucuik" <[email protected]> wrote in message
    news:3c6d53cb$[email protected]..
    Hi,
    We have a client communicating with a server via a session bean,
    using
    RMI-IIOP.
    The client that is sending "sessionBean.foo(A a)", where "A" is aserializable
    object that contains a Hashtable "h", and "a.h" is initialized to
    a new
    Hashtable.
    When we look at A inside the sessionBean, "h" contains null. Is itpossible that
    somewhere in the marshalling process, "h" was nulled out?
    We have tried this, all in WLS 6.1 SP2:
    - compiling and running in JDK1.3.1_02, client and server
    - compiling and running in JDK1.3.1_01, client and server
    Thanks for your help,
    Joel

  • Rmi iiop http ?

    Hi,
    I'd like to have some precisions about the communication between a
    remote java fat client and a weblogic ejb container.
    We should use RMI, but what is the protocol we have to use : RMI IIOP
    or HTTP
    Can we wrap rmi with http ?
    thanks in advance

    You can use RMI over t3(weblogic specific) or IIOP.
    Please take a look at http://edocs.bea.com/wls/docs81/rmi_iiop/index.html
    -utpal
    "truecolor" <[email protected]> wrote in message
    news:[email protected]..
    Hi,
    I'd like to have some precisions about the communication between a
    remote java fat client and a weblogic ejb container.
    We should use RMI, but what is the protocol we have to use : RMI IIOP
    or HTTP
    Can we wrap rmi with http ?
    thanks in advance

  • RMI /IIOP  VPN WL 5.1

    Hi All,
    Is it possible for 2 WL 5.1 containers (EJBs) to communicate with each
    oher when
    they are connected by VPN and use RMI /IIOP ?
    -thanks
    SAndeep

    [email protected] (Kurt Seidensticker) writes:
    Is it possible to use RMI-IIOP between WLS 5.1 and 6.1?
    I am trying to figure out a way to have EJB's
    communicate between the two version.Not now, but the intent is for that to work before the end of the
    year.
    andy

Maybe you are looking for

  • BW upgrade - landscape / development paths - need help

    hi - is there any whitepaper or oss note that helps provide some best practice for how to handle a landscape during a bw upgrade. normally you would have the "normal" path to production where development occurs and is transported up.  and normally in

  • CONNECT -TIME FAILOVER ERROR IN ORACLE 10G ENTERPRISE MANAGER

    Hi All, Please can anyone explain why I am getting this error and how to fix it? I was trying this exercise to create a backup LISTENER to support a connect-time failover in Enterprise manager.The steps were .1)I clicked the Listener's link on Databa

  • Understanding the gc log

    Hi, I'm trying to understand the garbage collection log (1.4.2). I have log statements in there like: 14325.110: [GC 14325.110: [DefNew: 111691K->111691K(118016K), 0.0000206 secs]14325.111: [Tenured: 283068K->298347K(393216K), 4.1681840 secs] 394760K

  • FB 4.5.1 iOS packaging failed

    Hi, I managed to sign PlayBook app successfully, but failed to sign iOS app. I uploaded correct .p12 certificate and distribution provision that I used in my xcode, input correct password, then I clicked on Finish button. I saw the message of "Packag

  • Is it possible to reboot a Macbook?

    My trackpad is not responding to clicking on it.  It will highlight an item on the desktop but when I press the track pad it doesn't nothing.  Our old Mac laptop had a battery that you could remove, thus you were able to "reset" it when it acted up.