geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Aufdencamp <m...@aufdencamp.com>
Subject RE: Unable to lookup a session bean
Date Fri, 09 Mar 2007 10:28:23 GMT
<BR>
<DIV name="wmMessageComp">Try - ctx.lookup("ejb/TestHome");</DIV>
<DIV name="wmMessageComp">&nbsp;</DIV>
<DIV name="wmMessageComp">If that doesn't work:</DIV>
<DIV name="wmMessageComp">&nbsp;</DIV>
<DIV name="wmMessageComp">1. What does your ejb-jar.xml and&nbsp;openejb-jar.xml?</DIV>
<DIV name="wmMessageComp">&nbsp; <BR></DIV>
<DIV name="wmMessageComp">2. What does your client Classpath look like?</DIV>
<DIV name="wmMessageComp">&nbsp;</DIV>
<DIV name="wmMessageComp"><BR></DIV>
<BLOCKQUOTE style="PADDING-LEFT: 8px; MARGIN-LEFT: 8px; BORDER-LEFT: blue 2px solid" name="wmMessageComp">--------
Original Message --------<BR>Subject: Unable to lookup a session bean<BR>From:
"anish pathadan" &lt;anishpathadan@gmail.com&gt;<BR>Date: Fri, March 09, 2007
2:06 am<BR>To: user@geronimo.apache.org<BR><BR>
<DIV>Hi All,</DIV>
<DIV>
&nbsp;&nbsp;&nbsp;&nbsp; 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.</DIV>
<DIV>The following is the code fragment that does the lookup.</DIV>
<DIV>&nbsp;&nbsp;&nbsp; <FONT size=2></FONT></DIV>
<div align=left>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Properties prop =
<B><FONT color=#7f0055 size=2>new</FONT></B><FONT size=2> Properties();</FONT></div>
<div align=left><FONT size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;prop.put(</FONT><FONT color=#2a00ff size=2>"java.naming.factory.initial"</FONT><FONT
size=2>,</FONT><FONT color=#2a00ff size=2>"org.openejb.client.RemoteInitialContextFactory
"</FONT><FONT size=2>);</FONT></div>
<div align=left>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
prop.put(<FONT color=#2a00ff size=2>"java.naming.security.principal"</FONT><FONT
size=2>, </FONT><FONT color=#2a00ff size=2>"system"</FONT><FONT size=2>);</FONT></div>
<div align=left>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
prop.put(<FONT color=#2a00ff size=2>"java.naming.security.credentials"</FONT><FONT
size=2>, </FONT><FONT color=#2a00ff size=2>"manager"</FONT><FONT size=2>);</FONT>
</div>
<div align=left>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
prop.put(<FONT color=#2a00ff size=2>"java.naming.provider.url"</FONT><FONT
size=2>, </FONT><FONT color=#2a00ff size=2>"localhost:4201"</FONT><FONT
size=2>);</FONT> </div>
<div align=left></P>
<div align=left>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Context ctx =
<B><FONT color=#7f0055 size=2>new</FONT></B><FONT size=2> InitialContext(prop);</FONT></div>
<div align=left></div>
<DIV><B><FONT color=#7f0055 size=2>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
return</FONT></B><FONT size=2> ctx.lookup("<FONT color=#2a00ff size=2>java:comp/env/ejb/TestHome"</FONT>);</FONT></DIV>
<DIV><FONT size=2>&nbsp;</FONT></DIV>
<DIV>
I have tried changing the url to localhost:8080, 0.0.0.0:4021(as in
config.xml)&nbsp;etc.All attempts went in vein.Can somebody&nbsp;please help me in
finding out what went wrong.</DIV>
<DIV><BR clear=all>Attached below is the exception in server side.</DIV>
<DIV>
<div>08:55:18,356 ERROR [JndiRequestHandler] JNDI request error<BR>
java.lang.IllegalArgumentException: uri path must be in the form
[groupId]/[arti<BR>factId]/[version]/[type] : /java:comp/env/ejb/TestHome<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
at org.apache.geronimo.gbean.AbstractNameQuery .&lt;init&gt;(AbstractNameQuery.<BR>java:104)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
at org.openejb.ContainerIndex.getContainerIndex(ContainerIndex.java:208)</div>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.openejb.ContainerIndex$$FastClassByCGLIB$$6674ccb6.invoke(&lt;genera<BR>ted&gt;)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke (FastMethod<BR>Invoker.java:38)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperatio<BR>n.java:122)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.<BR>java:817)
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:5<BR>7)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperat<BR>ionInvoker.java:35)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
at org.apache.geronimo.kerne
 l.basic.ProxyMethodInterceptor.intercept (Pro<BR>xyMethodInterceptor.java:96)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
at org.openejb.ContainerIndex$$EnhancerByCGLIB$$fd45e6ec.getContainerInd<BR>ex(&lt;generated&gt;)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
at org.openejb.server.ejbd.JndiRequestHandler.doLookup(JndiRequestHandle <BR>r.java:178)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
at org.openejb.server.ejbd.JndiRequestHandler.processRequest(JndiRequest</div><BR>--
<BR>Best Regards,<BR>Anish Pathadan </DIV></BLOCKQUOTE>


Mime
View raw message