wood burning stoves*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes headfirst ejb !chapter program Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "headfirst ejb !chapter program" Watch "headfirst ejb !chapter program" New topic
Author

headfirst ejb !chapter program

hemapriya rao
Greenhorn

Joined: Jun 27, 2007
Posts: 15
Hi Everyone,

I am trying to run the 1st ejb in the headfirst book on page #18.
I have the exact code as in the book. But the AdviceHome always fails.
It says although it has the Advice.java in the same package as AdviceHome.
Can anyone please tell me what is wrong.

C:\Program Files\Java\j2sdk1.4.2_13\bin\advice\src\headfirst>javac AdviceHome.ja
va
AdviceHome.java:6: cannot resolve symbol
symbol : class Advice
location: interface headfirst.AdviceHome
public Advice create() throws CreateException,RemoteException;
^
1 error
[ June 27, 2007: Message edited by: hemapriya rao ]
Sanjeev BhimaRao
Ranch Hand

Joined: Jul 17, 2006
Posts: 71
try doing this

javac -classpath "<drive path>\j2sdkee1.3.1\lib\j2ee.jar;%CLASSPATH%;" headfirst\*.java
Sanjeev BhimaRao
Ranch Hand

Joined: Jul 17, 2006
Posts: 71
Forgot to add,

did you also follow the directory structure given in the book?

The above command should be executed from src directory.
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

Sanjeev,
thank you for helping at SCBCD's forum. Unfortunately, your name does not conform to the ranch's naming policy. Could you please check it out, and change your name accordingly ?
http://www.javaranch.com/name.jsp

(You need both first and last name)

Thank you


[My Blog]
All roads lead to JavaRanch
hemapriya rao
Greenhorn

Joined: Jun 27, 2007
Posts: 15
Hi,

Thanks for the reply Sanjeev ,I could compile all the 3 programs but the thing is I cannot run the server by j2ee -verbose, I have loaded j2sdkee1.3.1 and j2sdk1.4.2_13,
I am new to EJB please someone help me

I am getting this error:

'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
'-Dorg.xml.sax.parser' is not recognized as an internal or external command,
operable program or batch file.
[ June 29, 2007: Message edited by: hemapriya rao ]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: headfirst ejb !chapter program