This is my first post so please bear with me.
I'm following along with Head First
EJB and having some difficulty getting j2ee, javac, and deploytool to play nice with each other.
Per the book's instruction, I am using j2sdkee1.3.1 and jdk1.3.1_02. I already had been using j2sdk1.4.2_05, but am trying to toe the line.
After downloading and installing j2sdkee1.3.1, I made my paths be as such:
J2EE_HOME C:\j2sdkee1.3.1
JAVA_HOME C:\jdk1.3.1_02
Path C:\j2sdkee1.3.1\bin; C:\jdk1.3.1_02\bin
I skipped ahead a little, tested j2ee -verbose, and got the desired outcome (J2EE server startup complete)
First problem: trying to compile *.java brought errors - Compiler couldn't find javax.ejb. Much searching brought a solution - add j2ee.jar to C:\jdk1.3.1_02\jre\lib\ext. javac'd again - SUCCESS. But it was only temporary....
I started over with the book, compiled the files, restarted j2ee -verbose... and was met with an ugly stream of "No local
string for..."'s
More searching led me to a solution - REMOVE j2ee.jar from C:\jdk1.3.1_02\jre\lib\ext. (sound of hand slapping forehead).
I did, and of course j2ee worked, but I once again could not compile.
So at this point I continued with the book example using the classes I had earlier compiled, shelving the javac problem for a bit.
This led me to deploytool. Without j2ee in C:\jdk1.3.1_02\jre\lib\ext, deploytool doesn't even load at all (unable to create ui). WITH j2ee in there, the GUI appears, but behind it in the console you get a neverending stream of "No local string for..."'s and a complaint that Help could not be found.
Following thru the book example nonetheless, I made it all the way to Deploy. At this point, I got the error: java.lang.NoClassDefFoundError: javax/ejb/EJBMetaData.
Further investigation of the javac issue led me to a temporary solution:
javac -extdirs \j2sdkee1.3.1\lib\ -d ..\classes hf\*.java. This allowed me to remove j2ee.jar to make j2ee happy and still make the compiler happy.
However, deploytool is still unhappy.
Methinks the problem lies somewhere in the classpaths, but no amount of searching has come up with a working solution.
Please help.
jim