wood burning stoves*
The moose likes EJB and other Java EE Technologies and the fly likes EJB client problem - Please help 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 "EJB client problem - Please help" Watch "EJB client problem - Please help" New topic
Author

EJB client problem - Please help

Ambrose R Tati
Greenhorn

Joined: Nov 06, 2000
Posts: 21
Dear all,
I'm trying to write a small client code for a very basic EJB.
When I start up my EJB Server (Blazix) I see my EJB being deployed
with the following message:
Deploying EJB-Home class "art.HelloHome" at JNDI name "Hello"
Evaluation license
Listening at oemcomputer:2050
My EJB Server uses JRMP version.
The client code:
...
Properties props = System.getProperties();
Context ctx = new InitialContext(props);
HelloHome home = (HelloHome)
javax.rmi.PortableRemoteObject.narrow(
ctx.lookup("Hello"),HelloHome.class);
Hello hello = home.create();
...

but I'm getting the following error:
Error: javax.naming.NameNotFoundException: Hello
where am I going wrong?
Many thanks
Ambrose Tati
Marcos Maia
Ranch Hand

Joined: Jan 06, 2001
Posts: 977
Take a look at how you should set properties for the application server you�re using. The line
Properties props = System.getProperties();
is�t problably wrong, this is container implemented and is differrent from one app server to other.
Originally posted by Ambrose R Tati:
Properties props = System.getProperties();
Context ctx = new InitialContext(props);
HelloHome home = (HelloHome)
javax.rmi.PortableRemoteObject.narrow(
ctx.lookup("Hello"),HelloHome.class);
Hello hello = home.create();


[This message has been edited by Marcos Maia (edited October 08, 2001).]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: EJB client problem - Please help
 
Similar Threads
Running EJB Client
calling ejb on another machine on OC4J hangs
I have deployed my ejb with Weblogic and I have a problem with my client
Calling EJB from Java client
Calling ejb on OC4J application server