geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Xiao-fei Song <>
Subject jndi lookup in remote client for geronimo v2
Date Fri, 29 Jun 2007 11:04:08 GMT
Hi guys,

I have developed an EJB 2.x stateless session using netbeans, and I want to write a very simple
stand alone ejb client to access it in geronimo v2. The code looks like below:

        props.setProperty("java.naming.factory.initial", "org.openejb.client.RemoteInitialContextFactory");
        props.setProperty("java.naming.provider.url", "");
        //props.setProperty("", "testuser");
        //props.setProperty("", "testpassword");
        Context ic = new InitialContext(props);
        System.out.println("ic = " + ic);
        Object objRef = ic.lookup("MySessionRemoteHome");

I read the documentation and it looks like the only way to lookup in the remote client is
through jndi-name in openejb-jar.xml. And I have done that as below:

<?xml version="1.0"?>

After the ejb is deployed to geronimo, I ran the client and found below error:

ic = javax.naming.InitialContext@1e51060
Exception in thread "main" javax.naming.NameNotFoundException: /MySessionRemoteHome does not
exist in the system.  Check that the app was successfully deployed.
        at org.apache.openejb.client.JNDIContext.lookup(
        at javax.naming.InitialContext.lookup(Unknown Source)
        at apachegclient.TestClient.main(

Anyone has any idea what's going on?


Ready for the edge of your seat? Check out tonight's top picks on Yahoo! TV. 
Now that's room service! Choose from over 150,000 hotels 
in 45,000 destinations on Yahoo! Travel to find your fit.
View raw message