geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aaron Mulder (JIRA)" <>
Subject [jira] Updated: (GERONIMO-1176) Bad "resource" reference is not caught at deployment time
Date Sun, 11 Dec 2005 04:06:10 GMT
     [ ]

Aaron Mulder updated GERONIMO-1176:

        Summary: Bad "resource" reference is not caught at deployment time  (was: Null pointer
Exception occuring)
    Fix Version: 1.1
      Assign To: Aaron Mulder

Currently if you map a resource reference using the objectNameGroup (which "name" is a member
of), we don't validate at deployment time.  This is mainly to support circular references
between modules, in which case we couldn't validate both modules at deployment time (the first
would always fail).

In concept, we could do more aggressive validation if we determine that the reference points
to the same module (like in the example above, where no module is declared).  However, this
would break cases where a component in module "Foo" points to a resource in module "Foo" and
module "Bar" deploys a GBean using a full GBean Name with its module name set to "Foo" (even
though it is actually in "Bar") -- the bottom line being, as of today, the fact that a resource
reference points to the same module doesn't guarantee that the target resource was actually
deployed in that module; it only guarantees that it's named using the same module name.

Now, we could do more agressive validation if we disallow references to resources that use
the wrong module name in their GBean name.  Aaron is slightly in favor of implementing this
rule right away, but David J believes it needs more thought and is risky to implement at the
last second before 1.0.  We've agreed to put this off for now but hope to discuss it again
soon and try to convince ourselves that it wouldn't be a problem.

> Bad "resource" reference is not caught at deployment time
> ---------------------------------------------------------
>          Key: GERONIMO-1176
>          URL:
>      Project: Geronimo
>         Type: Bug
>   Components: OpenEJB
>     Versions: 1.0-M5
>  Environment: Windows XP, Sun JDK1.4.2_09
>     Reporter: Manu T George
>     Assignee: Aaron Mulder
>      Fix For: 1.1

> In openejb-jar.xml file for a cmp entity bean if the cmp-connection-factory element contains
a name tag instead of a resource-link tag a null pointer exception is thrown instead of an
error message shown during deployment. This is a problem with both the deployer and openEJB
I guess.
> <cmp-connection-factory>
>      <name>SystemDatasource</name>
> </cmp-connection-factory>
> Stack trace
> Exception in thread "main" java.rmi.RemoteException: The bean encountered a non-
> application exception. method; nested exception is:
>         java.lang.NullPointerException
>         at org.openejb.server.ejbd.EjbRequestHandler.invoke(EjbRequestHandler.ja
> va:303)
>         at org.openejb.server.ejbd.EjbRequestHandler.doEjbHome_FIND(EjbRequestHa
>         at org.openejb.server.ejbd.EjbRequestHandler.processRequest(EjbRequestHa
>         at org.openejb.server.ejbd.EjbDaemon.service(
>         at org.openejb.server.ejbd.EjbServer.service(
>         at org.openejb.server.ejbd.EjbServer$$FastClassByCGLIB$$d379d2ff.invoke(
> <generated>)
>         at net.sf.cglib.reflect.FastMethod.invoke(
>         at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethod
>         at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperatio
>         at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.
> java:760)
>         at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(
> 7)
>         at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperat
>         at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(Pro
>         at org.activeio.xnet.ServerService$$EnhancerByCGLIB$$461aa4d2.service(<g
> enerated>)
>         at org.activeio.xnet.ServicePool$
>         at org.activeio.xnet.ServicePool$
>         at org.apache.geronimo.pool.ThreadPool$
>         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$ So
> urce)
>         at Source)
> Caused by: java.lang.NullPointerException
>         at org.tranql.sql.DataSourceDelegate.getConnection(DataSourceDelegate.ja
> va:36)
>         at org.tranql.sql.jdbc.JDBCQueryCommand.execute(
> )
>         at org.openejb.entity.cmp.CMPFinder.execute(
>         at org.openejb.entity.cmp.CollectionValuedFinder.execute(CollectionValue
>         at org.openejb.dispatch.DispatchInterceptor.invoke(DispatchInterceptor.j
> ava:72)
>         at
>         at org.openejb.ConnectionTrackingInterceptor.invoke(ConnectionTrackingIn
>         at org.openejb.entity.EntityInstanceInterceptor.invoke(EntityInstanceInt
>         at org.openejb.entity.cmp.InTxCacheInterceptor.invoke(InTxCacheIntercept
>         at org.openejb.transaction.ContainerPolicy$TxRequired.invoke(ContainerPo
>         at org.openejb.transaction.TransactionContextInterceptor.invoke(Transact
>         at org.openejb.SystemExceptionInterceptor.invoke(SystemExceptionIntercep
>         at org.openejb.GenericEJBContainer.invoke(
>         at org.openejb.server.ejbd.EjbRequestHandler.invoke(EjbRequestHandler.ja
> va:297)
>         ... 18 more

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message