开发者

Running Java CORBA Client on Unix

开发者 https://www.devze.com 2022-12-27 00:25 出处:网络
I\'m trying to run a Java application I wrote to subscribe to a CORBA event service.It runs OK on my Windows machine, but as soon as I deploy i开发者_运维知识库t to the UNIX server, it gives me an org

I'm trying to run a Java application I wrote to subscribe to a CORBA event service. It runs OK on my Windows machine, but as soon as I deploy i开发者_运维知识库t to the UNIX server, it gives me an org.omg.CORBA.NO_IMPLEMENT exception. Any ideas as to why this might be happening? I'm using JacORB on my Windows machine and passing VM arguments to initialize the client ORB, but I'm not sure how to do that on UNIX and if it's even necessary.

Thanks in advance!


The JRE comes with a full Corba implementation and you need to tell it to ignore those and use JacOrb instead.

On Unix:

-Xbootclasspath:${JACORB_HOME}/lib/jacorb.jar:${JAVA_HOME}/jre/lib/rt.jar:${CLASSPATH} 
-Dorg.omg.CORBA.ORBClass=org.jacorb.orb.ORB
-Dorg.omg.CORBA.ORBSingletonClass=org.jacorb.orb.ORBSingleton

Look up the docs for JacORB It is very well explained. You need to have the jars files installed and you need to point to either the ior or the nameservice passed into your JVM.

If your question is how to do this in a shell then please comment or rephrase the question.


If the versions differ it could be that you haven't noticed the change of package names in JacORB 1.3.21 tha names have changed from jacorb to org.jacorb

org.omg.CORBA.ORBClass=jacorb.orb.ORB
org.omg.CORBA.ORBSingletonClass=jacorb.orb.ORBSingleton

to this:

org.omg.CORBA.ORBClass=org.jacorb.orb.ORB
org.omg.CORBA.ORBSingletonClass=org.jacorb.orb.ORBSingleton

If this isn't the cause, please post exact verions


The Javadoc for org.omg.CORBA.NO_IMPLEMENTIMPLEMENT:

This exception indicates that even though the operation that was invoked exists (it has an IDL definition), no implementation for that operation exists. NO_IMPLEMENT can, for example, be raised by an ORB if a client asks for an object's type definition from the interface repository, but no interface repository is provided by the ORB.

It contains a minor code, which gives more detailed information about what caused the exception, and a completion status. It may also contain a string describing the exception

So I guess you need to look at what the Exception exactly says. My bet is that you need to add those java arguments to initialize the ORB client.

0

精彩评论

暂无评论...
验证码 换一张
取 消