aspose file tools*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes error with EJB first example Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "error with EJB first example" Watch "error with EJB first example" New topic
Author

error with EJB first example

Ashok Paulraj
Ranch Hand

Joined: Jul 07, 2003
Posts: 78
Hello Ranchers,
I just finished with the first chapter of HF-EJB. I wrote all the 3 reqd. files(2 interface files; 1 bean class) but when I try to compile the 3 files, I am getting error saying "package.javax.ejb does not exist". I have downloaded JDK 1.3 & J2EE 1.3 SDK and have added their bin into environment variables.
please do advice me, any input is appreciated !!
Thanks,
Shalini
Sudhir V
Ranch Hand

Joined: Dec 25, 2002
Posts: 143
This error probably means that either the class path is not set or you have not imported the required libraries
Please follow this link to set the class path
http://www.oreilly.com/catalog/hfjejb/errata/hfjejb.help
[ February 07, 2004: Message edited by: Sudhir ]

Sudhir V<br />(SCJP 1.2, SCWCD, OCA, SCBCD)
Sudhir V
Ranch Hand

Joined: Dec 25, 2002
Posts: 143
Also please follow this link and see if any further errors are in this list.
http://www.coderanch.com/t/158318/java-EJB-SCBCD/certification/Class-not-found-error-when
[ February 07, 2004: Message edited by: Sudhir ]
Ashok Paulraj
Ranch Hand

Joined: Jul 07, 2003
Posts: 78
sudhir,
thanks for your input!!..I got it running by adding the j2ee.jar in the CLASSPATH. Y'day i was setting that under PATH and trying to run it, it wasn't but today, gave the path under CLASSPATH user variable and it worked out!!
~ shalini
Ashok Paulraj
Ranch Hand

Joined: Jul 07, 2003
Posts: 78
Hello Sudhir & Ranchers,
I just wrote the client "AdviceClient.java" and tried out different combinations of including the classpath of both jar & java file to execute the client::
java -cp E:\Abacus\Projects\advice\AdviceAppClient.jar;E:\Abacus\Projects\advice\ AdviceClient
Still, I get an Exception saying "main" java.lang.NoClassDefFoundError: AdviceClient
Any input is appreciated....
~ Shalini
Veena Pointi
Ranch Hand

Joined: Jun 20, 2002
Posts: 442
yeah,even I am getting the same error.
Exception in thread "main" java.lang.NoClassDefFoundError: AdviceClient


SCJP1.4
"Continuous effort - not strength or intelligence - is the key to unlocking our potential."
*Winston Churchill
Sudhir V
Ranch Hand

Joined: Dec 25, 2002
Posts: 143
Ok, your path says E:\Abacus\Projects\advice\ AdviceClient.
Is AdviceClient a folder? Where did you compile the Adviceclient?
Locate the AdviceClient.class file in your drive and include the path till the folder name.
Ex. if the AdviceClient.class is in your advice folder then the path shud be
E:\Abacus\Projects\advice
In your path there also seems to be a space between / AdviceClient. Remove the space. Try that....
[ February 08, 2004: Message edited by: Sudhir Vallam ]
[ February 08, 2004: Message edited by: Sudhir Vallam ]
Ashok Paulraj
Ranch Hand

Joined: Jul 07, 2003
Posts: 78
Hello Sudhir,
java -cp E:\Abacus\Projects\advice\AdviceAppClient.jar;E:\Abacus\Projects\advice(Space)AdviceClient
This is what I tried, infact, same as the example u said that worked out!
~ shalini
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: error with EJB first example
 
Similar Threads
Please: Config CMP
casting
which scbcd version I have to take after scjp 1.4
Setting up the J2ee 1.3 environment problem
Regarding SCBCD Certification