RMI-IIOP NoSuchObjectException

I have looked up an EJB from the Weblogic tree. I am attempting to call on method
on this EJB, and the method takes a reference to my client object. I have created
the stub for the client using JBuilder's rmic with the options of -v1.2 and -iiop.
I also export the object in the constructor of the client using UnicastRemoteObject.exportObject(this).
1) When I attempt to put the wlclient.jar and wljmsclient.jar in the classpath
of my client, the
following error occurs:
java.rmi.NoSuchObjectException: CORBA INV_OBJREF 0 No; nested exception is:
org.omg.CORBA.INV_OBJREF: client.Client not exported or is a JRMP stub vmcid:
0x0 minor
code: 0 completed: No
at com.sun.corba.se.internal.iiop.ShutdownUtilDelegate.mapSystemException
(ShutdownUtilDelegate.java:91)
2) When I put the weblogic.jar (without the 2 client.jar files) in my classpath,
this error does
not occur.
Thanks in advance,
Joel

"Joel" <[email protected]> wrote:
>
Andy Piper <[email protected]> wrote:
"Joel" <[email protected]> writes:
The problem seems to be the same when I do an ant compile, rmic, andjar. Is
there
something special that I need to do on the client side besides havingthe Stubs
and Ties
available and exporting the object using UnicastRemoteObject.exportObject(..)?
I'm stumpbed.You should probably use PortableRemoteObject.exportObject() rather
than UnicastRemoteObject.exportObject(). You should probably also make
your client object implementation extend PortableRemoteObject. The JDK
does some special magic in these classes. UnicastRemoteObject is more
a JRMP thing. We use PRO in our tests.
andyAndy,
Thanks for the help. I now have my client object extending the PortableRemoteObject
rather
than using UnicastRemoteObject's exportObject method. That cures the
previous
error. Now
I'm getting a different error. It occurs in the same place, when I attempt
to
send my client as
a parameter to the server. Both are using the exact same JDK and the
same class
files.
Please advise.
Exception in thread "main" java.io.IOException: Invalid indirection to
offset
84
88
at com.sun.corba.se.internal.io.IIOPInputStream.throwExceptionType(Nativ
e Method)
at com.sun.corba.se.internal.io.IIOPInputStream.defaultReadObjectDelegat
e(IIOPInputStream.java:446)
at com.sun.corba.se.internal.io.InputStreamHook.defaultReadObject(InputS
treamHook.java:163)
at java.text.DecimalFormat.readObject(DecimalFormat.java:2506)
at com.sun.corba.se.internal.io.IIOPInputStream.readObject(Native
Method
at com.sun.corba.se.internal.io.IIOPInputStream.invokeObjectReader(IIOPI
nputStream.java:1298)
at com.sun.corba.se.internal.io.IIOPInputStream.inputObject(IIOPInputStr
eam.java:908)
at com.sun.corba.se.internal.io.IIOPInputStream.simpleReadObject(IIOPInp
utStream.java:261)
at com.sun.corba.se.internal.io.ValueHandlerImpl.readValueInternal(Value
HandlerImpl.java:247)
at com.sun.corba.se.internal.io.ValueHandlerImpl.readValue(ValueHandlerI
mpl.java:209)
at com.sun.corba.se.internal.iiop.CDRInputStream_1_0.read_value(CDRInput
Stream_1_0.java:1075)
at com.sun.corba.se.internal.iiop.CDRInputStream.read_value(CDRInputStre
am.java:293)
at com.sun.corba.se.internal.io.IIOPInputStream.inputObjectField(IIOPInp
utStream.java:1577)
at com.sun.corba.se.internal.io.IIOPInputStream.inputClassFields(IIOPInp
utStream.java:1796)
at com.sun.corba.se.internal.io.IIOPInputStream.inputObject(IIOPInputStr
...(more stuff from this exception then: )
java.rmi.MarshalException: CORBA MARSHAL 1398079699 Maybe; nested exception
is:
org.omg.CORBA.MARSHAL: Unable to read value from underlying bridge
: Una
ble to read value from underlying bridge : Unable to read value from
underlying
bridge : Unable to read value from underlying bridge : Unable to read
value from
underlying bridge : Unable to read value from underlying bridge : Unable
to rea
d value from underlying bridge : Unable to read value from underlying
bridge :
U
nable to read value from underlying bridge : Unable to read value from
underlyin
g bridge : Unable to read value from underlying bridge : Serializable
readObject
method failed internally vmcid: SUN minor code: 211 completed: Maybe
at com.sun.corba.se.internal.iiop.ShutdownUtilDelegate.mapSystemExceptio
n(ShutdownUtilDelegate.java:97)
at javax.rmi.CORBA.Util.mapSystemException(Util.java:65)
Any help would be GREATLY appreciated.
Thanks,
Joel
It is also important to note that this error only occurs when wlclient.jar and
wljmsclient.jar are in
the classpath and weblogic.jar is not. When weblogic.jar is in the client's classpath,
everything
works fine.

Similar Messages

  • RMI-IIOP and glassfish naming service

    I have some very basic test applications to test RMI-IIOP. The applications are one server (registers the Remote object) and one client (tries to retreive the remote object stub and invoke a simple hello() method).
    I've been trying to get it to work by registering the Remote object (see below) in glassfish naming service (JNDI) but I get the following an error saying: "Class rmi.ListenerRemoteImpl not exported, or else is actually a JRMP stub". I haven't been able to figure out why...
    Then I found another guide which I followed and managed to get to work. The only difference there was that I used orbd as naming service.
    Why is this? Doesn't Glassfish JNDI support RMI-IIOP in this way?
    Any help is greatly appreciated!
    I followed the following steps in creating the application:
    -Created the following classes:
    Client.java //The client
    Server.java //The server
    ListenerRemote.java //Remote interface implementing Remote
    ListenerRemoteImpl.java //Implemtation extends PortableRemoteObject and implements ListenerRemote
    -Generated stubs with rmic using -iiop
    -Compile and run...

    Here is some of the code...
    Client that fails with glassfish but not with orbd:
    =========================================
    public static void main(String[] args) throws Exception {
    ListenerRemoteImpl listener = new ListenerRemoteImpl();
    Properties props = new Properties();
    props.load(new FileInputStream("jndi.properties"));
    //Uncommenting this and starting orbd makes it work. When default jndi.properties from Glassfish is used, it does not work.
    //props.put("java.naming.factory.initial", "com.sun.jndi.cosnaming.CNCtxFactory");
    //props.put("java.naming.provider.url", "iiop://localhost:1060");
    Context ctx = new InitialContext(props);
    ctx.rebind("listener", listener);
    System.out.println("Listener bound!");
    ==================================
    ListenerRemoteImpl:
    ==================================
    public class ListenerRemoteImpl extends PortableRemoteObject implements ListenerRemote {
    public ListenerRemoteImpl() throws RemoteException {
    super();
    public void sayHello() throws RemoteException {
    System.out.println("Hello!");
    ==================================
    The stacktrace when glassfish naming service is used:
    ==================================
    2007-aug-10 17:24:32 com.sun.corba.ee.impl.util.Utility autoConnect
    VARNING: "IOP00511403: (INV_OBJREF) Class rmi.ListenerRemoteImpl not exported, or else is actually a JRMP stub"
    org.omg.CORBA.INV_OBJREF: vmcid: SUN minor code: 1403 completed: No
    at com.sun.corba.ee.impl.logging.UtilSystemException.objectNotExported(UtilSystemException.java:569)
    at com.sun.corba.ee.impl.logging.UtilSystemException.objectNotExported(UtilSystemException.java:592)
    at com.sun.corba.ee.impl.util.Utility.autoConnect(Utility.java:147)
    at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.writeAny(Util.java:323)
    at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl$10.write(DynamicMethodMarshallerImpl.java:256)
    at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl.writeArguments(DynamicMethodMarshallerImpl.java:407)
    at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:157)
    at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:119)
    at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(BCELStubBase.java:197)
    at com.sun.enterprise.naming._SerialContextProvider_DynamicStub.rebind(_SerialContextProvider_DynamicStub.java)
    at com.sun.enterprise.naming.SerialContext.rebind(SerialContext.java:403)
    at javax.naming.InitialContext.rebind(InitialContext.java:408)
    at rmi.Client.main(Client.java:48)
    Exception in thread "main" javax.naming.CommunicationException: java.rmi.NoSuchObjectException: CORBA INV_OBJREF 1398080891 No; nested exception is:
    org.omg.CORBA.INV_OBJREF: vmcid: SUN minor code: 1403 completed: No
    at com.sun.enterprise.naming.SerialContext.rebind(SerialContext.java:405)
    at javax.naming.InitialContext.rebind(InitialContext.java:408)
    at rmi.Client.main(Client.java:48)
    ==================================

  • Rmi-iiop authentication and EJB

    In WL6.1, I have an Ejb with secured methods. The (Swing) client application accesses the Ejb through rmi-iiop using the JDK1.3.1 Orb.
    Unfortunately, it seems that the caller identity (which was supplied in the InitialContext lookup) is not propagated
    to the server: any call to a secured method
    fails with a CORBA NO_PERMISSION Exception.
    Using the t3 protocol the program works fine, but that would require the 25Mb weblogic.jar on all clients, which is unattainable for us.
    Any ideas how this situation can be corrected?
    -Allard Siemelink

    Hello Allard,
    My only suggestion (and you have probably looked at this already) would be to
    use the Verbosetozip utility, refer to http://e-docs.bea.com/wls/docs61////adminguide/utils.html#1117405
    for more information.
    Kind Regards,
    Richard Wallace
    Senior Developer Relations Engineer
    BEA Support.
    Allard Siemelink <[email protected]> wrote:
    In WL6.1, I have an Ejb with secured methods. The (Swing) client application
    accesses the Ejb through rmi-iiop using the JDK1.3.1 Orb.
    Unfortunately, it seems that the caller identity (which was supplied
    in the InitialContext lookup) is not propagated
    to the server: any call to a secured method
    fails with a CORBA NO_PERMISSION Exception.
    Using the t3 protocol the program works fine, but that would require
    the 25Mb weblogic.jar on all clients, which is unattainable for us.
    Any ideas how this situation can be corrected?
    -Allard Siemelink

  • Rmi-iiop: calling secured method on Ejb -- NO PERMISSION Exception

    In WL6.1, I have an Ejb with secured methods. The (Swing) client application accesses the Ejb through rmi-iiop using the JDK1.3.1 Orb.
    Unfortunately, it seems that the caller identity (which was supplied in the InitialContext lookup) is not propagated
    to the server: any call to a secured method
    fails with a CORBA NO_PERMISSION Exception.
    Using the t3 protocol the program works fine, but that would require the 25Mb weblogic.jar on all clients, which is unattainable for us.
    Any ideas how this situation can be corrected?
    -Allard Siemelink

    Hi Allard,
    Please pose this in the weblogic.developer.interest.rmi-iiop.
    Thanks,
    Allard Siemelink wrote:
    In WL6.1, I have an Ejb with secured methods. The (Swing) client application accesses the Ejb through rmi-iiop using the JDK1.3.1 Orb.
    Unfortunately, it seems that the caller identity (which was supplied in the InitialContext lookup) is not propagated
    to the server: any call to a secured method
    fails with a CORBA NO_PERMISSION Exception.
    Using the t3 protocol the program works fine, but that would require the 25Mb weblogic.jar on all clients, which is unattainable for us.
    Any ideas how this situation can be corrected?
    -Allard Siemelink--
    Apurb Kumar
    Developer Relations Engineer
    BEA Support

  • RMI-IIOP client - CORBA Server

    I already have a CORBA server in C++ which has already been written. I am trying to develop an RMI-IIOP client which would talk to this CORBA Server.
    The CORBA server has several interfaces that I would like to use with my RMI-IIOP client. How do I proceed?? Can somebody give me an example of an RMI-IIOP client? Basically my question is: how do I take the IDL and build an RMI-IIOP client with it???

    Hello
    I already have a CORBA server in C++ which has already
    been written. I am trying to develop an RMI-IIOP
    client which would talk to this CORBA Server.
    The CORBA server has several interfaces that I would
    like to use with my RMI-IIOP client. How do I
    proceed?? Can somebody give me an example of an
    RMI-IIOP client? Basically my question is: how do I
    take the IDL and build an RMI-IIOP client with it???The steps to do are the following:
    * Creating the Remote interface
    * Using the rmic compiler to genarate the IDL and the client stub.
    * Generating stub and skeleton of the C++ server using that IDL (the one you already made is no longer compatible)
    * Bulding up the new C++ server
    * Using a nameservice (tnameserver for example) and binding your server to that.
    * Writing the RMI-IIOP client
    I proceeded like this (using Visibroker 4.5 on the server side) and I was able to do it... but as you can see from my last post, I wasn't able to pass Strings from the client to the server.
    Bye

  • 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.

  • Screwey rmi-iiop behavior

    I got the rmi-iiop example code to work just fine, but I tried extending
    it a little and strangeness ensues. Here's what I did:
    I'm using a stock weblogic 6.0 install on solaris 8 (sparc). I added
    the following new method to the Trader interface:
    public void func(javax.naming.Name n) throws RemoteException;
    and I added the implementation of that method to TraderBean like so:
    public void func(javax.naming.Name n) {
    System.out.prinltn("n [" + n + "]");
    I then added a call to the new Trader function to the end of the
    example() method in Client, just before the trader is removed:
    try {
    com.sun.jndi.ldap.LdapName lname =
    new com.sun.jndi.ldap.LdapName("a=b");
    trader.func(lname);
    } catch (javax.naming.NamingException ne) {
    ne.printStackTrace();
    Then I compiled everything using the supplied build.sh, copied the
    ejb_over_iiop.jar into config/mydomain/applications, and ran
    startWebLogic.sh int the config/mydomain directory to start the server.
    I then run the client like so (using the 1.3 java version included with
    weblogic 6.0):
    java -cp
    /opt/bea/wlserver6.0/config/examples/clientclasses:/opt/bea/wlserver6.0/config/mydomain/applications:/opt/bea/wlserver6.0/lib/weblogic.jar
    examples.rmi_iiop.ejb.rmi_iiop.Client iiop://localhost:7001
    And I get the following output:
    Beginning statelessSession.Client...
    Creating a trader
    Buying 100 shares of BEAS.
    Buying 200 shares of MSFT.
    Buying 300 shares of AMZN.
    Buying 400 shares of HWP.
    Selling 100 shares of BEAS.
    Selling 200 shares of MSFT.
    Selling 300 shares of AMZN.
    Selling 400 shares of HWP.
    There was an exception while creating and using the Trader.
    This indicates that there was a problem communicating with the server:
    java.rmi.RemoteException: CORBA UNKNOWN 0 No; nested exception is:
    org.omg.CORBA.UNKNOWN: minor code: 0 completed: No
    End statelessSession.Client...
    Basically the call to the new method fails, and the server communication
    error it produces doesn't provide much information. So question #1 is,
    what's going on here?
    And here's the really weird part: if I change the method signatures in
    Trader and TraderBean so that the argument type is the concrete class
    com.sun.jndi.ldap.LdapName instead of the interface javax.naming.Name
    (which does extend java.io.Serializable, incidentally), it works fine!
    I tried this with my own interfaces and concrete classes, and I get the
    same strange behavior: calling methods with interface argument types on
    the ejb via rmi-iiop fails with the above cryptic error, but methods
    with concrete argument types work fine.
    I also tried this out on a non-ejb rmi-iiop server object using jdk 1.3
    but not weblogic. In that case both interfaces and concrete method
    argument types work just fine.
    Now I'm wondering if this could be a bug in weblogic.ejbc's iiop
    generation. Can anyone else verify this problem?
    Edwin Park
    [email protected]

    Comments in line...
    Edwin Park wrote:
    I got the rmi-iiop example code to work just fine, but I tried extending
    it a little and strangeness ensues. Here's what I did:
    I'm using a stock weblogic 6.0 install on solaris 8 (sparc). I added
    the following new method to the Trader interface:
    public void func(javax.naming.Name n) throws RemoteException;
    and I added the implementation of that method to TraderBean like so:
    public void func(javax.naming.Name n) {
    System.out.prinltn("n [" + n + "]");
    I then added a call to the new Trader function to the end of the
    example() method in Client, just before the trader is removed:
    try {
    com.sun.jndi.ldap.LdapName lname =
    new com.sun.jndi.ldap.LdapName("a=b");
    trader.func(lname);
    } catch (javax.naming.NamingException ne) {
    ne.printStackTrace();
    Then I compiled everything using the supplied build.sh, copied the
    ejb_over_iiop.jar into config/mydomain/applications, and ran
    startWebLogic.sh int the config/mydomain directory to start the server.
    I then run the client like so (using the 1.3 java version included with
    weblogic 6.0):
    java -cp
    /opt/bea/wlserver6.0/config/examples/clientclasses:/opt/bea/wlserver6.0/config/mydomain/applications:/opt/bea/wlserver6.0/lib/weblogic.jar
    examples.rmi_iiop.ejb.rmi_iiop.Client iiop://localhost:7001
    And I get the following output:
    Beginning statelessSession.Client...
    Creating a trader
    Buying 100 shares of BEAS.
    Buying 200 shares of MSFT.
    Buying 300 shares of AMZN.
    Buying 400 shares of HWP.
    Selling 100 shares of BEAS.
    Selling 200 shares of MSFT.
    Selling 300 shares of AMZN.
    Selling 400 shares of HWP.
    There was an exception while creating and using the Trader.
    This indicates that there was a problem communicating with the server:
    java.rmi.RemoteException: CORBA UNKNOWN 0 No; nested exception is:
    org.omg.CORBA.UNKNOWN: minor code: 0 completed: No
    End statelessSession.Client...
    Basically the call to the new method fails, and the server communication
    error it produces doesn't provide much information. So question #1 is,
    what's going on here?
    Marshaling through the interface apparently fails. What orb are you using on the client?
    >
    And here's the really weird part: if I change the method signatures in
    Trader and TraderBean so that the argument type is the concrete class
    com.sun.jndi.ldap.LdapName instead of the interface javax.naming.Name
    (which does extend java.io.Serializable, incidentally), it works fine!It appears that marshaling an interface (or abstract class) fails, but marshaling a concrete class succeeds.
    >
    >
    I tried this with my own interfaces and concrete classes, and I get the
    same strange behavior: calling methods with interface argument types on
    the ejb via rmi-iiop fails with the above cryptic error, but methods
    with concrete argument types work fine.
    I also tried this out on a non-ejb rmi-iiop server object using jdk 1.3
    but not weblogic. In that case both interfaces and concrete method
    argument types work just fine.
    Now I'm wondering if this could be a bug in weblogic.ejbc's iiop
    generation. Can anyone else verify this problem?I'll look into this.
    >
    >
    Edwin Park
    [email protected]

  • RMI-IIOP Example for Java SE 6

    Hi.
    Can someone provide me an example (link or code) of how to write an RMI-IIOP remote object, bind it to jndi (glassfish) and then call it from within the glassfish application server (I'm calling from an EJB).
    The guide available at http://java.sun.com/javase/6/docs/technotes/guides/rmi-iiop/tutorial.html is unfortunately not helpful because it the code there does not work when binding the remote object in glassfish JNDI (using empty InitialContext constructor) as opposed to the orbd daemon that is described in the guide.
    Am I not allowed to bind RMI-IIOP objects in glassfish application server JNDI, i.e. do I have to use orbd?
    Do you have to generate stubs for the remote objects in Java SE6? The tutorial says to do it but the exception I get on glassfish application server is not from the _<interface-name>Stub.java but rather from <interface-name>_DynamicStub.java.
    Any help is greatly appreciated!

    Are you trying to create an RMI-IIOP server inside an
    Application Server (Glassfish)?I'm not really sure about how it all works but I don't think so. I am exporting my Remote objects (using PortableRemoteObject) from a standalone Java SE client app. Relating this to normal RMI I had assumed that this automatically started an RMI-IIOP server on an anonomous port, although I now see that the javadoc says that the export method only "Makes a server object ready to receive remote calls.", whatever that means. So if calling the export method doesn't start an RMI-IIOP server then I'm guessing I would have to start one, and then yes, if possible, I would like to do it in glassfish and avoid starting up more applications.
    I am guessing I am missing something fundamental here..
    The tutorial uses the JNDI Registry (tnameserv). (and
    it works fine)Is that what is automatically started when glassfish application server is started?
    Have you looked into using a Portable Object Adapter?No, I have not. I want to keep it as simple and close to regular RMI though, so if possible I would like to avoid POA.

  • 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

  • RMI-IIOP JNDI lookup returns com.sun.corba.se.internal.iiop.CDRInputStream

    I have two different RMI-IIOP java clients, one is working fine and the other is not. Both are using weblogic.jndi.WLInitialContextFactory from wlclient.jar in WLS 8.1sp5 and JDK 1.4.2_6.
    One java client is a straight-forward java main. JNDI lookup is returning EJBHome_Stub correctly loaded by sun.rmi.server.LoaderHandler$Loader
    The other java client is a complex java program with multiple threads and many jars. A thread does the same JNDI lookup as the simple java client, but the object returned is of type com.sun.corba.se.internal.iiop.CDRInputStream_1_0$1 which has NULL classloader (bootstrap classloader).
    What condition triggered the WebLogic InitialContext to default to com.sun.corba.se.internal.iiop.CDRInputStream?

    Kevin Fung <> writes:
    This is usally symptomatic of an IOR without the corresponding stub
    being loaded, usually because the correct security manager is not
    set. However the client jar bypasses the security manager to try and
    avoid this problem, so I am confused as to why you are seeing this. Do
    you know which object it is accessing? Can you try putting IIOP stubs
    for it in the client?
    andy
    I have two different RMI-IIOP java clients, one is working fine and the other is not. Both are using weblogic.jndi.WLInitialContextFactory from wlclient.jar in WLS 8.1sp5 and JDK 1.4.2_6.
    One java client is a straight-forward java main. JNDI lookup is returning EJBHome_Stub correctly loaded by sun.rmi.server.LoaderHandler$Loader
    The other java client is a complex java program with multiple threads and many jars. A thread does the same JNDI lookup as the simple java client, but the object returned is of type com.sun.corba.se.internal.iiop.CDRInputStream_1_0$1 which has NULL classloader (bootstrap classloader).
    What condition triggered the WebLogic InitialContext to default to com.sun.corba.se.internal.iiop.CDRInputStream?

  • How write rmi-iiop over ssl with weblogic server 6.1 - No server found

    //New
    Hello,
    I have written an appication like this:
    - An EJB server running on Weblogic server 6.1
    (named: BankServerHome)
    -A java client calling the BankServer.
    Platform: windows 2000 - jdk1.3
    Now I want to secure the communication with SSL protocol.
    I have done this:
    -generate a key peer with weblogic service named certificate.
    -send the CSR to a CA and place the answer into the weblogic
    server certificate directory.
    -update path for ServerCertificateChainFileName,
    ServerCertificateFileName, ServerKeyFileName into config.xml.
    -launch weblogicServer
         -> server certificate is recognized
         -> listening port 7001 and 7002.
    (-stop weblogicServer!)
    At now, all is all right, errors come hereafter:
    Then I follow the guideline "Programming weblogic Security" (version of 30/07/2001).
    "To use RMI over IIOP over SSL with a Java client, do the following:
    2. Extend the java.rmi.server.RMISocketFactory class to handle SSL socket
    connections. Be sure to specify the port on which WebLogic Server listens for
    SSL connections. For an example of a class that extends the
    java.rmi.server.RMISocketFactory class, see Listing 4-22.
    3. Run the ejbc compiler with the -d option.
    4. Add your extension of the java.rmi.server.RMISocketFactory class to the
    CLASSPATH of the Java client.
    5. Use the following command options when starting the Java client:
    -xbootclasspath/a:%CLASSPATH%
    -Dorg.omg.CORBA.ORBSocketFactoryClass=implementation of java.rmi.server.RMISocketFactory
    -Dssl.certs=directory location of digital certificate for Java client
    -Dssl.key=directory location of private key for Java client"
    At step 3. I found into documentation that -d is linked to a directory name.
    When I run ejbc with this option -d I have the message:
    "ERROR: You must specify an output directory or jar with the -d option to weblogic.ejbc."
    % So what option can I use to run ejbc for secure usage?
    At step 5. Whatever I write for -Dorg.omg.CORBA.ORBSocketFactoryClass,
    this pointed class is not instanciated.
    Then I can not create a socket with my client.
    The folowing exception is raised:
    javax.naming.CommunicationException [Root exception is java.net.ConnectException:
    No server found at T3S://localhost:7002]
    So, my questions are:
    % Why -Dorg.omg.CORBA.ORBSocketFactoryClass must be known by the client and not
    the server?
    My java client part, managing connection is:
    -------------------BEGIN OF CONNECTION MANAGER-------------------
    Properties env = new Properties ();
    // Shouldn't have to do this, but for now you must
    if ( factory.equals ("weblogic.jndi.WLInitialContextFactory") ) {
    env.put ("java.naming.provider.url", "t3s://localhost:7002");
    InitialContext context = new InitialContext (env);
    BankSessionServerHome bssh = (BankServerHome) context.lookup("BankServerHome");
    BankServer = bssh.create();
    -------------------END OF CONNECTION MANAGER-------------------
    I have also try
    env.put ("java.naming.provider.url", "corbaloc:iiop://localhost:7002");
    but it throws the following error
    javax.naming.InvalidNameException: url does not conatin !!!
    % What is the code for the java client allowing connection with the ejb?
    % And better, can I have a sample example for rmi-iiop over ssl?
    (...wlserver6.1\samples\examples\iiop\ejb\stateless\rmiclient\client.java do not
    speak ssl!)
    Any help will be appreciate from you...
    Best Regards.
    Oliver

    "oliver" <[email protected]> writes:
    The SSL support is poorly doc'd right now. We have fixed this and
    updated the way you do things in SP2. Please either wait for SP2 or
    contact support.
    andy
    I have written an appication like this:
    - An EJB server running on Weblogic server 6.1
    (named: BankServerHome)
    -A java client calling the BankServer.
    Platform: windows 2000 - jdk1.3
    Now I want to secure the communication with SSL protocol.
    I have done this:
    -generate a key peer with weblogic service named certificate.
    -send the CSR to a CA and place the answer into the weblogic
    server certificate directory.
    -update path for ServerCertificateChainFileName,
    ServerCertificateFileName, ServerKeyFileName into config.xml.
    -launch weblogicServer
         -> server certificate is recognized
         -> listening port 7001 and 7002.
    (-stop weblogicServer!)
    At now, all is all right, errors come hereafter:
    Then I follow the guideline "Programming weblogic Security" (version of 30/07/2001).
    "To use RMI over IIOP over SSL with a Java client, do the following:
    2. Extend the java.rmi.server.RMISocketFactory class to handle SSL socket
    connections. Be sure to specify the port on which WebLogic Server listens for
    SSL connections. For an example of a class that extends the
    java.rmi.server.RMISocketFactory class, see Listing 4-22.
    3. Run the ejbc compiler with the -d option.
    4. Add your extension of the java.rmi.server.RMISocketFactory class to the
    CLASSPATH of the Java client.
    5. Use the following command options when starting the Java client:
    -xbootclasspath/a:%CLASSPATH%
    -Dorg.omg.CORBA.ORBSocketFactoryClass=implementation of java.rmi.server.RMISocketFactory
    -Dssl.certs=directory location of digital certificate for Java client
    -Dssl.key=directory location of private key for Java client"
    At step 3. I found into documentation that -d is linked to a directory name.
    When I run ejbc with this option -d I have the message:
    "ERROR: You must specify an output directory or jar with the -d option to weblogic.ejbc."
    % So what option can I use to run ejbc for secure usage?
    At step 5. Whatever I write for -Dorg.omg.CORBA.ORBSocketFactoryClass,
    this pointed class is not instanciated.
    Then I can not create a socket with my client.
    The folowing exception is raised:
    javax.naming.CommunicationException [Root exception is java.net.ConnectException:
    No server found at T3S://localhost:7002]
    So, my questions are:
    % Why -Dorg.omg.CORBA.ORBSocketFactoryClass must be known by the client and not
    the server?
    My java client part, managing connection is:
    -------------------BEGIN OF CONNECTION MANAGER-------------------
    Properties env = new Properties ();
    // Shouldn't have to do this, but for now you must
    if ( factory.equals ("weblogic.jndi.WLInitialContextFactory") ) {
    env.put ("java.naming.provider.url", "t3s://localhost:7002");
    InitialContext context = new InitialContext (env);
    BankSessionServerHome bssh = (BankServerHome) context.lookup("BankServerHome");
    BankServer = bssh.create();
    -------------------END OF CONNECTION MANAGER-------------------
    I have also try
    env.put ("java.naming.provider.url", "corbaloc:iiop://localhost:7002");
    but it throws the following error
    javax.naming.InvalidNameException: url does not conatin !!!
    % What is the code for the java client allowing connection with the ejb?
    % And better, can I have a sample example for rmi-iiop over ssl?
    (...wlserver6.1\samples\examples\iiop\ejb\stateless\rmiclient\client.java do not
    speak ssl!)
    Any help will be appreciate from you...
    Best Regards.
    Oliver

  • How write rmi-iiop over ssl with weblogic server 6.1?

    Hello,
    I have written an appication like this:
    - An EJB server running on Weblogic server 6.1
    (named: BankServerHome)
    -A java client calling the BankServer.
    Platform: windows 2000 - jdk1.4
    Now I want to secure the communication with SSL protocol.
    I have done this:
    -generate a key peer with weblogic service named certificate.
    -send the CSR to a CA and place the answer into the weblogic
    server certificate directory.
    -update path for ServerCertificateChainFileName,
    ServerCertificateFileName, ServerKeyFileName into config.xml.
    -launch weblogicServer
         -> server certificate is recognized
         -> listening port 7001 and 7002.
    (-stop weblogicServer!)
    At now, all is all right, errors come hereafter:
    Then I follow the guideline "Programming weblogic Security" (version of 30/07/2001).
    "To use RMI over IIOP over SSL with a Java client, do the following:
    2. Extend the java.rmi.server.RMISocketFactory class to handle SSL socket
    connections. Be sure to specify the port on which WebLogic Server listens for
    SSL connections. For an example of a class that extends the
    java.rmi.server.RMISocketFactory class, see Listing 4-22.
    3. Run the ejbc compiler with the -d option.
    4. Add your extension of the java.rmi.server.RMISocketFactory class to the
    CLASSPATH of the Java client.
    5. Use the following command options when starting the Java client:
    -xbootclasspath/a:%CLASSPATH%
    -Dorg.omg.CORBA.ORBSocketFactoryClass=implementation of java.rmi.server.RMISocketFactory
    -Dssl.certs=directory location of digital certificate for Java client
    -Dssl.key=directory location of private key for Java client"
    At step 3. I found into documentation that -d is linked to a directory name.
    When I run ejbc with this option -d I have the message:
    "ERROR: You must specify an output directory or jar with the -d option to weblogic.ejbc."
    % So what option can I use to run ejbc for secure usage?
    At step 5. Whatever I write for -Dorg.omg.CORBA.ORBSocketFactoryClass,
    this pointed class is not instanciated.
    Then I can not create a socket with my client.
    The folowing exception is raised:
    javax.naming.CommunicationException [Root exception is java.net.ConnectException:
    No server found at T3S://localhost:7002]
    So, my questions are:
    % Why -Dorg.omg.CORBA.ORBSocketFactoryClass must be known by the client and not
    the server?
    My java client part, managing connection is:
    -------------------BEGIN OF CONNECTION MANAGER-------------------
    Properties env = new Properties ();
    // Shouldn't have to do this, but for now you must
    if ( factory.equals ("weblogic.jndi.WLInitialContextFactory") ) {
    env.put ("java.naming.provider.url", "t3s://localhost:7002");
    } else {
    env.put ("java.naming.provider.url", "rmi://localhost:7002");
    InitialContext context = new InitialContext (env);
    BankSessionServerHome bssh = (BankServerHome) context.lookup("BankServerHome");
    BankServer = bssh.create();
    -------------------END OF CONNECTION MANAGER-------------------
    % What is the code for the java client allowing connection with the ejb?
    % And better, can I have a sample example for rmi-iiop over ssl?
    (...wlserver6.1\samples\examples\iiop\ejb\stateless\rmiclient\client.java do not
    speak ssl!)
    Any help will be appreciate from you...
    Best Regards.
    Oliver

    "oliver" <[email protected]> writes:
    First off 1.4 isn't supported as yet. That is probably part of the problem.
    You also must use a corba URL from the client in order for this to work for instance:
    If you are using WLInitialContextFactory:
    corbaloc:iiop:localhost:7001/NameService
    If you are using CNCtxFactory:
    iiop://localhost:7001
    Using rmi: is the wrong thing to do - that will use jrmp or t3.
    However, I suggest that you raise a call with support since there is
    some other trickiness with getting SSL working. We hope to have this
    much improved in SP2.
    andy
    Hello,
    I have written an appication like this:
    - An EJB server running on Weblogic server 6.1
    (named: BankServerHome)
    -A java client calling the BankServer.
    Platform: windows 2000 - jdk1.4
    Now I want to secure the communication with SSL protocol.
    I have done this:
    -generate a key peer with weblogic service named certificate.
    -send the CSR to a CA and place the answer into the weblogic
    server certificate directory.
    -update path for ServerCertificateChainFileName,
    ServerCertificateFileName, ServerKeyFileName into config.xml.
    -launch weblogicServer
         -> server certificate is recognized
         -> listening port 7001 and 7002.
    (-stop weblogicServer!)
    At now, all is all right, errors come hereafter:
    Then I follow the guideline "Programming weblogic Security" (version of 30/07/2001).
    "To use RMI over IIOP over SSL with a Java client, do the following:
    2. Extend the java.rmi.server.RMISocketFactory class to handle SSL socket
    connections. Be sure to specify the port on which WebLogic Server listens for
    SSL connections. For an example of a class that extends the
    java.rmi.server.RMISocketFactory class, see Listing 4-22.
    3. Run the ejbc compiler with the -d option.
    4. Add your extension of the java.rmi.server.RMISocketFactory class to the
    CLASSPATH of the Java client.
    5. Use the following command options when starting the Java client:
    -xbootclasspath/a:%CLASSPATH%
    -Dorg.omg.CORBA.ORBSocketFactoryClass=implementation of java.rmi.server.RMISocketFactory
    -Dssl.certs=directory location of digital certificate for Java client
    -Dssl.key=directory location of private key for Java client"
    At step 3. I found into documentation that -d is linked to a directory name.
    When I run ejbc with this option -d I have the message:
    "ERROR: You must specify an output directory or jar with the -d option to weblogic.ejbc."
    % So what option can I use to run ejbc for secure usage?
    At step 5. Whatever I write for -Dorg.omg.CORBA.ORBSocketFactoryClass,
    this pointed class is not instanciated.
    Then I can not create a socket with my client.
    The folowing exception is raised:
    javax.naming.CommunicationException [Root exception is java.net.ConnectException:
    No server found at T3S://localhost:7002]
    So, my questions are:
    % Why -Dorg.omg.CORBA.ORBSocketFactoryClass must be known by the client and not
    the server?
    My java client part, managing connection is:
    -------------------BEGIN OF CONNECTION MANAGER-------------------
    Properties env = new Properties ();
    // Shouldn't have to do this, but for now you must
    if ( factory.equals ("weblogic.jndi.WLInitialContextFactory") ) {
    env.put ("java.naming.provider.url", "t3s://localhost:7002");
    } else {
    env.put ("java.naming.provider.url", "rmi://localhost:7002");
    InitialContext context = new InitialContext (env);
    BankSessionServerHome bssh = (BankServerHome) context.lookup("BankServerHome");
    BankServer = bssh.create();
    -------------------END OF CONNECTION MANAGER-------------------
    % What is the code for the java client allowing connection with the ejb?
    % And better, can I have a sample example for rmi-iiop over ssl?
    (...wlserver6.1\samples\examples\iiop\ejb\stateless\rmiclient\client.java do not
    speak ssl!)
    Any help will be appreciate from you...
    Best Regards.
    Oliver

  • 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

  • RMI - IIOP Warnings from JBoss

    Hi all,
    I deploy my EJB's under JBoss, and I get such message for every function in every home interface:
    Bean : ewpsAddressHome
    Method : public abstract Address create(ValueObject) throws CreateException, EJBException, RemoteException
    Section: 9.2.8
    Warning: The method return values in the home interface must be of valid types for RMI/IIOP.
    Got any ideas? :-))
    thanx,
    Nick

    Hi all,
    I deploy my EJB's under JBoss, and I get such message
    for every function in every home interface:
    Bean : ewpsAddressHome
    Method : public abstract Address create(ValueObject)
    throws CreateException, EJBException, RemoteException
    Section: 9.2.8
    Warning: The method return values in the home
    interface must be of valid types for RMI/IIOP.
    Got any ideas? :-))
    thanx,
    Nickdo you solve the problem? because i encounter the same one, but have no idea the reason why.
    hope someone can give me suggestions,
    i appreciate it.
    thank you very much.

  • Losing RMI-IIOP connection at server end

    Hi all
    I have a system running on Solaris 9, JVM 1.4.2_06 with a webapp hosted in Tomcat 5.5 connecting over RMI-IIOP to another java service on the same machine. The connection is established at webapp initialisation via a lookup to the naming service (currently tnameserv).
    Unfortunately, after a period of time (varies between a few hours and a couple of days), the RMI connection simply disappears from the server-side point of view, and the webapp grinds to a halt. Taking a thread dump of Tomcat and the service at the point of failure shows that Tomcat still has "JavaIDL Reader" threads listening to the service, but the service has lost all of its "JavaIDL Reader" threads listening to Tomcat.
    I've traced the problem as far as line 518 of com.sun.corba.se.internal.iiop.messages.MessageBase:
    bytecount = is.read(buf, offset + n, size - n);This read on the InputStream is throwing an IOException. I have configured the system so that IP address 127.0.0.1 is being used in all places.
    It may well be that this is not the right forum for this question, but has anyone else ever come across a problem like this? All suggestions most welcome.
    Regards
    Brian

    In trying to find an answer to your question, have actually discovered that the root cause of the issue is actually a little lower in the stack.
    SocketInputStream.read(byte[],int,int) is returning -1 (EOF), and this is being interpretted into an IOException by the MessageBase class. So now I need to work out why this unexpected EOF may be occurring on this platform.
    I imagine this is no longer very relevant to the RMI forum. I've posted on the Socket Programming forum.
    Regards
    Brian

Maybe you are looking for

  • Time Machine eject in OSX 10.9.3

    After installing OSX 10.9.3 I am unable to use my LaCie external drive for Time Machine backups.  I continue to receive "failure to eject" notices on my desktop. I do not see the LaCie external drive within Time Machine preferences as a backup altern

  • While run "Program - Run Financial Statement Generator" occurs errors? why

    while running "Program - Run Financial Statement Generator" occurs errors? Program - Publish FSG Report output: The concurrent request ID of your FSG request is 309112. The concurrent request ID of your XML Report Publisher request is 309113. hawk_BS

  • Customize GL Posting from Logistic

    Hi everyone, today, i have one problem related to GL Posting from Logistic. As anyone know, all posting like A/R Invoice, Incomming Payment and so on, each time we click add then it will post to GL automatically by taking account code from GL Determi

  • Problem when filling Node and Item tables for the metho add_nodes_and_items

    Hi Experts, I am facing problem when filling  Node and Item internal tables for the method add_nodes_and_items. as i have written the below logic:   LOOP AT gt_partner INTO wa_partner.     CLEAR lvs_tc_root.     l_key = l_key + 1.     lvs_tc_root-nod

  • Some things that bother me after installing BI on OAS

    Hi, I'm new to BI but have been working with Oracle's application server for years. I've deployed BI 10.1.3.4.1 on OAS 10.1.3.4. I've also deployed on different versions of OAS and found more problems but the ones below occur on all of them. The inst