I tried compiling the sample program in Headfirst - (Advice). I was able to generate the class file after the successful compilation, but failed in running the AdviceClient.
The command given is
java -classpath %CLASSPATH%;AdviceAppClient.jar AdviceClient
I am getting NoClassFound Exception. Below is the full error message:
C:\EJBDEMO\projects\advice>java -classpath %CLASSPATH%;AdviceAppClient.jar Advic
eClient
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(InitialNamingClient.java:573)
at com.sun.corba.ee.internal.corba.InitialNamingClient.resolveUsingORBInitRef(InitialNamingClient.java:544)
at com.sun.corba.ee.internal.corba.InitialNamingClient.cachedInitialReferences(InitialNamingClient.java:1080)
at com.sun.corba.ee.internal.corba.InitialNamingClient.resolve_initial_references(InitialNamingClient.java:981)
at com.sun.corba.ee.internal.corba.ORB.resolve_initial_references(ORB.java:2425)
at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:52)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:120)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at AdviceClient.go(adviceclient.java:18)
at AdviceClient.main(adviceclient.java:11)
I tried all the solutions given for similar problems in the following sites:
https://coderanch.com/t/158486/java-EJB-SCBCD/certification/head-first-ejb-pg-client http://wickedlysmart.com/HeadFirst/HeadFirstEJB/HeadFirstEJBNotes.html Still I couldn't solve the problem. My settings are
Classpath-
C:\jdk1.3.1\bin;C:\jdk1.3.1\lib;c:\j2sdkee1.3.1\lib\j2ee.jar;.;C:\j2sdkee1.3.1\lib;C:\j2sdkee1.3.1\lib\system;C:\j2sdkee1.3.1\lib\cloudscape
J2EE_HOME-
C:\j2sdkee1.3.1
Java_Home-
C:\jdk1.3.1
PATH-
C:\j2sdkee1.3.1\bin
Please help me to resolve this problem. Its killing my sleep for long days....
Thanks
Priya
[ March 09, 2007: Message edited by: priya pratheep ]
[ March 09, 2007: Message edited by: priya pratheep ]