• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HF Advisor may i start EJB please?

 
hanihanan younis
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Ranchers,

i have more than 20 days tries to run Hello EJB example which is known as Advisor example in Head First EJB..the problem is still not be able to run it..i read a lot of here replies in this great forum..but still not find the Missing thing/s ..

im working in windows XP OS
last thing i reach it:
E:\j2sdkee1.3.1\projects\advice>javac -d classes -classpath classes;E:\j2sdkee1.
3.1\lib\j2ee.jar src/headfirst/*.java


success javac..

but when i want to
E:\j2sdkee1.3.1\projects\advice>java -cp -classpath E:\j2sdkee1.3.1\lib\j2ee.jar
;AdviceAppClient.jar;AdviceClient
Exception in thread "main" java.lang.NoClassDefFoundError: E:\j2sdkee1/3/1\lib\j
2ee/jar;AdviceAppClient/jar;AdviceClient
my 2 questions is:
1) is the javac correct it is appear to me yes..but please tell me if not?
2)why java...etc give me like this..NoClassDefFoundError in jar file AdviceAppClient i think..


please i spend too long time in this Starting & i have adream to take this certifcation..
PLEASE HELP HELP HELP i need that more than rose for a rescue boat (TITANIC)
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know about the sample app, but what I can say is to remove the last semi-colon :

java -cp -classpath E:\j2sdkee1.3.1\lib\j2ee.jar;AdviceAppClient.jar AdviceClient
 
hanihanan younis
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Satou ,
thanx to your quick response...but still give me the same error about jar file..any more suggesions from anyone please
 
Wachirakorn Pimopng
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try ... specific AdviceAppClient.jar path like

java -cp -classpath E:\j2sdkee1.3.1\lib\j2ee.jar;E:\j2sdkee1.3.1\lib\AdviceAppClient.jar AdviceClient
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
also, -cp and -classpath are the same flag, you don't need to specify both.
"java -cp" is enough.
 
Sandeep Prabhakar
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey,
I guess this link would help you solve the problem
"http://www.coderanch.com/t/161481/java-EJB-SCBCD/certification/AdviceClient-Solution"

Cheers,
Sandeep
 
Ankit Doshi
Ranch Hand
Posts: 222
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try putting the classpath in double quotes (").

java -classpath ".;E:\j2sdkee1.3.1\lib\j2ee.jar;AdviceAppClient.jar" AdviceClient
 
hanihanan younis
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
THANX ALL Im success to make the Hello EJB=Advisor
thanx for sharing your suggestions to help me:
the link from Sandeep help me a lot
quick tips for new persons:
1)make JAVA_HOME,J2EE_HOME,CLASSPATH,PATH ready before Do anything
2)follow the steps of HF for wizards
3)Dont Turn off the Server (So the client can take the (advice )Response
4)After make clinet class ready run it if you use Windows OS like this link said in the end (Dont waste your time to read the Nice Story if you are hurry a lot)
At the End THANKS TO ALL who try to help wether he/she success or not..the point is there are nice people like you care about our probelms

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic