geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <david_jen...@yahoo.com>
Subject Re: IllegalArgumentException re uri path given to RemoteInitialContextFactory
Date Wed, 13 Dec 2006 21:01:10 GMT
You can only look up ejbs using this jndi, and generally you want to  
specify a jndi-name in your openejb plan to look them up by.

thanks
david jencks

On Dec 13, 2006, at 11:25 AM, Geronimo User wrote:

> Hello:
>
> I'm using Geronimo 1.1.1.
>
> I'm trying to look up a resource in JNDI using  
> RemoteInitialContextFactory,
> from a JUnit test, because I want to do the same eventually from a
> stand-alone application.
>
> Following some on-line examples, here is my code.
> (The resource path is fictional, because I can't get past what  
> seems to
> be a syntax error in it.)
>
> Properties props = new Properties();
> props.put("java.naming.factory.initial",
> "org.openejb.client.RemoteInitialContextFactory");
> props.put("java.naming.provider.url", "127.0.0.1:4201");
> props.put("java.naming.security.principal", "system");
> props.put("java.naming.security.credentials", "manager");
> Context context = new InitialContext(props);
> // This fails; see Geronimo log below.
> context.lookup("groupId/artifactId/version/type");
>
> Here is the error caused by the lookup().
> It seems that it doesn't like the initial "/" in the URI path?
>
> 14:18:22,904 ERROR [JndiRequestHandler] JNDI request error
> java.lang.IllegalArgumentException: uri path must be in the form
> [groupId]/[artifactId]/[version]/[type] :
> /groupId/artifactId/version/type
>        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(<generated>)
>        at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
>        at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke 
> (FastMethodInvoker.java:38)
>        at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke 
> (GBeanOperation.java:122)
>        at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke 
> (GBeanInstance.java:817)
>        at org.apache.geronimo.gbean.runtime.RawInvoker.invoke 
> (RawInvoker.java:57)
>        at  
> org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke 
> (RawOperationInvoker.java:35)
>        at  
> org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept 
> (ProxyMethodInterceptor.java:96)
>        at org.openejb.ContainerIndex$$EnhancerByCGLIB$ 
> $189ca9f6.getContainerIndex(<generated>)
>        at org.openejb.server.ejbd.JndiRequestHandler.doLookup 
> (JndiRequestHandler.java:178)
>        at org.openejb.server.ejbd.JndiRequestHandler.processRequest 
> (JndiRequestHandler.java:115)
>        at org.openejb.server.ejbd.EjbDaemon.service(EjbDaemon.java: 
> 154)
>        at org.openejb.server.ejbd.EjbServer.service(EjbServer.java:87)
>        at org.openejb.server.ejbd.EjbServer$$FastClassByCGLIB$ 
> $d379d2ff.invoke(<generated>)
>        at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
>        at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke 
> (FastMethodInvoker.java:38)
>        at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke 
> (GBeanOperation.java:122)
>        at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke 
> (GBeanInstance.java:817)
>        at org.apache.geronimo.gbean.runtime.RawInvoker.invoke 
> (RawInvoker.java:57)
>        at  
> org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke 
> (RawOperationInvoker.java:35)
>        at  
> org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept 
> (ProxyMethodInterceptor.java:96)
>        at org.activeio.xnet.ServerService$$EnhancerByCGLIB$ 
> $d5535dbf.service(<generated>)
>        at org.activeio.xnet.ServicePool$2.run(ServicePool.java:67)
>        at org.activeio.xnet.ServicePool$3.run(ServicePool.java:90)
>        at org.apache.geronimo.pool.ThreadPool$1.run(ThreadPool.java: 
> 172)
>        at org.apache.geronimo.pool.ThreadPool 
> $ContextClassLoaderRunnable.run(ThreadPool.java:289)
>        at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run 
> (Unknown
> Source)
>
> How can I go "higher than root" to take the first / off the URI path?
> Or do I have the syntaxt of the URI path completely wrong?
>
> Any help appreciated, thanks.


Mime
View raw message