geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Isuru Samaraweera <isurunishan2...@yahoo.com>
Subject Re: Open-EJB application client problem
Date Wed, 12 Jul 2006 16:25:43 GMT
Its a J2EE client I am using.Here is the client code
   
   Hashtable ht=new Hashtable();
  ht.put("java.naming.factory.initial","org.openejb.client.RemoteInitialContextFactory");
  ht.put("java.naming.provider.url","127.0.0.1:4201");
  ht.put("java.naming.security.principal","system");
  ht.put("java.naming.security.credentials","manager");
  
  try
  {
  Context context = new InitialContext(ht);
  StoreHome home =null; 
   home=(StoreHome)context.lookup("java:comp/env/ejb/StoreLocal");
 
 Store store = home.create();
  store.storeMax();
  }
  
Thank You,
  regards,
  Isuru
David Jencks <david_jencks@yahoo.com> wrote:
  It looks to me as if you are using a non-j2ee app client but trying to use jndi as if it
is a j2ee app client.  From a non-j2ee-app-client you have to look up whatever you specify
as jndi-name in the openejb config, and you have to use the proprietary jndi configuration
for openejb jndi.  In particular you shouldn't be looking in java:comp unless you have a j2ee
client.  Can you clarify what you are trying to do?  

  thanks
  david jencks
  
    On Jul 11, 2006, at 11:14 AM, Isuru Samaraweera wrote:

    Hi All,
   
  I have successfully deployed an application with session bean  in geronimo1.1 
  However when I try to lookup the  session bean from a client application,jndi  name
  (java:comp/env/ejb/StoreLocal) was not bound.In the geronimoserver console following error
was displayed.
   
  23:09:13,812 ERROR [JndiRequestHandler] JNDI request error
java.lang.IllegalArgumentException: uri path must be in the form [groupId]/[arti
factId]/[version]/[type] : /java:comp/env/ejb/StoreLocal
        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.kernel.basic.ProxyMethodInterceptor.intercept(Pro
xyMethodInterceptor.java:96)
        at org.openejb.ContainerIndex$$EnhancerByCGLIB$$4d03a4f9.getContainerInd
ex(<generated>)
        at org.openejb.server.ejbd.JndiRequestHandler.doLookup(JndiRequestHandle
r.java:178)
        at org.openejb.server.ejbd.JndiRequestHandler.processRequest(JndiRequest
Handler.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(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.kernel.basic.ProxyMethodInterceptor.intercept(Pro
xyMethodInterceptor.java:96)
        at org.activeio.xnet.ServerService$$EnhancerByCGLIB$$9ba58c2.service(<ge
nerated>)
        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(Th
readPool.java:289)
        at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown So
urce)
        at java.lang.Thread.run(Thread.java:595)

   
  I have put following jar files in the classpath.
   
  geronimo-kernel-1.1-SNAPSHOT.jar
  geronimo-spec-j2ee-1.4-rc4.jar
  openejb-core-2.0-SNAPSHOT.jar
  cglib-nodep-2.1.jar
  geronimo-security-1.1-SNAPSHOT.jar
   
  Can anybody suggest a solution for this problem?
   
  Thank You,
  regards,
  Isuru
  

  
---------------------------------
  Want to be your own boss? Learn how on Yahoo! Small Business.




 		
---------------------------------
How low will we go? Check out Yahoo! Messenger’s low  PC-to-Phone call rates.
Mime
View raw message