• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

HF Advisor may i start EJB please?

 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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)
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
also, -cp and -classpath are the same flag, you don't need to specify both.
"java -cp" is enough.
 
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey,
I guess this link would help you solve the problem
"https://coderanch.com/t/161481/java-EJB-SCBCD/certification/AdviceClient-Solution"

Cheers,
Sandeep
 
Ranch Hand
Posts: 222
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic