ejbSelect problem on JBoss 3.2.1
srachels Jun 25, 2003 2:29 PMHello,
I'm trying something that seems pretty straight forward, but it doesn't seem to be working correctly on JBoss 3.2.1. Maybe someone can help figure out if I'm doing it incorrectly or if there is a problem with JBoss.
I have an entity ejb called "Site" that has local and remote interfaces. It has a unidirectional one-to-many cmr relationship with an entity ejb called "UrlParameter". (one site to many urlParameters). UrlParameter has both local and remote interfaces.
I want the client to be able to call a method on the Site remote interface that returns remote interfaces of all the UrlParameters associated with a site. The method is listUrlParameters(). In the Site bean class, it calls ejbSelectUrlParameters(LocalSite site) method that has the following query in the ejb-jar descriptor:
Select related UrlParameters
<query-method>
<method-name>ejbSelectUrlParameters</method-name>
<method-params>
<method-param>pg.ejb.LocalSite</method-param>
</method-params>
</query-method>
<ejb-ql>select DISTINCT OBJECT(p) from Site s, IN(s.urlParameters) p where s=?1</ejb-ql>
<result-type-mapping>Remote</result-type-mapping>
I do not have a jbosscmp-jdbc.xml file since it is optional. When listUrlParameters() is called, I get the following exception:
10:54:44,885 ERROR [LogInterceptor] EJBException, causedBy:
java.lang.NullPointerException at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractQueryCommand.execute(JDBCAbstractQueryCommand.java:224)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractQueryCommand.execute(JDBCAbstractQueryCommand.java:91)
at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCSelectorBridge.execute(JDBCSelectorBridge.java:64)
at org.jboss.ejb.plugins.cmp.bridge.EntityBridgeInvocationHandler.invokeEntityBridgeInvocationHandler.java:96)
at org.jboss.proxy.compiler.Runtime.invoke (Runtime.java:59)
at pg.ejb.SiteBean$Proxy.ejbSelectUrlParameters()
at pg.ejb.SiteBean.listUrlParameters(SiteBean.java:53)
...additional stacktrace omitted...
The attach files funciton of this forum doesn't work, so if you'd like me to cut & paste additional info, let me know.
Any ideas?
Thanks.
Scott