• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

package javax.ejb does not exist

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Ranch Hand
Posts: 814
Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you are geeting such error at compile time then you have to set path location in xml file according to your environment.
 
L. Wei
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Check my question there, and stop duplicating threads.
 
L. Wei
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you Christophe. Here is the common.xml. Please advice.



Christophe Verré wrote:Check my question there, and stop duplicating threads.

 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do you have the following file : /Users/lwei/Tools/jboss-5.1.0.GA/server/default/lib/jboss-j2ee.jar ?
 
L. Wei
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 !
reply
    Bookmark Topic Watch Topic
  • New Topic