[ http://issues.apache.org/jira/browse/GERONIMO-1176?page=all ]
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: http://issues.apache.org/jira/browse/GERONIMO-1176
> 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
> ndler.java:394)
> at
> org.openejb.server.ejbd.EjbRequestHandler.processRequest(EjbRequestHa
> ndler.java:209)
> at org.openejb.server.ejbd.EjbDaemon.service(EjbDaemon.java:150)
> 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:118)
> at
> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.
> java:760)
> at
> org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:5
> 7)
> at
> org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperat
> ionInvoker.java:36)
> at
> org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(Pro
> xyMethodInterceptor.java:96)
> at
> org.activeio.xnet.ServerService$$EnhancerByCGLIB$$461aa4d2.service(<g
> enerated>)
> 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$ContextClassLoaderRunnable.run(Th
> readPool.java:138)
> at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
> So
> urce)
> at java.lang.Thread.run(Unknown Source)
> Caused by: java.lang.NullPointerException
> at
> org.tranql.sql.DataSourceDelegate.getConnection(DataSourceDelegate.ja
> va:36)
> at
> org.tranql.sql.jdbc.JDBCQueryCommand.execute(JDBCQueryCommand.java:61
> )
> at org.openejb.entity.cmp.CMPFinder.execute(CMPFinder.java:98)
> at
> org.openejb.entity.cmp.CollectionValuedFinder.execute(CollectionValue
> dFinder.java:81)
> at
> org.openejb.dispatch.DispatchInterceptor.invoke(DispatchInterceptor.j
> ava:72)
> at
> org.apache.geronimo.naming.java.ComponentContextInterceptor.invoke(Co
> mponentContextInterceptor.java:56)
> at
> org.openejb.ConnectionTrackingInterceptor.invoke(ConnectionTrackingIn
> terceptor.java:81)
> at
> org.openejb.entity.EntityInstanceInterceptor.invoke(EntityInstanceInt
> erceptor.java:136)
> at
> org.openejb.entity.cmp.InTxCacheInterceptor.invoke(InTxCacheIntercept
> or.java:84)
> at
> org.openejb.transaction.ContainerPolicy$TxRequired.invoke(ContainerPo
> licy.java:140)
> at
> org.openejb.transaction.TransactionContextInterceptor.invoke(Transact
> ionContextInterceptor.java:80)
> at
> org.openejb.SystemExceptionInterceptor.invoke(SystemExceptionIntercep
> tor.java:82)
> at
> org.openejb.GenericEJBContainer.invoke(GenericEJBContainer.java:238)
> 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:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira