Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

error with EJB first example

 
Ashok Paulraj
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 442
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yeah,even I am getting the same error.
Exception in thread "main" java.lang.NoClassDefFoundError: AdviceClient
 
Sudhir V
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic