Rmi iiop exception (orb)

Hi,
When i run my program i receive an exception. The orbd tool is running on port 900. Stubs are created for iiop. The class extends the PortableRemoteObject. This exception arises when creating the initialContext with:
Properties p = new Properties ();
p.put (Context.INITIAL_CONTEXT_FACTORY,
   "com.sun.jndi.cosnaming.CNCtxFactory");
p.put (Context.PROVIDER_URL,"iiop://localhost:900");
InitialContext ctx = new InitialContext (p);The exception is:
javax.naming.CommunicationException: Cannot connect to ORB.  Root exception is org.omg.CORBA.COMM_FAILURE:   vmcid: SUN  minor code: 201  completed: No
     at com.sun.corba.se.internal.iiop.ConnectionTable.getConnection(ConnectionTable.java:173)
     at com.sun.corba.se.internal.iiop.ConnectionTable.getConnection(ConnectionTable.java:65)
     at com.sun.corba.se.internal.iiop.GIOPImpl.getConnection(GIOPImpl.java:67)
     at com.sun.corba.se.internal.corba.ClientDelegate.createRequest(ClientDelegate.java:638)
     at com.sun.corba.se.internal.corba.ClientDelegate.createRequest(ClientDelegate.java:580)
     at com.sun.corba.se.internal.corba.InitialNamingClient.resolve(InitialNamingClient.java:1004)
     at com.sun.corba.se.internal.corba.InitialNamingClient.resolveUsingBootstrapProtocol(InitialNamingClient.java:687)
     at com.sun.corba.se.internal.corba.InitialNamingClient.cachedInitialReferences(InitialNamingClient.java:1085)
     at com.sun.corba.se.internal.corba.InitialNamingClient.resolve_initial_references(InitialNamingClient.java:978)
     at com.sun.corba.se.internal.corba.ORB.resolve_initial_references(ORB.java:2422)
     at com.sun.jndi.cosnaming.CNCtx.setOrbAndRootContext(CNCtx.java:340)
     at com.sun.jndi.cosnaming.CNCtx.initUsingIiopUrl(CNCtx.java:289)
     at com.sun.jndi.cosnaming.CNCtx.initUsingUrl(CNCtx.java:245)
     at com.sun.jndi.cosnaming.CNCtx.initOrbAndRootContext(CNCtx.java:209)
     at com.sun.jndi.cosnaming.CNCtx.<init>(CNCtx.java:69)
     at com.sun.jndi.cosnaming.CNCtxFactory.getInitialContext(CNCtxFactory.java:32)
     at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
     at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
     at javax.naming.InitialContext.init(InitialContext.java:219)
     at javax.naming.InitialContext.<init>(InitialContext.java:195)
     at nl.infoprofs.components.monitor.MonitorSender.registerObject(MonitorSender.java:97)
     at nl.infoprofs.components.monitor.MonitorSender.getInstance(MonitorSender.java:122)
     at nl.infoprofs.components.monitor.MonitorTest.main(MonitorTest.java:25)Thanks in advance,
Rico

I am trying to run a simple rmi over iiop server.
I started the tnameserv with
tnameserv -ORBInitialPort 2222
I am trying to run the server
static final String CONTEXT_NAME = "java.naming.factory.initial";
static final String IIOP_STRING = "com.sun.jndi.cosnaming.CNCtxFactory";
static final String URL_NAME = "java.naming.provider.url";
static final String IIOP_URL_STRING = "iiop://localhost:2222";
And in the main method
// Create and install a security manager
if (System.getSecurityManager() == null) {
System.setSecurityManager(new RMISecurityManager());
try {
// Create the IIOP Initial Context
Properties iiopProperties = new Properties();
iiopProperties.put( LFChallenger_SimImpl.CONTEXT_NAME,
LFChallenger_SimImpl.IIOP_STRING );
iiopProperties.put( LFChallenger_SimImpl.URL_NAME,
LFChallenger_SimImpl.IIOP_URL_STRING );
// create and initialize the ORB
ORB orb = ORB.init(args, null);
// initialize naming context
iiopProperties.put("java.naming.corba.orb", orb);
Context initialNamingContext = new InitialContext( iiopProperties );
LFChallenger_SimImpl obj = LFChallenger_SimImpl.getInstance();
// Bind the object to the IIOP registry
initialNamingContext.rebind("LFChallengerServer",obj);
System.out.println("LFChallengerServer bound in registry");
} catch (Exception e) {
System.out.println("LFChallenger_SimImpl err: " + getMessage ());
e.printStackTrace();
Running the server using
java -Djava.rmi.server.codebase=C:/CEMS/Corvis/home/TMF/cems_sim/src/java/classes/ -Djava.security.policy=policy -Djava.naming.provider.url=iiop://localhost:2222 -Djava.naming.factory.initial=com.sun.jndi.cosnaming.CNCtxFactory -classpath c:\Borland\AppServer\lib\vbjorb.jar; com.corvis.cems_sim.LFChallenger_SimImpl
And I am getting these annoying exceptions when I run the above command
LFChallenger_SimImpl err: COS Name Service not registered with ORB under the name 'NameService'
javax.naming.ConfigurationException: COS Name Service not registered with ORB under the name 'NameService'. Root exception is org.omg.CORBA.ORBPackage.InvalidName
at com.inprise.vbroker.orb.ORB.resolve_initial_references(ORB.java:712)
at com.sun.jndi.cosnaming.CNCtx.setOrbAndRootContext(CNCtx.java:254)
at com.sun.jndi.cosnaming.CNCtx.initOrbAndRootContext(CNCtx.java:184)
at com.sun.jndi.cosnaming.CNCtx.<init>(CNCtx.java:71)
at com.sun.jndi.cosnaming.CNCtxFactory.getInitialContext(CNCtxFactory.java:35)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:668)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:246
at javax.naming.InitialContext.init(InitialContext.java:222)
at javax.naming.InitialContext.<init>(InitialContext.java:198)
at com.corvis.cems_sim.LFChallenger_SimImpl.main(LFChallenger_SimImpl.java:72)
Please help me with this problem
thanks
kishore

Similar Messages

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

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

  • 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

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

  • Re: Errors compiling the rmi-iiop example.

    As I said, apparently, you are trying to compile the IDL client in java using the RMI client classes. THere are two problems with this:
    1-- you must compile the rmi class definitions into a directory that can be easily excluded from the class path at the time you compile the idl definitions.
    2-- the idl definitions and the resulting classes are useless wrt the rmi definitions and wls, so the resulting classes must be compiled into directories other than those used by wls and the rmi clients.
    Another way to look at this is as follows:
    To compile the rmi definitions, you do:
    set ORIGINALCLASSPATH=CLASSPATH
    set CLASSPATH=../fooclasses;$CLASSPATH
    javac -d ../fooclasses rmi/FooImpl.java
    Then,
    -- you compile the jrmp classes as:
    rmic -d ../jrmpclasses rmi.FooImpl
    -- you compile the weblogic classes as:
    java weblogic.rmic -d ../wlsclasses rmi.FooImpl
    that is, you are allowed to compile from the same implementation class so long as it is compliant
    -- you compile the rmi-iiop classes as:
    java weblogic.rmic -iiop -d ../rmiiiopclasses rmi.FooImpl
    that is, as with jrmp and wls, the rmi-iiop classes share the same base type definitions and implementation.
    However, the idl classes are another matter. To compile the idl classes, you must generate the idl, generate the java files and generate the idl class files into another, separate directory, one which does not include any of ../fooclasses, ../jrmpclasses, ../wlsclasses or ../rmiiiopclasses
    directories.
    That is,
    java weblogic.rmic -idlDirtecory ../idl ...
    set CLASSPATH=ORIGINALCLASSPATH
    set CLASSPATH=../idlclasses;CLASSPATH
    cd ../idl
    idl2java rmi/Foo.idl
    javac -d ../idl rmi/*.java
    Hope this helps...
    "Hallam, David [CAR:5e10:EXCH]" wrote:
    The problem you are having is that the compiler is picking up another copy of HelloWorld... see if you can run the compiler with verbose turned on and find where it is getting the interface from... or try using javap...So, here is the output when I compile in verbose mode:
    D:\weblogic>javac -verbose -d %WL_HOME%\myserver\corbaclient
    examples\rmi_iiop\h
    ello\*.java
    [parsing started examples\rmi_iiop\hello\_HelloWorldStub.java]
    [parsing completed 160ms]
    [parsing started examples\rmi_iiop\hello\HelloClient.java]
    [parsing completed 30ms]
    [parsing started examples\rmi_iiop\hello\HelloImpl.java]
    [parsing completed 0ms]
    [parsing started examples\rmi_iiop\hello\HelloWorld.java]
    [parsing completed 10ms]
    [parsing started examples\rmi_iiop\hello\HelloWorldHelper.java]
    [parsing completed 0ms]
    [parsing started examples\rmi_iiop\hello\HelloWorldHolder.java]
    [parsing completed 0ms]
    [parsing started examples\rmi_iiop\hello\HelloWorldOperations.java]
    [parsing completed 0ms]
    [loading
    D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/portable/ObjectImpl.class)]
    [loading D:\jdk1.3\jre\lib\rt.jar(java/lang/Object.class)]
    [loading D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/Object.class)]
    [loading
    D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/portable/IDLEntity.class)]
    [loading D:\jdk1.3\jre\lib\rt.jar(java/io/Serializable.class)]
    [loading
    D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/portable/Delegate.class)]
    [loading D:\jdk1.3\jre\lib\rt.jar(java/lang/String.class)]
    [loading D:\jdk1.3\jre\lib\rt.jar(java/io/ObjectInputStream.class)]
    [loading D:\jdk1.3\jre\lib\rt.jar(java/io/ObjectOutputStream.class)]
    [loading
    D:\jdk1.3\jre\lib\rt.jar(org/omg/CosNaming/NameComponent.class)]
    [loading
    D:\jdk1.3\jre\lib\rt.jar(org/omg/CosNaming/NamingContextHelper.class)]
    [loading
    D:\jdk1.3\jre\lib\rt.jar(org/omg/CosNaming/NamingContext.class)]
    [loading D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/ORB.class)]
    [loading D:\jdk1.3\jre\lib\rt.jar(java/rmi/RemoteException.class)]
    [loading D:\jdk1.3\jre\lib\rt.jar(java/lang/Exception.class)]
    [loading D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/Any.class)]
    [loading D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/TypeCode.class)]
    [loading
    D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/portable/InputStream.class)]
    [loading
    D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/portable/OutputStream.class)]
    [loading
    D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/portable/Streamable.class)]
    [checking examples.rmi_iiop.hello._HelloWorldStub]
    [loading
    D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/portable/ApplicationException.cl
    ass)]
    [loading D:\jdk1.3\jre\lib\rt.jar(java/lang/Throwable.class)]
    [loading D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/MARSHAL.class)]
    [loading D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/SystemException.class)]
    [loading D:\jdk1.3\jre\lib\rt.jar(java/lang/RuntimeException.class)]
    [loading
    D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/portable/RemarshalException.clas
    s)]
    [loading D:\jdk1.3\jre\lib\rt.jar(java/io/InputStream.class)]
    [loading D:\jdk1.3\jre\lib\rt.jar(java/io/IOException.class)]
    [loading D:\jdk1.3\jre\lib\rt.jar(java/io/OutputStream.class)]
    [loading D:\jdk1.3\jre\lib\rt.jar(java/lang/Error.class)]
    [wrote
    D:\weblogic\myserver\corbaclient\examples\rmi_iiop\hello\_HelloWorldStub.
    class]
    [checking examples.rmi_iiop.hello.HelloWorld]
    [wrote
    D:\weblogic\myserver\corbaclient\examples\rmi_iiop\hello\HelloWorld.class
    [checking examples.rmi_iiop.hello.HelloWorldOperations]
    [wrote
    D:\weblogic\myserver\corbaclient\examples\rmi_iiop\hello\HelloWorldOperat
    ions.class]
    [checking examples.rmi_iiop.hello.HelloClient]
    [loading D:\jdk1.3\jre\lib\rt.jar(java/lang/System.class)]
    [loading D:\jdk1.3\jre\lib\rt.jar(java/io/PrintStream.class)]
    [loading D:\jdk1.3\jre\lib\rt.jar(java/io/FilterOutputStream.class)]
    [loading
    D:\jdk1.3\jre\lib\rt.jar(org/omg/CosNaming/NamingContextOperations.clas
    s)]
    [loading D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/BAD_PARAM.class)]
    [loading
    D:\jdk1.3\jre\lib\rt.jar(org/omg/CosNaming/NamingContextPackage/NotFoun
    d.class)]
    [loading D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/UserException.class)]
    [loading
    D:\jdk1.3\jre\lib\rt.jar(org/omg/CosNaming/NamingContextPackage/CannotP
    roceed.class)]
    [loading
    D:\jdk1.3\jre\lib\rt.jar(org/omg/CosNaming/NamingContextPackage/Invalid
    Name.class)]
    [wrote
    D:\weblogic\myserver\corbaclient\examples\rmi_iiop\hello\HelloClient.clas
    s]
    [checking examples.rmi_iiop.hello.HelloImpl]
    [loading D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/Policy.class)]
    [loading D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/SetOverrideType.class)]
    [loading D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/DomainManager.class)]
    [loading D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/Context.class)]
    [loading D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/NVList.class)]
    [loading D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/NamedValue.class)]
    [loading D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/ExceptionList.class)]
    [loading D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/ContextList.class)]
    [loading D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/Request.class)]
    examples\rmi_iiop\hello\HelloImpl.java:12:
    examples.rmi_iiop.hello.HelloImpl sho
    uld be declared abstract; it does not define isa(java.lang.String) in
    examples
    .rmi_iiop.hello.HelloImpl
    public class HelloImpl implements HelloWorld {
    ^
    [loading D:\jdk1.3\jre\lib\rt.jar(javax/naming/Context.class)]
    [loading D:\jdk1.3\jre\lib\rt.jar(javax/naming/InitialContext.class)]
    [loading D:\jdk1.3\jre\lib\rt.jar(javax/naming/Name.class)]
    [loading D:\jdk1.3\jre\lib\rt.jar(java/lang/Comparable.class)]
    [checking examples.rmi_iiop.hello.HelloWorldHelper]
    [checking examples.rmi_iiop.hello.HelloWorldHolder]
    [total 1301ms]
    1 error[att1.html]

    test
    "Hallam, David [CAR:5e10:EXCH]" wrote:
    Eduardo,
    These directions worked perfectly, thank-you. One point though, this is
    COMPLETELY different to the directions on the index.html page in the
    examples directory.
    Regards,
    David Hallam.
    Eduardo Ceballos wrote:
    As I said, apparently, you are trying to compile the IDL client in
    java using the RMI client classes. THere are two problems with this:
    1-- you must compile the rmi class definitions into a directory that
    can be easily excluded from the class path at the time you compile the
    idl definitions.
    2-- the idl definitions and the resulting classes are useless wrt the
    rmi definitions and wls, so the resulting classes must be compiled
    into directories other than those used by wls and the rmi clients.
    Another way to look at this is as follows:
    To compile the rmi definitions, you do:
    set ORIGINALCLASSPATH=CLASSPATH
    set CLASSPATH=../fooclasses;$CLASSPATH
    javac -d ../fooclasses rmi/FooImpl.java
    Then,
    -- you compile the jrmp classes as:
    rmic -d ../jrmpclasses rmi.FooImpl
    -- you compile the weblogic classes as:
    java weblogic.rmic -d ../wlsclasses rmi.FooImpl
    that is, you are allowed to compile from the same implementation class
    so long as it is compliant
    -- you compile the rmi-iiop classes as:
    java weblogic.rmic -iiop -d ../rmiiiopclasses rmi.FooImpl
    that is, as with jrmp and wls, the rmi-iiop classes share the same
    base type definitions and implementation.
    However, the idl classes are another matter. To compile the idl
    classes, you must generate the idl, generate the java files and
    generate the idl class files into another, separate directory, one
    which does not include any of ../fooclasses, ../jrmpclasses,
    ../wlsclasses or ../rmiiiopclasses directories.
    That is,
    java weblogic.rmic -idlDirtecory ../idl ...
    set CLASSPATH=ORIGINALCLASSPATH
    set CLASSPATH=../idlclasses;CLASSPATH
    cd ../idl
    idl2java rmi/Foo.idl
    javac -d ../idl rmi/*.java
    Hope this helps...
    "Hallam, David [CAR:5e10:EXCH]" wrote:
    The problem you are having is that the compiler is picking upanother copy of HelloWorld... see if you can run the compiler with
    verbose turned on and find where it is getting the interface from...
    or try using javap...
    So, here is the output when I compile in verbose mode:
    D:\weblogic>javac -verbose -d %WL_HOME%\myserver\corbaclient
    examples\rmi_iiop\h
    ello\*.java
    [parsing started examples\rmi_iiop\hello\_HelloWorldStub.java]
    [parsing completed 160ms]
    [parsing started examples\rmi_iiop\hello\HelloClient.java]
    [parsing completed 30ms]
    [parsing started examples\rmi_iiop\hello\HelloImpl.java]
    [parsing completed 0ms]
    [parsing started examples\rmi_iiop\hello\HelloWorld.java]
    [parsing completed 10ms]
    [parsing started examples\rmi_iiop\hello\HelloWorldHelper.java]
    [parsing completed 0ms]
    [parsing started examples\rmi_iiop\hello\HelloWorldHolder.java]
    [parsing completed 0ms]
    [parsing started examples\rmi_iiop\hello\HelloWorldOperations.java]
    [parsing completed 0ms]
    [loading
    D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/portable/ObjectImpl.class)]
    [loading D:\jdk1.3\jre\lib\rt.jar(java/lang/Object.class)]
    [loading D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/Object.class)]
    [loading
    D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/portable/IDLEntity.class)]
    [loading D:\jdk1.3\jre\lib\rt.jar(java/io/Serializable.class)]
    [loading
    D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/portable/Delegate.class)]
    [loading D:\jdk1.3\jre\lib\rt.jar(java/lang/String.class)]
    [loading D:\jdk1.3\jre\lib\rt.jar(java/io/ObjectInputStream.class)]
    [loading D:\jdk1.3\jre\lib\rt.jar(java/io/ObjectOutputStream.class)]
    [loading
    D:\jdk1.3\jre\lib\rt.jar(org/omg/CosNaming/NameComponent.class)]
    [loading
    D:\jdk1.
    \jre\lib\rt.jar(org/omg/CosNaming/NamingContextHelper.class)]
    [loading
    D:\jdk1.3\jre\lib\rt.jar(org/omg/CosNaming/NamingContext.class)]
    [loading D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/ORB.class)]
    [loading D:\jdk1.3\jre\lib\rt.jar(java/rmi/RemoteException.class)]
    [loading D:\jdk1.3\jre\lib\rt.jar(java/lang/Exception.class)]
    [loading D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/Any.class)]
    [loading D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/TypeCode.class)]
    [loading
    D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/portable/InputStream.class)]
    [loading
    D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/portable/OutputStream.class)]
    [loading
    D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/portable/Streamable.class)]
    [checking examples.rmi_iiop.hello._HelloWorldStub]
    [loading
    D:\jdk1.
    \jre\lib\rt.jar(org/omg/CORBA/portable/ApplicationException.cl
    ass)]
    [loading D:\jdk1.3\jre\lib\rt.jar(java/lang/Throwable.class)]
    [loading D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/MARSHAL.class)]
    [loading
    D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/SystemException.class)]
    [loading D:\jdk1.3\jre\lib\rt.jar(java/lang/RuntimeException.class)]
    [loading
    D:\jdk1.
    \jre\lib\rt.jar(org/omg/CORBA/portable/RemarshalException.clas
    s)]
    [loading D:\jdk1.3\jre\lib\rt.jar(java/io/InputStream.class)]
    [loading D:\jdk1.3\jre\lib\rt.jar(java/io/IOException.class)]
    [loading D:\jdk1.3\jre\lib\rt.jar(java/io/OutputStream.class)]
    [loading D:\jdk1.3\jre\lib\rt.jar(java/lang/Error.class)]
    [wrote
    D:\web
    ogic\myserver\corbaclient\examples\rmi_iiop\hello\_HelloWorldStub.
    class]
    [checking examples.rmi_iiop.hello.HelloWorld]
    [wrote
    D:\web
    ogic\myserver\corbaclient\examples\rmi_iiop\hello\HelloWorld.class
    [checking examples.rmi_iiop.hello.HelloWorldOperations]
    [wrote
    D:\web
    ogic\myserver\corbaclient\examples\rmi_iiop\hello\HelloWorldOperat
    ions.class]
    [checking examples.rmi_iiop.hello.HelloClient]
    [loading D:\jdk1.3\jre\lib\rt.jar(java/lang/System.class)]
    [loading D:\jdk1.3\jre\lib\rt.jar(java/io/PrintStream.class)]
    [loading D:\jdk1.3\jre\lib\rt.jar(java/io/FilterOutputStream.class)]
    [loading
    D:\jdk1.
    \jre\lib\rt.jar(org/omg/CosNaming/NamingContextOperations.clas
    s)]
    [loading D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/BAD_PARAM.class)]
    [loading
    D:\jdk1.
    \jre\lib\rt.jar(org/omg/CosNaming/NamingContextPackage/NotFoun
    d.class)]
    [loading
    D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/UserException.class)]
    [loading
    D:\jdk1.
    \jre\lib\rt.jar(org/omg/CosNaming/NamingContextPackage/CannotP
    roceed.class)]
    [loading
    D:\jdk1.
    \jre\lib\rt.jar(org/omg/CosNaming/NamingContextPackage/Invalid
    Name.class)]
    [wrote
    D:\web
    ogic\myserver\corbaclient\examples\rmi_iiop\hello\HelloClient.clas
    s]
    [checking examples.rmi_iiop.hello.HelloImpl]
    [loading D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/Policy.class)]
    [loading
    D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/SetOverrideType.class)]
    [loading
    D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/DomainManager.class)]
    [loading D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/Context.class)]
    [loading D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/NVList.class)]
    [loading D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/NamedValue.class)]
    [loading
    D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/ExceptionList.class)]
    [loading D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/ContextList.class)]
    [loading D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/Request.class)]
    examples\rmi_iiop\hello\HelloImpl.java:12:
    examples.rmi_iiop.hello.HelloImpl sho
    uld be declared abstract; it does not define isa(java.lang.String)
    in
    examples
    .rmi_iiop.hello.HelloImpl
    public class HelloImpl implements HelloWorld {
    ^
    [loading D:\jdk1.3\jre\lib\rt.jar(javax/naming/Context.class)]
    [loading
    D:\jdk1.3\jre\lib\rt.jar(javax/naming/InitialContext.class)]
    [loading D:\jdk1.3\jre\lib\rt.jar(javax/naming/Name.class)]
    [loading D:\jdk1.3\jre\lib\rt.jar(java/lang/Comparable.class)]
    [checking examples.rmi_iiop.hello.HelloWorldHelper]
    [checking examples.rmi_iiop.hello.HelloWorldHolder]
    [total 1301ms]
    1 error
    Developer Relations Engineer
    BEA Support

  • Simple RMI/IIOP app : "no security manager: RMI class loader disabled"

    Hello colleagues!
    I do not understand the problem at all, and asking for your kind help.
    This is my first code for RMI/IIOP. We are using JBoss as application server.
    What I've done :
    1) created test.Command interface , extending Remote
    2) created test.CommandImpl , implementing above mentioned interface and java.io.Serializable, and extending javax.rmi.PortableRemoteObject.
    BTW, Serializable is not implemented in some tutorials, but absence of Serializable causes NotSerializableException when trying to rebind (next step).
    3) in server code, created initial context and called
    context.rebind("test/Command",new CommandImpl());
    4) Ran rmic -iiop test.CommandImpl . A result was two new cass files, CommandImplTie.class and CommandStub.class , both are also in package "test".
    5) Created remote client and put CommandStub.class to client
    classpath (under package "test", too).
    6) In client code, initialized the context and called
    context.lookup("test/Command").
    On this line (lookup), the following exception is being raised :
    javax.naming.CommunicationException. Root exception is java.lang.ClassNotFoundException: test.CommandImpl (no security manager: RMI class loader disabled)
         at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:368)
         at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:161)
         at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:631)
         at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:257)
         at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:200)
         at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1513)
         at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1435)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1626)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
         at java.rmi.MarshalledObject.get(MarshalledObject.java:135)
         at org.jnp.interfaces.MarshalledValuePair.get(MarshalledValuePair.java:30)
         at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:514)
         at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:471)
         at javax.naming.InitialContext.lookup(InitialContext.java:347)
    Is _Stub class all that client needs from server classes, to obtain
    the reference ? I tried to put _Tie also to client, but with the same result.
    All Jndi paths to JBoss server are correct, as I've used them successfully in other applications.
    Many thanks in advance,
    Daniel

    Next few words to the topic.
    I made tests with canonical RMI/IIOP tutorial from Sun.
    When I use Sun's ORB (orbd.exe) , everything work fine. I started
    orbd on the same PC as JBoss, and client and server are running
    remotely.
    But with JBoss ORB, I have the same exception as described above.
    Server starts and registers in JNDI successfully, but client can not
    obtain a remote reference. Exception is being thrown on
    context.lookup().
    So the difference is definitely in security managers for two ORBs.
    I also tried to create new RMISecurityMananger and set it, but with
    no effect.
    Any ideas ?
    TIA,
    Daniel.

  • RMI/IIOP HelloWorld problem

    I saw this topic in an old thread but couldn't find the answer. My
    problem was the same, the client app was stuck at the line
    obj = nc.resolve(path);
    Could you post your solution if you know the answer to this problem.
    Thanks a lot.

    Yes, you are right. I'm currently using jdk1.3. Is there a fix or do I
    have to go back to jdk1.2? Thanks a lot.
    Regards,
    Eduardo Ceballos wrote:
    You must run under jdk 1.3.
    Jim Hurd wrote:
    I did not see the line
    Thu Aug 03 11:33:52 PDT 2000:<I> <WebLogicServer> IIOP subsystem
    enabled.
    I think that was the problem. How do I fix that?
    Thank you very much.
    Eduardo Ceballos wrote:
    I tried every combination of hostname/ip address I could think of,
    but I don't see that problem... could you confirm that the WLS log
    listen thread entry is... should be something like:
    Thu Aug 03 11:34:06 PDT 2000:<I> <ListenThread> Listening on port:
    7001
    Also, does the first line of your log say:
    Thu Aug 03 11:33:52 PDT 2000:<I> <WebLogicServer> IIOP subsystem
    enabled.
    Jim Hurd wrote:
    Hi Eduardo,
    I tried the rmi-iiop client SimpleHelloClient example that you
    posted (with hostname and port modified according to my setup)
    and I got this error while trying to get the InitialContext (at
    line Context ic = new InitialContext(env);
    Exception in thread "main" javax.naming.CommunicationException:
    Cannot connect to ORB. Root exception is
    org.omg.CORBA.COMM_FAILURE: minor code: 1 completed:
    Maybe
    at
    com.sun.corba.se.internal.iiop.IIOPConnection.purge_calls(Unknown
    Source)
    at
    com.sun.corba.se.internal.iiop.ReaderThread.run(Unknown Source)
    Here is my setup
    env.put("java.naming.factory.initial","com.sun.jndi.cosnaming.CNCtxFactory");
    env.put("java.naming.provider.url", "iiop://127.0.0.1:7001");
    Context ic = new InitialContext(env);
    Thanks a lot
    Eduardo Ceballos wrote:
    Here's the html version.. maybe clearer
    Eduardo Ceballos wrote:
    As I said, apparently, you are trying to compile the IDL
    client in java using the RMI client classes. THere are two
    problems with this:
    1-- you must compile the rmi class definitions into a
    directory that can be easily excluded from the class path at
    the time you compile the idl definitions.
    2-- the idl definitions and the resulting classes are useless
    wrt the rmi definitions and wls, so the resulting classes must
    be compiled into directories other than those used by wls and
    the rmi clients.
    Another way to look at this is as follows:
    To compile the rmi definitions, you do:
    set ORIGINALCLASSPATH=CLASSPATH
    set CLASSPATH=../fooclasses;$CLASSPATH
    javac -d ../fooclasses rmi/FooImpl.java
    Then,
    -- you compile the jrmp classes as:
    rmic -d ../jrmpclasses rmi.FooImpl
    -- you compile the weblogic classes as:
    java weblogic.rmic -d ../wlsclasses rmi.FooImpl
    that is, you are allowed to compile from the same
    implementation class so long as it is compliant
    -- you compile the rmi-iiop classes as:
    java weblogic.rmic -iiop -d ../rmiiiopclasses rmi.FooImpl
    that is, as with jrmp and wls, the rmi-iiop classes share the
    same base type definitions and implementation.
    However, the idl classes are another matter. To compile the
    idl classes, you must generate the idl, generate the java
    files and generate the idl class files into another, separate
    directory, one which does not include any of ../fooclasses,
    ../jrmpclasses, ../wlsclasses or ../rmiiiopclasses
    directories.
    That is,
    java weblogic.rmic -idlDirtecory ../idl ...
    set CLASSPATH=ORIGINALCLASSPATH
    set CLASSPATH=../idlclasses;CLASSPATH
    cd ../idl
    idl2java rmi/Foo.idl
    javac -d ../idl rmi/*.java
    Hope this helps...
    "Hallam, David [CAR:5e10:EXCH]" wrote:
    The problem you are having is that the compiler is pickingup another copy of HelloWorld... see if you can run the
    compiler with verbose turned on and find where it is getting
    the interface from... or try using javap...
    So, here is the output when I compile in verbose mode:
    D:\weblogic>javac -verbose -d %WL_HOME%\myserver\corbaclient
    examples\rmi_iiop\h
    ello\*.java
    [parsing started
    examples\rmi_iiop\hello\_HelloWorldStub.java]
    [parsing completed 160ms]
    [parsing started examples\rmi_iiop\hello\HelloClient.java]
    [parsing completed 30ms]
    [parsing started examples\rmi_iiop\hello\HelloImpl.java]
    [parsing completed 0ms]
    [parsing started examples\rmi_iiop\hello\HelloWorld.java]
    [parsing completed 10ms]
    [parsing started
    examples\rmi_iiop\hello\HelloWorldHelper.java]
    [parsing completed 0ms]
    [parsing started
    examples\rmi_iiop\hello\HelloWorldHolder.java]
    [parsing completed 0ms]
    [parsing started
    examples\rmi_iiop\hello\HelloWorldOperations.java]
    [parsing completed 0ms]
    [loading
    D:\jdk1.
    \jre\lib\rt.jar(org/omg/CORBA/portable/ObjectImpl.class)]
    [loading D:\jdk1.3\jre\lib\rt.jar(java/lang/Object.class)]
    [loading
    D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/Object.class)]
    [loading
    D:\jdk1.
    \jre\lib\rt.jar(org/omg/CORBA/portable/IDLEntity.class)]
    [loading
    D:\jdk1.3\jre\lib\rt.jar(java/io/Serializable.class)]
    [loading
    D:\jdk1.
    \jre\lib\rt.jar(org/omg/CORBA/portable/Delegate.class)]
    [loading D:\jdk1.3\jre\lib\rt.jar(java/lang/String.class)]
    [loading
    D:\jdk1.3\jre\lib\rt.jar(java/io/ObjectInputStream.class)]
    [loading
    D:\jdk1.3\jre\lib\rt.jar(java/io/ObjectOutputStream.class)]
    [loading
    D:\jdk1.
    \jre\lib\rt.jar(org/omg/CosNaming/NameComponent.class)]
    [loading
    D:\jdk1.
    \jre\lib\rt.jar(org/omg/CosNaming/NamingContextHelper.class)]
    [loading
    D:\jdk1.
    \jre\lib\rt.jar(org/omg/CosNaming/NamingContext.class)]
    [loading D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/ORB.class)]
    [loading
    D:\jdk1.3\jre\lib\rt.jar(java/rmi/RemoteException.class)]
    [loading
    D:\jdk1.3\jre\lib\rt.jar(java/lang/Exception.class)]
    [loading D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/Any.class)]
    [loading
    D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/TypeCode.class)]
    [loading
    D:\jdk1.
    \jre\lib\rt.jar(org/omg/CORBA/portable/InputStream.class)]
    [loading
    D:\jdk1.
    \jre\lib\rt.jar(org/omg/CORBA/portable/OutputStream.class)]
    [loading
    D:\jdk1.
    \jre\lib\rt.jar(org/omg/CORBA/portable/Streamable.class)]
    [checking examples.rmi_iiop.hello._HelloWorldStub]
    [loading
    D:\jdk1.
    \jre\lib\rt.jar(org/omg/CORBA/portable/ApplicationException.cl
    ass)]
    [loading
    D:\jdk1.3\jre\lib\rt.jar(java/lang/Throwable.class)]
    [loading
    D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/MARSHAL.class)]
    [loading
    D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/SystemException.class)]
    [loading
    D:\jdk1.3\jre\lib\rt.jar(java/lang/RuntimeException.class)]
    [loading
    D:\jdk1.
    \jre\lib\rt.jar(org/omg/CORBA/portable/RemarshalException.clas
    s)]
    [loading
    D:\jdk1.3\jre\lib\rt.jar(java/io/InputStream.class)]
    [loading
    D:\jdk1.3\jre\lib\rt.jar(java/io/IOException.class)]
    [loading
    D:\jdk1.3\jre\lib\rt.jar(java/io/OutputStream.class)]
    [loading D:\jdk1.3\jre\lib\rt.jar(java/lang/Error.class)]
    [wrote
    D:\web
    ogic\myserver\corbaclient\examples\rmi_iiop\hello\_HelloWorldStub.
    class]
    [checking examples.rmi_iiop.hello.HelloWorld]
    [wrote
    D:\web
    ogic\myserver\corbaclient\examples\rmi_iiop\hello\HelloWorld.class
    [checking examples.rmi_iiop.hello.HelloWorldOperations]
    [wrote
    D:\web
    ogic\myserver\corbaclient\examples\rmi_iiop\hello\HelloWorldOperat
    ions.class]
    [checking examples.rmi_iiop.hello.HelloClient]
    [loading D:\jdk1.3\jre\lib\rt.jar(java/lang/System.class)]
    [loading
    D:\jdk1.3\jre\lib\rt.jar(java/io/PrintStream.class)]
    [loading
    D:\jdk1.3\jre\lib\rt.jar(java/io/FilterOutputStream.class)]
    [loading
    D:\jdk1.
    \jre\lib\rt.jar(org/omg/CosNaming/NamingContextOperations.clas
    s)]
    [loading
    D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/BAD_PARAM.class)]
    [loading
    D:\jdk1.
    \jre\lib\rt.jar(org/omg/CosNaming/NamingContextPackage/NotFoun
    d.class)]
    [loading
    D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/UserException.class)]
    [loading
    D:\jdk1.
    \jre\lib\rt.jar(org/omg/CosNaming/NamingContextPackage/CannotP
    roceed.class)]
    [loading
    D:\jdk1.
    \jre\lib\rt.jar(org/omg/CosNaming/NamingContextPackage/Invalid
    Name.class)]
    [wrote
    D:\web
    ogic\myserver\corbaclient\examples\rmi_iiop\hello\HelloClient.clas
    s]
    [checking examples.rmi_iiop.hello.HelloImpl]
    [loading
    D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/Policy.class)]
    [loading
    D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/SetOverrideType.class)]
    [loading
    D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/DomainManager.class)]
    [loading
    D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/Context.class)]
    [loading
    D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/NVList.class)]
    [loading
    D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/NamedValue.class)]
    [loading
    D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/ExceptionList.class)]
    [loading
    D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/ContextList.class)]
    [loading
    D:\jdk1.3\jre\lib\rt.jar(org/omg/CORBA/Request.class)]
    examples\rmi_iiop\hello\HelloImpl.java:12:
    examples.rmi_iiop.hello.HelloImpl sho
    uld be declared abstract; it does not define
    isa(java.lang.String) in
    examples
    .rmi_iiop.hello.HelloImpl
    public class HelloImpl implements HelloWorld {
    ^
    [loading
    D:\jdk1.3\jre\lib\rt.jar(javax/naming/Context.class)]
    [loading
    D:\jdk1.3\jre\lib\rt.jar(javax/naming/InitialContext.class)]
    [loading D:\jdk1.3\jre\lib\rt.jar(javax/naming/Name.class)]
    [loading
    D:\jdk1.3\jre\lib\rt.jar(java/lang/Comparable.class)]
    [checking examples.rmi_iiop.hello.HelloWorldHelper]
    [checking examples.rmi_iiop.hello.HelloWorldHolder]
    [total 1301ms]
    1 error
    [att1.html]

  • Cannot connect RMI-IIOP client to standalone OC4J (10.1.3)

    [PROBLEM]
    I am trying to access an EJB session bean from a simple remote java client.
    The EJB is deployed to a standalone OC4J server.
    Using the RMI-over-IIOP protocol for client-server communication.
    The client and server run in separate JVMs (but on the same machine).
    This is a simple java client program, not a J2EE application client.
    The InitialContext creation fails with the errors shown below.
    I searched around on the web, and found other people with the same issue, but no solution:
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4995985
    Maybe I'm missing something in my configuration, deployment, client invocation?
    Any help will be greatly appreciated!
    [SETUP]
    I generated the iiop stubs during deployment (-DGenerateIIOP=true) to the server. Added the generated IIOPClient jar file to my client classpath.
    Also specified -enableIIOP and remote=true for the EJB deployment.
    As per the 10.1.3 documentation, I also specified the following command line arguments:
    -Djavax.rmi.CORBA.PortableRemoteObjectClass=com.sun.corba.ee.impl.javax.rmi.PortableRemoteObject
    -Dcom.oracle.CORBA.OrbManager=com.oracle.corba.ee.impl.orb.ORBManagerImpl
    -Dorg.omg.CORBA.ORBInitialHost=testpc1
    -Dorg.omg.CORBA.ORBInitialPort=5555
    Verified in Oracle Enterprise Manager 10g (Application Server Control) that the application was deployed successfully, and a Stateful Session Bean is visible in the EJB pane.
    Also verified that the iiop port (5555) is functioning (netstat).
    internal-settings.xml file:
    <server-extension-provider name="IIOP" class="com.oracle.iiop.server.IIOPServerExtensionProvider">
         <sep-property name="port" value="5555"/>
         <sep-property name="host" value="localhost"/>
         <sep-property name="ssl" value="false"/>
         <sep-property name="ssl-port" value="5556"/>
         <sep-property name="ssl-client-server-auth-port" value="5557"/>
         <sep-property name="trusted-clients" value="*"/>
    </server-extension-provider>
    server.xml file contains this entry:
    <sep-config path="./internal-settings.xml"/>
    [Versions]
    Oracle Containers for J2EE 10g (10.1.3.0.0) (build 060119.1546.05277)
    java version "1.5.0_04"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
    Java HotSpot(TM) Client VM (build 1.5.0_04-b05, mixed mode, sharing)
    [ERROR]
    com.sun.corba.ee.impl.legacy.connection.SocketFactoryContactInfoImpl <init>
    WARNING: ORBUTIL.invalidEndPointInfoType
    org.omg.CORBA.INTERNAL: vmcid: SUN minor code: 281 completed: No
    at com.sun.corba.ee.impl.logging.ORBUtilSystemException.invalidEndPointInfoType(ORBUtilSystemException.java:5084)
    at com.sun.corba.ee.impl.logging.ORBUtilSystemException.invalidEndPointInfoType(ORBUtilSystemException.java:5106)
    at com.sun.corba.ee.impl.legacy.connection.SocketFactoryContactInfoImpl.<init>(SocketFactoryContactInfoImpl.java:62)
    at com.sun.corba.ee.impl.legacy.connection.SocketFactoryContactInfoListIteratorImpl.next(SocketFactoryContactInfoListIteratorImpl.java:59)
    at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:114)
    at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:214)
    at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
    at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
    at com.sun.jndi.cosnaming.CNCtx.setOrbAndRootContext(CNCtx.java:345)
    at com.sun.jndi.cosnaming.CNCtx.initUsingCorbanameUrl(CNCtx.java:321)
    at com.sun.jndi.cosnaming.CNCtx.initUsingUrl(CNCtx.java:247)
    at com.sun.jndi.cosnaming.CNCtx.createUsingURL(CNCtx.java:85)
    at com.sun.jndi.url.iiop.iiopURLContextFactory.getUsingURLIgnoreRest(iiopURLContextFactory.java:56)
    at com.sun.jndi.url.iiop.iiopURLContextFactory.getUsingURL(iiopURLContextFactory.java:61)
    at com.sun.jndi.url.iiop.iiopURLContextFactory.getObjectInstance(iiopURLContextFactory.java:34)
    at oracle.j2ee.iiop.IIOPInitialContextFactory.getInitialContext(IIOPInitialContextFactory.java:76)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
    at javax.naming.InitialContext.init(InitialContext.java:223)
    at javax.naming.InitialContext.<init>(InitialContext.java:197)
    at ejbremoteclient.Main.getContext(Main.java:80)
    at ejbremoteclient.Main.main(Main.java:87)
    javax.naming.NamingException
    at oracle.j2ee.iiop.IIOPInitialContextFactory.getInitialContext(IIOPInitialContextFactory.java:86)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
    at javax.naming.InitialContext.init(InitialContext.java:223)
    at javax.naming.InitialContext.<init>(InitialContext.java:197)
    at ejbremoteclient.Main.getContext(Main.java:80)
    at ejbremoteclient.Main.main(Main.java:87)
    ClientIIOPSSLSocketFactory.getEndpointInfo: iopprofile is not an instance of IIOPProfileTemplate
    [CLIENT CODE]
    // get context
    Hashtable env = new Hashtable();
    env.put("java.naming.provider.url", "corbaname::testpc1:5555#DME3");
    env.put("java.naming.factory.initial", "oracle.j2ee.iiop.IIOPInitialContextFactory");
    env.put(Context.SECURITY_PRINCIPAL, "oc4jadmin");
    env.put(Context.SECURITY_CREDENTIALS, "welcome");
    Context ic = new InitialContext(env); <---FAILS HERE

    Hello Deepak
    I've been doing some other stuff and then back to RMI/IIOP tests wih my app...
    Finally I passed the previous errors, it all ended up being misconfigurations on the server and client side.
    Now I'm striving with this one ...
    java.rmi.AccessException: CORBA NO_PERMISSION 0 No; nested exception is:
         org.omg.CORBA.NO_PERMISSION: ----------BEGIN server-side stack trace----------
    org.omg.CORBA.NO_PERMISSION: vmcid: 0x0 minor code: 0 completed: No
         at oracle.oc4j.corba.iiop.security.SecServerRequestInterceptor.receive_request(SecServerRequestInterceptor.java:354)
         at com.sun.corba.ee.impl.interceptors.InterceptorInvoker.invokeServerInterceptorIntermediatePoint(InterceptorInvoker.java:509)
         at com.sun.corba.ee.impl.interceptors.PIHandlerImpl.invokeServerPIIntermediatePoint(PIHandlerImpl.java:505)
         at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.getServantWithPI(CorbaServerRequestDispatcherImpl.java:429)
         at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:191)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1653)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1513)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:895)
         at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:172)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:668)
         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:375)
         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.read(SocketOrChannelConnectionImpl.java:284)
         at com.sun.corba.ee.impl.transport.ReaderThreadImpl.doWork(ReaderThreadImpl.java:73)
         at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:382)
    ----------END server-side stack trace---------- vmcid: 0x0 minor code: 0 completed: No
         at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.mapSystemException(Util.java:204)
         at javax.rmi.CORBA.Util.mapSystemException(Util.java:67)
         at com.x.tools.login.ejb._LoginHome_Stub.create(Unknown Source)
         at com.x.tools.login.clientside.model.Facade.<init>(Facade.java:168)
         at com.x.tools.login.clientside.model.Facade.getInstance(Facade.java:122)
         at com.x.tools.login.clientside.LoginApp.doLogin(LoginApp.java:169)
         at com.x.tools.login.clientside.Login.getInstance(Login.java:83)
         at com.x.caracas.AdminApp.clientside.MainAdminApp.<init>(MainAdminApp.java:30)
         at com.x.caracas.AdminApp.clientside.MainAdminApp.main(MainAdminApp.java:81)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.sun.javaws.Launcher.executeApplication(Unknown Source)
         at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
         at com.sun.javaws.Launcher.continueLaunch(Unknown Source)
         at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)
         at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)
         at com.sun.javaws.Launcher.run(Unknown Source)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: org.omg.CORBA.NO_PERMISSION: ----------BEGIN server-side stack trace----------
    org.omg.CORBA.NO_PERMISSION: vmcid: 0x0 minor code: 0 completed: No
         at oracle.oc4j.corba.iiop.security.SecServerRequestInterceptor.receive_request(SecServerRequestInterceptor.java:354)
         at com.sun.corba.ee.impl.interceptors.InterceptorInvoker.invokeServerInterceptorIntermediatePoint(InterceptorInvoker.java:509)
         at com.sun.corba.ee.impl.interceptors.PIHandlerImpl.invokeServerPIIntermediatePoint(PIHandlerImpl.java:505)
         at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.getServantWithPI(CorbaServerRequestDispatcherImpl.java:429)
         at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:191)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1653)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1513)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:895)
         at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:172)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:668)
         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:375)
         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.read(SocketOrChannelConnectionImpl.java:284)
         at com.sun.corba.ee.impl.transport.ReaderThreadImpl.doWork(ReaderThreadImpl.java:73)
         at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:382)
    ----------END server-side stack trace---------- vmcid: 0x0 minor code: 0 completed: No
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
         at com.sun.corba.ee.impl.protocol.giopmsgheaders.MessageBase.getSystemException(MessageBase.java:791)
         at com.sun.corba.ee.impl.protocol.giopmsgheaders.ReplyMessage_1_2.getSystemException(ReplyMessage_1_2.java:97)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.getSystemExceptionReply(CorbaMessageMediatorImpl.java:546)
         at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.processResponse(CorbaClientRequestDispatcherImpl.java:430)
         at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.marshalingComplete(CorbaClientRequestDispatcherImpl.java:326)
         at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.invoke(CorbaClientDelegateImpl.java:132)
         at org.omg.CORBA.portable.ObjectImpl._invoke(ObjectImpl.java:457)
         ... 18 more
    Hope it's easy to solve ... I'm not using JAAS .. my jndi.properties looks like this:
         java.naming.security.principal=oc4jadmin
    java.naming.security.credentials=welcome javax.rmi.CORBA.PortableRemoteObjectClass=com.sun.corba.ee.impl.javax.rmi.PortableRemoteObject
    com.oracle.CORBA.OrbManager=com.oracle.corba.ee.impl.orb.ORBManagerImpl
    java.naming.factory.initial=oracle.j2ee.iiop.IIOPInitialContextFactory
    java.naming.provider.url=corbaname::serverhost:13321#/MyApp

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

  • RMI-IIOP Compatability

    We are using weblogic 8.lSP5 and are having trouble rmi-iiop compatability with other containers.
    Weblogic mangles an exception name like mycompany.exception.FooException as IDL:mycompany/exception/FooEx:1.0.
    Other containers including websphere and sun mangle the exception name as IDL:mycompany/_exception/FooEx:1.0
    According to the spec it seems that IDL keywords like exception should be escaped with the leading underscore.
    This mismatch prevents us from using the same set of client stubs to access ejbs on both containers.

    Ben Murphy <> writes:
    Its a bug which I thought we had fixed, but clearly not if you are
    using sp5. Raise a support call, tell them I said it was a bug :)
    andy
    We are using weblogic 8.lSP5 and are having trouble rmi-iiop compatability with other containers.
    Weblogic mangles an exception name like mycompany.exception.FooException as IDL:mycompany/exception/FooEx:1.0.
    Other containers including websphere and sun mangle the exception name as IDL:mycompany/_exception/FooEx:1.0
    According to the spec it seems that IDL keywords like exception should be escaped with the leading underscore.
    This mismatch prevents us from using the same set of client stubs to access ejbs on both containers.

Maybe you are looking for

  • Longest length of a data type in an internal table in abap

    Hi everyone, I have a requirement for a client in which i want to read a standard text from SO10 which can be up to 5000 words, store that into an internal table & display it in an excel sheet in a single column in a single field. I have tried declar

  • Very urgent...accounting entries for (excise duty)taxes and duties on sales

    Hi Friends, I'd appreciate if anyone would help me out the entries for excise duty and cenvat utilisation during sales. During billing document: Customer -- dr To sales a/c --(cr) To CENVAT SUSPENSE AC (CR). Now could anyone tell me what kind of acco

  • Large Memory Size (:O )

    i created an application that uses 35 MB of memory using the fianal release J2SE 1.4.0 i'm using swing & JAXP "DOM" to parse and save a 25KB xml file. my question is: how can i analyze the memory of my program, in terms of JVM & Application & Objects

  • Elements 10 is not responding

    I have windows 7 64 bit I can't get Elements 10 Organizer to open. It worked fine when I first enstalled it, but now all I get when I try to use it isĀ  ELEMENTS 10 ORGANIZER IS NOT RESPONDING

  • Error message that says waiting for remote debugger, can anyone help?

    Help please, it does this every 5 minutes, the hard drive was wiped clean, and snow leopard was reinstalled, after updating everything and reinstalling i life it started doing this