Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/corba/se/inte rnal/util/JDKBridge at com.sun.corba.ee.internal.core.IOR$LocalCodeBaseSingletonHolder.<clin it>(IOR.java:90) at com.sun.corba.ee.internal.core.IOR.<init>(IOR.java:238) at com.sun.corba.ee.internal.iiop.messages.LocateReplyMessage_1_2.read(L ocateReplyMessage_1_2.java:137) at com.sun.corba.ee.internal.iiop.IIOPInputStream.unmarshalHeader(IIOPIn putStream.java:126) at com.sun.corba.ee.internal.iiop.IIOPConnection.getResponse(IIOPConnect ion.java:671) at com.sun.corba.ee.internal.iiop.IIOPConnection.send(IIOPConnection.jav a:778) at com.sun.corba.ee.internal.corba.InitialNamingClient.locateObject(Init ialNamingClient.java:786) at com.sun.corba.ee.internal.corba.InitialNamingClient.getIORUsingHostIn fo(InitialNamingClient.java:597) at com.sun.corba.ee.internal.corba.InitialNamingClient.resolveCorbaloc(I nitialNamingClient.java:573) at com.sun.corba.ee.internal.corba.InitialNamingClient.resolveUsingORBIn itRef(InitialNamingClient.java:544) at com.sun.corba.ee.internal.corba.InitialNamingClient.cachedInitialRefe rences(InitialNamingClient.java:1080) at com.sun.corba.ee.internal.corba.InitialNamingClient.resolve_initial_r eferences(InitialNamingClient.java:981) at com.sun.corba.ee.internal.corba.ORB.resolve_initial_references(ORB.ja va:2425) at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.jav a:52) at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:120 ) at javax.naming.InitialContext.lookup(Unknown Source) at AdviceClient.go(AdviceClient.java:16) at AdviceClient.main(AdviceClient.java:10) ====================================================

Hi Richard, that %classpath% stuff in java command doesnt work in windows. run this command java -cp XXXX;f:\yourdir\AdviceAppClient.jar HelloClient

* replace XXXX by typing your classpath there. you can see classpath by echo %classpath%

that will work.

Follow above steps and it should work. Amol.

Richard Vagner
Ranch Hand

Joined: Jun 26, 2001
Posts: 108

posted Feb 25, 2005 09:05:00

0

Thanks, amol,

I do think %CLASSPATH% works with Windows because I used it to compile AdviceClient.java in the first place. I do not know why it complains that "javax.naming.InitialContext.lookup(Unknown Source)" because I am pretty sure that I entered "Advisor" as JNDI name why it can't find it???

Anyway, when you say "replace XXXX by typing your classpath", do you mean j2ee.jar or complete classpath? Can you give me your example?

Thanks

Richard Vagner
Ranch Hand

Joined: Jun 26, 2001
Posts: 108

posted Feb 25, 2005 15:09:00

0

Just tried amol's suggestion and got exactly the same error. I think it is JNDI problem but I do not know how to fix it. Anyone, please shed lignt on this.

the error (As I guess)is you have to specify your servers properties (such as INITIAL_CONTEXT_FACTORY etc.. etc.. ) . But the sad story is I cant remember how to do it. If you can wait till monday i may be able to help you.

I had the same problem and, it worked after adding those lines it worked. If you have set properties and still it doesnt's work add the "appserver-rt.jar" file to your class path and run

GOOD LUCK I'm wondering why kathey And Bert made such a big mistake in such a very goooood book. [ February 26, 2005: Message edited by: Lahiru Abeydeera ]

Take out the CLASSPATH from your environment. It can screw things up too much; instead, specify the classpath directly from the command line. Make sure you set up your Java environment variables, though: