| Author |
package javax.ejb does not exist
|
L. Wei
Ranch Hand
Joined: May 01, 2008
Posts: 37
|
|
Hi,
I am trying to run the examples of "Action In EJB3". I am using osx snow leopard on my macbook. I installed JBoss AS6.0 and Ant, and tried to compile actionbazaar of chapter1. I got "package javax.ejb does not exist" error. I am using Java 1.6.0_20 from osx 10.6.
I know that I need j2ee.jar but where is it? I didn't even find it in JBoss installation folder. Should I install J2ee sdk? Why couldn't I find this jar in jboss folder? Any one can help?
|
SCJP SE 6.0, SCWCD J2EE 5
|
 |
Ninad Kulkarni
Ranch Hand
Joined: Aug 31, 2007
Posts: 774
|
|
|
If you are geeting such error at compile time then you have to set path location in xml file according to your environment.
|
SCJP 5.0 - JavaRanch FAQ - Java Beginners FAQ - SCJP FAQ - SCJP Mock Tests - Tutorial - JavaSE7 - JavaEE6 -Generics FAQ - JLS - JVM Spec - Java FAQs - Smart Questions
|
 |
L. Wei
Ranch Hand
Joined: May 01, 2008
Posts: 37
|
|
Thank you Ninad. I tried to modify the build.xml file, but I still couldn't get it compiled. I keep getting the compilation error
Here is the build.xml file of the chapter1 in EJB3 in Action.
and Here is my env setup.
What should I change to get this HelloWorld example run? Which jar file should I include to have javax.ejb package? Please advice. I appreciate it.
|
 |
Christophe Verré
Sheriff
Joined: Nov 24, 2005
Posts: 14672
|
|
|
Check my question there, and stop duplicating threads.
|
[My Blog]
All roads lead to JavaRanch
|
 |
L. Wei
Ranch Hand
Joined: May 01, 2008
Posts: 37
|
|
Thank you Christophe. Here is the common.xml. Please advice.
Christophe Verré wrote:Check my question there, and stop duplicating threads.
|
 |
Christophe Verré
Sheriff
Joined: Nov 24, 2005
Posts: 14672
|
|
|
Do you have the following file : /Users/lwei/Tools/jboss-5.1.0.GA/server/default/lib/jboss-j2ee.jar ?
|
 |
L. Wei
Ranch Hand
Joined: May 01, 2008
Posts: 37
|
|
No, no files in the server/default/lib folder. Did I miss anything? I downloaded the jboss-5.1.0.GA-jdk6.zip file only from its download page. should I download the src file?
I did "find . -name jboss-j2ee.jar -print" at the jboss-5.1.0.GA folder, but not find it either.
Christophe Verré wrote:Do you have the following file : /Users/lwei/Tools/jboss-5.1.0.GA/server/default/lib/jboss-j2ee.jar ?
|
 |
Christophe Verré
Sheriff
Joined: Nov 24, 2005
Posts: 14672
|
|
L. Wei wrote:No, no files in the server/default/lib folder. Did I miss anything? I downloaded the jboss-5.1.0.GA-jdk6.zip file only from its download page. should I download the src file?
I did "find . -name jboss-j2ee.jar -print" at the jboss-5.1.0.GA folder, but not find it either.
From the author of the book (here): "We currently do not support JBoss 5. Our example code is targeted for JBoss 4.2."
I'm moving this thread to the JBoss forum.
|
 |
Vikram Saxena
Ranch Hand
Joined: Dec 16, 2008
Posts: 53
|
|
You have to include the jboss-javaee.jar file. Its present in the same location i.e. <,YourServer>>\lib.
Also, Please ensure that you are using the correct JAR files as the naming conventions have changed.
Hope this helps !
|
Vikram
SCJP 5 , SCBCD [Prep Started ] , WLS 8.1 Server Admin
|
 |
 |
|
|
subject: package javax.ejb does not exist
|
|
|