wood burning stoves 2.0*
The moose likes EJB and other Java EE Technologies and the fly likes Error in compiling Advice Client in ejb Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Error in compiling Advice Client in ejb" Watch "Error in compiling Advice Client in ejb" New topic
Author

Error in compiling Advice Client in ejb

priya pratheep
Greenhorn

Joined: Mar 07, 2007
Posts: 13
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.http://www.coderanch.com/t/158518/java-EJB-SCBCD/certification/Error-compiling-AdviceClient-java
2.http://www.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
rameshmca rk
Greenhorn

Joined: Jan 27, 2007
Posts: 17
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

Joined: Mar 07, 2007
Posts: 13
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

Joined: Jan 27, 2007
Posts: 17
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error in compiling Advice Client in ejb
 
Similar Threads
Help with compiling AdviceClient.java
Error while compiling
problem on hfejsb page 57
Error compiling the AdviceClient.java
Getting compile error for AdviceClient.java from Head First EJB