aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes First Bean issue 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 "First Bean issue" Watch "First Bean issue" New topic
Author

First Bean issue

Tony Bateman
Ranch Hand

Joined: Mar 21, 2005
Posts: 42
I have just managed to successfully deploy my first bean on my local server, which was the example in the "Head First EJB" book.

I am trying to create a client application that uses this been (as in the book), but I am trying to use Eclipse to do so.

Whenever I run my client code, I get a NoInitialContextException after these lines:


Could anybody help me with this? Apologies if this is the inappropriate forum to post such a basic question.

Kind Regards,

Tony.
Jeroen T Wenting
Ranch Hand

Joined: Apr 21, 2006
Posts: 1847
Check http://forum.java.sun.com/thread.jspa?threadID=765320&tstart=0 and especially my reply (#3):


Instead supply the following startup arguments to the JVM:

-Dorg.omg.CORBA.ORBInitialHost=${ORBhost}"
-Dorg.omg.CORBA.ORBInitialPort=${ORBport}"



where ORBhost and ORBport are the settings for your server ("myserver", "3700" in your example).

You will also need j2ee.jar and appserv-rt.jar on the classpath when running the client.




42
Tony Bateman
Ranch Hand

Joined: Mar 21, 2005
Posts: 42
Hi,
Thanks, I followed the threads and understand a bit more now. Problem is, I don't seem to have a copy of appserv-rt.jar on my system. I assume it should have come with the J2EE server download.

Any idea why that .jar is missing?

Kind Regards,

Tony.
Jeroen T Wenting
Ranch Hand

Joined: Apr 21, 2006
Posts: 1847
If you use another vendor's appserver that file will be called something else.
JBoss for example calls it jboss-client.jar, Orion calls it orionclient.jar.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: First Bean issue