geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Davanum Srinivas <dava...@gmail.com>
Subject Re: Help! Geronimo+JNDI
Date Thu, 14 Oct 2004 17:33:30 GMT
Can someone help Rohit?

thanks,
dims


On Thu, 14 Oct 2004 21:32:59 +0530, Varicatt, Rohit (Cognizant)
<vrohit@blr.cognizant.com> wrote:
> 
> 
> Hi Davanum,
> 
> This is probably inappropriate, but having been on the Geronimo mailing
> list,I decided to try Geronimo out and am up against a roadblock. I
> wrote a simple HelloWorldBean and successfully deployed it. But my
> client repeatedly gives me a NameNotFoundException. Am I doing something
> wrong? I would be very grateful if you could help me.
> 
> The client code :
> import java.util.Hashtable;
> import javax.naming.InitialContext;
> import javax.naming.NamingException;
> public class FirstClient {
>         public static void main(String[] args) {
>                 try {
>                         Hashtable env = new Hashtable();
>                         env.put(
>                                 "java.naming.factory.initial",
> 
> "com.sun.jndi.rmi.registry.RegistryContextFactory");
>                         env.put("java.naming.factory.url.pkgs",
> "org.apache.geronimo.naming");
>                         env.put("java.naming.provider.url",
> "rmi://localhost:1099");
>                         InitialContext ctx = new InitialContext(env);
>                         Object lookupResult =
> ctx.lookup("HelloWorldHome");
>                 }
>                 catch (NamingException e) {
>                         e.printStackTrace();
>                 }
>         }
> }
> 
> The jndi-name I have declared in openejb-jar for my bean is
> "HelloWorldHome".
> 
> Thank you,
> Rohit
> 
> This e-mail and any files transmitted with it are for the sole use of the intended recipient(s)
and may contain confidential and privileged information.
> If you are not the intended recipient, please contact the sender by reply e-mail and
destroy all copies of the original message.
> Any unauthorised review, use, disclosure, dissemination, forwarding, printing or copying
of this email or any action taken in reliance on this e-mail is strictly
> prohibited and may be unlawful.
> 


-- 
Davanum Srinivas - http://webservices.apache.org/~dims/

Mime
View raw message