This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Help, I kept getting compilation error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Reply locked New topic
Author

Help, I kept getting compilation error "package javax.ejb does not exist"

L. Wei
Ranch Hand

Joined: May 01, 2008
Posts: 37
I am a newbie to EJB and now reading EJB3 in Action. I am trying to run the example of Chapter1. I am setting up JBoss AS 5.1.0.GA and Ant on Mac OSX. I downloaded sample zip file from the book website, and tried to compile the 1st chapter. However, I kept getting the compilation error "package javax.ejb does not exist" while using ant. I tried to modify the build.xml file under the chapter1 folder, but still couldn't get it compiled. I couldn't find any solution in the sample instruction pdf file. Where is the jar file should I include for package javax.ejb? so frustrated...

Here is the build.xml file.


Here is my env setup


I did setup JBOSS_HOME and added ant in the PATH. What did I miss in the setup? Please help...


SCJP SE 6.0, SCWCD J2EE 5
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

Your ant script is using the common.j2ee.class.path property to define where the J2EE jars are. I guess it is defined in the imported ../common.xml. Can you show the content of common.xml ?


[My Blog]
All roads lead to JavaRanch
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

Do not duplicate threads. You're wasting other people's time by doing so. Continue the discussion there.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help, I kept getting compilation error "package javax.ejb does not exist"
 
Similar Threads
ant exception
Problem in ServiceGen task
Building Seam projects in Eclipse
package javax.ejb does not exist
JBOSS