From user-return-6197-apmail-geronimo-user-archive=geronimo.apache.org@geronimo.apache.org Fri Mar 09 11:30:16 2007 Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 54271 invoked from network); 9 Mar 2007 11:30:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Mar 2007 11:30:15 -0000 Received: (qmail 17083 invoked by uid 500); 9 Mar 2007 11:30:20 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 17061 invoked by uid 500); 9 Mar 2007 11:30:19 -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 17049 invoked by uid 99); 9 Mar 2007 11:30:19 -0000 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of anishpathadan@gmail.com designates 64.233.184.230 as permitted sender) Received: from [64.233.184.230] (HELO wr-out-0506.google.com) (64.233.184.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Mar 2007 03:30:17 -0800 Received: by wr-out-0506.google.com with SMTP id i31so1370589wra for ; Fri, 09 Mar 2007 03:28:47 -0800 (PST) DKIM-Signature: a=rsa-sha1; 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:references; b=atvZwMLIM+YmXfHFG5yZ5EFwUMeEOza3kKuhg6nB7FsJu59EbQ819fU1BIN5Oors9S/EXSHmFTz4zqSC/H2iI8LcGhe08ltKe+3hBBrO3toBYG54nGilKzIe7T+US1Kgmz/DBHceQtJ3ysYzqxHRc8Ghcf5Ich2zTwsxzeIHdmY= 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:references; b=Ezx7n8BEoTx6c2jHSgms5Vf46TfBTPPFUoonj8lXeL2YT0Z1Voz6msVPRgvLpcGzlVyoDzm15selm0XO/+SFQrEdMuWC2rQORpnFxNVmpInXzv7yAZzm13ZMFxYGBdLb0zs1/pZBaIG+dvPYIX9JzN4FJBopXoOEPrKjjKWQXPE= Received: by 10.35.103.12 with SMTP id f12mr1105664pym.1173439727539; Fri, 09 Mar 2007 03:28:47 -0800 (PST) Received: by 10.35.114.17 with HTTP; Fri, 9 Mar 2007 03:28:47 -0800 (PST) Message-ID: <5557cbd70703090328k676b5867p9470a26368bca77d@mail.gmail.com> Date: Fri, 9 Mar 2007 16:58:47 +0530 From: "anish pathadan" To: user@geronimo.apache.org Subject: Re: Unable to lookup a session bean In-Reply-To: <20070309032823.181451e9c2a7ebbcd6ae28cea81146c8.2f6564497c.wbe@email.secureserver.net> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_61_15838712.1173439727479" References: <20070309032823.181451e9c2a7ebbcd6ae28cea81146c8.2f6564497c.wbe@email.secureserver.net> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_61_15838712.1173439727479 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Mark, Thank you very much. It worked. Best Regards, Anish Pathadan On 3/9/07, Mark Aufdencamp wrote: > > > Try - ctx.lookup("ejb/TestHome"); > > If that doesn't work: > > 1. What does your ejb-jar.xml and openejb-jar.xml? > > > 2. What does your client Classpath look like? > > > > > -------- Original Message -------- > Subject: Unable to lookup a session bean > From: "anish pathadan" > Date: Fri, March 09, 2007 2:06 am > To: user@geronimo.apache.org > > Hi All, > I deployed an ejbmodule in apache geronimo.The ejb module has a > remote session bean.I tried to lookup the bean from a stand alone java > client. > The following is the code fragment that does the lookup. > > Properties prop = *new* Properties(); > prop.put("java.naming.factory.initial"," > org.openejb.client.RemoteInitialContextFactory "); > prop.put("java.naming.security.principal", "system"); > prop.put("java.naming.security.credentials", "manager"); > prop.put("java.naming.provider.url", "localhost:4201"); > Context ctx = *new* InitialContext(prop); > * return* ctx.lookup("java:comp/env/ejb/TestHome"); > > I have tried changing the url to localhost:8080, 0.0.0.0:4021(as in > config.xml) etc.All attempts went in vein.Can somebody please help me in > finding out what went wrong. > > Attached below is the exception in server side. > 08:55:18,356 ERROR [JndiRequestHandler] JNDI request error > java.lang.IllegalArgumentException: uri path must be in the form > [groupId]/[arti > factId]/[version]/[type] : /java:comp/env/ejb/TestHome > at org.apache.geronimo.gbean.AbstractNameQuery.(AbstractNameQuery. > java:104) > at org.openejb.ContainerIndex.getContainerIndex( > ContainerIndex.java:208) > > at org.openejb.ContainerIndex$$FastClassByCGLIB$$6674ccb6.invoke > ( ted>) > at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53) > at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethod > Invoker.java:38) > at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke > (GBeanOperatio > n.java:122) > at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke > (GBeanInstance. > java:817) > at org.apache.geronimo.gbean.runtime.RawInvoker.invoke( > RawInvoker.java:5 > 7) > at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke > (RawOperat > ionInvoker.java:35) > at org.apache.geronimo.kerne > l.basic.ProxyMethodInterceptor.intercept (Pro > xyMethodInterceptor.java:96) > at > org.openejb.ContainerIndex$$EnhancerByCGLIB$$fd45e6ec.getContainerInd > ex() > at org.openejb.server.ejbd.JndiRequestHandler.doLookup(JndiRequestHandle > > r.java:178) > at org.openejb.server.ejbd.JndiRequestHandler.processRequest > (JndiRequest > > > -- > Best Regards, > Anish Pathadan > > -- Best Regards, Anish Pathadan ------=_Part_61_15838712.1173439727479 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
Hi Mark,
    Thank you very much. It worked.
 
Best Regards,
Anish Pathadan

 
On 3/9/07, Mark Aufdencamp <mark@aufdencamp.com> wrote:

Try - ctx.lookup("ejb/TestHome");
 
If that doesn't work:
 
1. What does your ejb-jar.xml and openejb-jar.xml?
 
 
2. What does your client Classpath look like?
 

 
-------- Original Message --------
Subject: Unable to lookup a session bean
From: "anish pathadan" < anishpathadan@gmail.com>
Date: Fri, March 09, 2007 2:06 am
To: user@geronimo.apache.org

Hi All,
     I deployed an ejbmodule in apache geronimo.The ejb module has a remote session bean.I tried to lookup the bean from a stand alone java client.
The following is the code fragment that does the lookup.
   
          Properties prop = new Properties();
          prop.put("java.naming.factory.initial","org.openejb.client.RemoteInitialContextFactory ");
          prop.put("java.naming.security.principal", "system");
          prop.put("java.naming.security.credentials", "manager");
          prop.put("java.naming.provider.url", "localhost:4201");
          Context ctx = new InitialContext(prop);
           return ctx.lookup("java:comp/env/ejb/TestHome");
 
I have tried changing the url to localhost:8080, 0.0.0.0:4021(as in config.xml) etc.All attempts went in vein.Can somebody please help me in finding out what went wrong.

Attached below is the exception in server side.
08:55:18,356 ERROR [JndiRequestHandler] JNDI request error
java.lang.IllegalArgumentException: uri path must be in the form [groupId]/[arti
factId]/[version]/[type] : /java:comp/env/ejb/TestHome
        at org.apache.geronimo.gbean.AbstractNameQuery .<init>(AbstractNameQuery.
java:104)
        at org.openejb.ContainerIndex.getContainerIndex(ContainerIndex.java:208)

        at org.openejb.ContainerIndex$$FastClassByCGLIB$$6674ccb6.invoke(<genera
ted>)
        at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
        at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke (FastMethod
Invoker.java:38)
        at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperatio
n.java:122)
        at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke (GBeanInstance.
java:817)
        at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:5
7)
        at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperat
ionInvoker.java :35)
        at org.apache.geronimo.kerne l.basic.ProxyMethodInterceptor.intercept (Pro
xyMethodInterceptor.java:96)
        at org.openejb.ContainerIndex$$EnhancerByCGLIB$$fd45e6ec.getContainerInd
ex(<generated>)
        at org.openejb.server.ejbd.JndiRequestHandler.doLookup(JndiRequestHandle
r.java:178)
        at org.openejb.server.ejbd.JndiRequestHandler.processRequest(JndiRequest


--
Best Regards,
Anish Pathadan



--
Best Regards,
Anish Pathadan ------=_Part_61_15838712.1173439727479--