• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

package javax.ejb does not exist

 
Archer Sirapas
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I use HF to study the ejb. On the Chapter 1 everything went fine including compiling bean, the two interface classes, which means that the classpath is set correctly, the javax.ejb found. But...the AdviceClient fails the compilation with the "package javax.ejb does not exist" error. So what goes wrong.

Thank for the help
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving this to the SCBCD forum...
 
Dilip Gamage
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please Go to authors Site you will probably get another trouble after this situation if you are using Windows...

PLS Refer the Notes. Which give you all about how to configure.

Dont forget to change the name "getAdvice()" method name. With out 'advice' prace. Other wise you wil get runtime error.(due to BUG in j2ee 1.3.1)

Check this
 
Dilip Gamage
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please configure seeing this Notes.

web page
 
X. Li
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This was ever discussed here. You can find answer hereHow to compile AdviceBean
 
Archer Sirapas
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I finally can compile and run the AdviceClient. Here the stats, Windows XP, jdk1.4.2.06, j2ee1.3.1 The j2ee.jar classpath is set correctly so that the bean and interface classes are able to compile.

In compiling the AdviceClient, the j2ee.jar classpath is appended explicitly.
i.e. javac -classpath {classpath:AdviceAppClient.jar}{classpath:j2ee.jar}AdviceClient.java

Then there was another problem when trying to run the client. The AdviceClient class is not found, eventhough the command promt is at that directory the class is right there. Thank Angus Rose from the forum
linklink

I still need to
a)explicitly append the j2ee classpath,
b)set the working directory in the sys env
c)explicitly append . in the classpath while running

i.e. java -classpath {classpath:AdviceAppClient};{classpath:j2ee.jar};.; AdviceClient

I know it is strange that the j2ee.jar has to be explicitly appended, may be b/c it is XP.

As Kathy mentioned, take 10 minutes to write the bean code, but 3 days to get it to work. Whew....

I am glad and happy anyhow.

javaranch forum is really useful
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic