• 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
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Error in compiling Advice Client in ejb

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi
i am new to ejb and learning with the help of head first EJB
when I try to compile my client program i am getting the following error....

I tried the solution in the previous post

1.https://coderanch.com/t/158518/java-EJB-SCBCD/certification/Error-compiling-AdviceClient-java
2.https://coderanch.com/t/158486/java-EJB-SCBCD/certification/head-first-ejb-pg-client[/I]
can anybody help me pls...



C:\HFEJBCODE\advice>javac -classpath %CLASSPATH%;AdviceAppClient.jar AdviceClien
t.java
AdviceClient.java:4: package headfirst does not exist
import headfirst.*;
^
AdviceClient.java:24: cannot find symbol
symbol : class AdviceHome
location: class AdviceClient
AdviceHome home = (AdviceHome) PortableRemoteObject.narr
ow(o, AdviceHome.class);
^
AdviceClient.java:24: cannot find symbol
symbol : class AdviceHome
location: class AdviceClient
AdviceHome home = (AdviceHome) PortableRemoteObject.narr
ow(o, AdviceHome.class);
^
AdviceClient.java:24: cannot find symbol
symbol : class AdviceHome
location: class AdviceClient
AdviceHome home = (AdviceHome) PortableRemoteObject.narr
ow(o, AdviceHome.class);

^
AdviceClient.java:26: cannot find symbol
symbol : class Advice
location: class AdviceClient
Advice advisor = home.create();
^
5 errors
 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi priya,
You would set the classpath to the client jar returned from deployment
like set classpath=.;myclient.jar; if the client jar returned is "myclient.jar".So the client program get the stub classes from that jar.
I hope you would get the solution.

Ramesh RK
 
priya pratheep
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks a lot. now it is compiling but when I try to run using the command


java -cp %CLASSPATH%;AdvAppClient.jar AdviceClient (-cp and -classpath)i am getting the error of
 
rameshmca rk
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Could you send me the complete code to identify the cause of the error.I think you should set the classpath for the class specified in the exception.
 
That's my roommate. He's kinda weird, but he always pays his half of the rent. And he gave me this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic