-------- Original Message --------
Subject: Unable to lookup a session bean
From: "anish pathadan" <[EMAIL PROTECTED]>
Date: Fri, March 09, 2007 2:06 am
To: [email protected]
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
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?
- Unable to lookup a session bean anish pathadan
- RE: Unable to lookup a session bean Mark Aufdencamp
- Re: Unable to lookup a session bean anish pathadan
