permaculture playing cards
The moose likes EJB and other Java EE Technologies and the fly likes package javax.ejb.*;  does not exist Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "package javax.ejb.*;  does not exist" Watch "package javax.ejb.*;  does not exist" New topic

package javax.ejb.*; does not exist

Amos K

Joined: Dec 26, 2004
Posts: 1
I am new here and right now facing the problem of non-existing javax.ejb.*;
I am using the HF to study the ejb. On the Chapter 1 everything went fine including compiling bean, the two interface classes, which means that the classpath(C:\Sun\J2EE\lib\j2ee.jar) is set correctly, the javax.ejb found. But...the AdviceClient fails the compilation with the "package javax.ejb does not exist" error. Can someone Help???!!!

Seetesh Hindlekar
Ranch Hand

Joined: Feb 13, 2004
Posts: 244

If classpath doesnt help then unzip the contents of j2ee.jar in the classes folder of the App Server.


jim bonafede

Joined: Dec 22, 2004
Posts: 4
Hello, fellow HF reader. Hopefully I can be of help.

I had this problem as well and found a workaround (I mentioned it in a prior thread).

When compiling, include:

or whatever version you're using. If you're following along with the book, I assume you're using 1.3.1.

so basically the line would read:

I don't know if there is a better solution, but this worked for me.
Aruna Rao

Joined: Feb 25, 2003
Posts: 10
the solution helped in compiling the java file. but what should u do if you get Exception in thread "main" java.lang.NoClassDefFoundError: AdviceClient while running it?
Pranav Gorak

Joined: Jun 05, 2011
Posts: 4

I am stuck up right at the same place... NoClassDefFoundError...

Did you find a way out for that... Please let let me know...

Can anyone Help??
I agree. Here's the link:
subject: package javax.ejb.*; does not exist
It's not a secret anymore!