Hello All,
I just got the headfirst
EJB book (was pumped up the reading the first few pages) and then it's been downhill since!
First, I couldn't find the tool in the RI to build the xml file. I brushed that aside (not wanting to dampen my hyper amped spirit) and coded by hand and created the xml file.
Then I created the directory structure exactly the way it's described in the book. So we're still good at this point.
Then the troubles begin. I tried compiling the classes using javac -d ../classes headfirst/*.java to compile the three
java class files. I get a javac is not a symbol error so I explicitly set the path variable and tried again. No dice. Here's the error I get:
headfirst\Advice.java:3: package javax.ejb does not exist
import javax.ejb.*;
^
headfirst\Advice.java:7: cannot find symbol
symbol: class EJBObject
public interface Advice extends EJBObject {
^
headfirst\AdviceBean.java:3: package javax.ejb does not exist
import javax.ejb.*;
^
headfirst\AdviceBean.java:5: cannot find symbol
symbol: class SessionBean
public class AdviceBean implements SessionBean {
^
headfirst\AdviceBean.java:28: cannot find symbol
symbol : class SessionContext
location: class headfirst.AdviceBean
public void setSessionContext(SessionContext ctx) {
^
headfirst\AdviceHome.java:3: package javax.ejb does not exist
import javax.ejb.*;
^
headfirst\AdviceHome.java:7: cannot find symbol
symbol: class EJBHome
public interface AdviceHome extends EJBHome {
^
headfirst\AdviceHome.java:9: cannot find symbol
symbol : class CreateException
location: interface headfirst.AdviceHome
public Advice create() throws CreateException, RemoteException;
^
8 errors
My attempt at solving this has been on the lines of trying to figure out what classpath needs to be set and what path variables need to be set and I tried a combination of all those without success. I've got 2 javac.exe files - one that is in my java\jdl1.6.0_15\bin directory and another one that is with the Sun\AppServer\jdk\bin folder so I explicitly tried setting the path var to the first one and then the second but didn't work. Also, I'm on windows 7 os with 64 bit. Could this be an issue? Either way, I've hit a brick wall and obviously, the wall is winning.