• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

First Bean issue

 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 1847
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.


 
Tony Bateman
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 1847
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
My, my, aren't you a big fella. Here, have a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic