Hi folks, I just started preparing with SCBCD exam preparation. I am stuck with this tutorial problem from the very first chapter. It compiles correctly and I have also check the class path. It is right. I also changed the getAdvice() method to getTheMessage(). but still when I run AdviceClient it give me following error: i have a correct main method in AdviceClient.I also tried to deploy and run the code from the (wickedlysmart)website but I get the same error.
Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/corba/se/internal/util/JDKBridge at com.sun.corba.ee.internal.core.IOR$LocalCodeBaseSingletonHolder.<clinit>(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(LocateReplyMessage_1_2.java:137) at com.sun.corba.ee.internal.iiop.IIOPInputStream.unmarshalHeader(IIOPInputStream.java:126) at com.sun.corba.ee.internal.iiop.IIOPConnection.getResponse(IIOPConnection.java:671) at com.sun.corba.ee.internal.iiop.IIOPConnection.send(IIOPConnection.java:778) at com.sun.corba.ee.internal.corba.InitialNamingClient.locateObject(InitialNamingClient.java:786) at com.sun.corba.ee.internal.corba.InitialNamingClient.getIORUsingHostInfo(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:17) at AdviceClient.main(AdviceClient.java:26) I really dont know what to do with it.How comeit cant find the class if it is available. i have put the jarfile appropriately in the class path please help me with a suitable answer.I am stuck and cant study any further. thanks vikas prasad SCJP1.4, SCWCD 1.4
What do you say is my path variables are correct or do I need to add something else? If you have tried this tutorial and if it is working fine. could you please tell me how did you set up all the environment variables. and what else did you do? it still giving same problem. i already tried the link notes at Wickedlysmart but no changes i have this run time error.. I use jpadpro as editor should i use anything else. can you please tell me the exac procedure to set up entire thing please... many thanks vikas prasad
Originally posted by vikas prasad: CLASSPATH - D:\j2sdkee1.3.1\lib\j2ee.jar; D:\Certification\projects\advice\AdviceAppClient.jar JAVA_HOME = D:\jdk1.3.1_16 J2EE_HOME = D:\j2sdkee1.3.1 PATH = D:\j2sdkee1.3.1;D:\jdk1.3.1_16\bin
Change the relevant part of your PATH to D:\j2sdkee1.3.1\bin;D:\jdk1.3.1_16\bin; or even better %J2EE_HOME%\bin;%JAVA_HOME%\bin; Change your CLASSPATH to: .;%J2EE_HOME%\lib\j2ee.jar;
Open a new console window after you committed the changes (i.e. close the Control panel and open it again to check that the change to the environment variables is still there) and issue the SET PATH command; you should see the full path and somewhere in there: D:\j2sdkee1.3.1\bin;D:\jdk1.3.1_16\bin; Issue the SET CLASSPATH command and you should see: .;D:\j2sdkee1.3.1\lib\j2ee.jar;
Open another new console window and start the application server with j2ee -verbose
Now I'm assuming that you've already successfully deployed the bean.
Go back to the first new console window and run the client code by first changing the directory to D:\Certification\projects\advice then issuing the following command: java -cp %CLASSPATH%;AdviceAppClient.jar AdviceClient
Now under some bizarre circumstances you could still get an error. If the error (CORBA.BAD_OPERATION) matches the description found in the Head First EJB Notes (also found at the beginning of the errata) then make the changes described in those notes - recompile - redeploy - retry. [ November 13, 2005: Message edited by: Peer Reynders ]
Joined: Nov 06, 2005
Hi there, many thanks..... I solved my problem. As you said the problem was with the Classpath. I just removed AdviceAppClient.jar from the classpath and put Directory path where AdviceAppClient is located and my AdviceClient.class started running..., even the Stateful sessionbeanis working.. many thanks for your suggestion.... now i canread further. Cheers pal... vikas prasad