Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 71348 invoked from network); 21 Sep 2007 13:25:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Sep 2007 13:25:28 -0000 Received: (qmail 75899 invoked by uid 500); 21 Sep 2007 13:25:17 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 75864 invoked by uid 500); 21 Sep 2007 13:25:17 -0000 Mailing-List: contact user-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: user@geronimo.apache.org List-Id: Delivered-To: mailing list user@geronimo.apache.org Received: (qmail 75801 invoked by uid 99); 21 Sep 2007 13:25:17 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Sep 2007 06:25:17 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of goyathlay.geronimo@gmail.com designates 64.233.162.231 as permitted sender) Received: from [64.233.162.231] (HELO nz-out-0506.google.com) (64.233.162.231) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Sep 2007 13:25:15 +0000 Received: by nz-out-0506.google.com with SMTP id m7so609007nzf for ; Fri, 21 Sep 2007 06:24:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=vU6zR6aSAWsVsJNRWkVK963VYlCUAmqAL7kgOch4T1Q=; b=ZGfTpFW57Ies/dF0SIkI2ibEZtwP/D3tbh60sksiRq3UyTei9zsdV4sftv+OizJgIZHaqZxxFLCiJN1bF9mdksY6Bos212lIXTtq2OzsMBkD6wdYGSrqxdVXQ4kAa0kE8VNxGK9G3h5TtIlqX/hJHIUyxuCeNtntAd7S/+p0gKI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=kq5bZIhItaLe3xBy6Phc8ZI98UTROz6JLXPL8DUWDw5gG8t40DYrJqbpnl/6vuX1c7rq+5J6s8GD+CDFt5rOAykHi2TjJMIVJO9MMWknkyF/tJLinQ5nLQQUJc+/8tHjIm20JmNmnmUe6GftK0xqO7Gszi5tgXC1HBGb4vm2wPk= Received: by 10.114.148.1 with SMTP id v1mr3078312wad.1190381091210; Fri, 21 Sep 2007 06:24:51 -0700 (PDT) Received: by 10.114.39.7 with HTTP; Fri, 21 Sep 2007 06:24:51 -0700 (PDT) Message-ID: Date: Fri, 21 Sep 2007 09:24:51 -0400 From: "Prasad Kashyap" To: user@geronimo.apache.org Subject: Re: ejb client jndi problem In-Reply-To: <12813817.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <12813817.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org Discussion in the below thread may or may not help you. Check it out. http://www.nabble.com/forum/ViewPost.jtp?post=12197581&framed=y&skin=134 Also see http://openejb.apache.org/jndi-names.html Cheers Prasad On 9/21/07, wanyna wrote: > > I deploy ejb jar in geronimo2.0.1, this is a ejb2 test > http://www.nabble.com/file/p12813817/simple-ejb2-1.0.jar simple-ejb2-1.0.jar > , and this is a ejb3 test > http://www.nabble.com/file/p12813817/simple-ejb3-1.0.jar simple-ejb3-1.0.jar > . > > Both of them deploy no error. > > My client is a standalone application. Test code: > public class ClientTest { > > public static EchoRemote getEchoService(String url, > String contextFactory) throws Exception { > Context context = getInitialContext(contextFactory, url); > Object obj = context.lookup("Echo"); > return (EchoRemote) obj; > } > > public static CounterRemote getCounterService(String url, > String contextFactory) throws Exception { > Context context = getInitialContext(contextFactory, url); > Object obj = context.lookup("SuperCounterBusinessRemote"); > return (CounterRemote) obj; > } > > private static Context getInitialContext(String initContextFactory, > String url) throws Exception { > Properties properties = new Properties(); > properties.put(Context.INITIAL_CONTEXT_FACTORY, initContextFactory); > properties.put(Context.PROVIDER_URL, url); > > return new InitialContext(properties); > } > > public static void main(String[] args) throws Exception{ > String url = "ejbd://localhost:4201"; > String factory = "org.openejb.client.RemoteInitialContextFactory"; > EchoRemote echo = getEchoService(url, factory); > assert("cba".equals(echo.echo("abc"))); > // CounterRemote counter = getCounterService(url, factory); > // assert(counter.reset()==0); > // assert(counter.increment()==1); > // assert(counter.increment()==2); > // assert(counter.reset()==0); > } > > } > > exception: > Exception in thread "main" javax.naming.NameNotFoundException: /Echo does > not exist in the system. Check that the app was successfully deployed. > at org.apache.openejb.client.JNDIContext.lookup(JNDIContext.java:237) > at javax.naming.InitialContext.lookup(InitialContext.java:351) > at test.ClientTest.getEchoService(ClientTest.java:17) > at test.ClientTest.main(ClientTest.java:40) > > What's the right jndi name? > > I see some other messages talk about ejb jndi, but still can't resolve my > problem. > > I deploy ejb2 test in geronimo 1.x, client lookup no problem. > -- > View this message in context: http://www.nabble.com/ejb-client-jndi-problem-tf4492931s134.html#a12813817 > Sent from the Apache Geronimo - Users mailing list archive at Nabble.com. > >