0 Replies Latest reply on Nov 26, 2002 8:02 PM by Peter Ondruska

    troubles with findMETHOD

    Peter Ondruska Newbie

      With JBoss 3.0.4 and

      My (ejb-jar, not everything, let me know if it is not enough):

      <prim-key-class>java.lang.String</prim-key-class>
      False
      <cmp-version>2.x</cmp-version>
      <abstract-schema-name>customer</abstract-schema-name>
      <cmp-field>
      <field-name>name</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>fullname</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>idno</field-name>
      </cmp-field>
      <primkey-field>name</primkey-field>

      <query-method>
      <method-name>findByIdno</method-name>
      <method-params>
      <method-param>java.lang.String</method-param>
      </method-params>
      </query-method>
      <ejb-ql><![CDATA[SELECT OBJECT(o) FROM customer AS o WHERE o.idno = ?1]]></ejb-ql>



      My (CustomerLocalHome extends EJBLocalHome):

      public CustomerLocal findByIdno(String idno) throws FinderException;

      My code:

      CustomerLocal customer = customerHome.findByIdno(idno);

      I get this error:

      2002-11-27 01:55:06,369 ERROR [STDERR] *** FinderException: Find failed: SQL Exception: Java exception: ': java.lang.NullPointerException'.***
      2002-11-27 01:55:06,379 ERROR [STDERR] javax.ejb.FinderException: Find failed: SQL Exception: Java exception: ': java.lang.NullPointerException'.
      2002-11-27 01:55:06,379 ERROR [STDERR] at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractQueryCommand.execute(JDBCAbstractQueryCommand.java:148)
      2002-11-27 01:55:06,379 ERROR [STDERR] at org.jboss.ejb.plugins.cmp.jdbc.JDBCFindEntityCommand.execute(JDBCFindEntityCommand.java:44)
      2002-11-27 01:55:06,379 ERROR [STDERR] at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.findEntity(JDBCStoreManager.java:541)
      2002-11-27 01:55:06,379 ERROR [STDERR] at org.jboss.ejb.plugins.CMPPersistenceManager.findEntity(CMPPersistenceManager.java:336)
      2002-11-27 01:55:06,379 ERROR [STDERR] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.findEntity(CachedConnectionInterceptor.java:301)
      2002-11-27 01:55:06,379 ERROR [STDERR] at org.jboss.ejb.EntityContainer.findLocal(EntityContainer.java:636)
      2002-11-27 01:55:06,379 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2002-11-27 01:55:06,379 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      2002-11-27 01:55:06,379 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      2002-11-27 01:55:06,379 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:324)
      2002-11-27 01:55:06,379 ERROR [STDERR] at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1119)
      2002-11-27 01:55:06,379 ERROR [STDERR] at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:73)
      2002-11-27 01:55:06,379 ERROR [STDERR] at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:206)
      2002-11-27 01:55:06,379 ERROR [STDERR] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:215)
      2002-11-27 01:55:06,379 ERROR [STDERR] at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:73)
      2002-11-27 01:55:06,379 ERROR [STDERR] at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:90)
      2002-11-27 01:55:06,379 ERROR [STDERR] at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:79)
      2002-11-27 01:55:06,379 ERROR [STDERR] at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:44)
      2002-11-27 01:55:06,379 ERROR [STDERR] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:111)
      2002-11-27 01:55:06,379 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:178)
      2002-11-27 01:55:06,379 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:52)
      2002-11-27 01:55:06,379 ERROR [STDERR] at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:105)
      2002-11-27 01:55:06,379 ERROR [STDERR] at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:129)
      2002-11-27 01:55:06,379 ERROR [STDERR] at org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:487)
      2002-11-27 01:55:06,379 ERROR [STDERR] at org.jboss.ejb.plugins.local.BaseLocalContainerInvoker.invokeHome(BaseLocalContainerInvoker.java:230)
      2002-11-27 01:55:06,379 ERROR [STDERR] at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:110)
      2002-11-27 01:55:06,379 ERROR [STDERR] at $Proxy53.findByIdno(Unknown Source)
      2002-11-27 01:55:06,379 ERROR [STDERR] at cz.fajx.support.support.ejb.SupportLocalEJB.registerUser(Unknown Source)
      2002-11-27 01:55:06,379 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2002-11-27 01:55:06,379 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      2002-11-27 01:55:06,379 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      2002-11-27 01:55:06,379 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:324)
      2002-11-27 01:55:06,379 ERROR [STDERR] at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:660)
      2002-11-27 01:55:06,379 ERROR [STDERR] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
      2002-11-27 01:55:06,379 ERROR [STDERR] at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:77)
      2002-11-27 01:55:06,389 ERROR [STDERR] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:107)
      2002-11-27 01:55:06,389 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:178)
      2002-11-27 01:55:06,389 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:60)
      2002-11-27 01:55:06,389 ERROR [STDERR] at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:130)
      2002-11-27 01:55:06,389 ERROR [STDERR] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:204)
      2002-11-27 01:55:06,389 ERROR [STDERR] at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:313)
      2002-11-27 01:55:06,389 ERROR [STDERR] at org.jboss.ejb.plugins.local.BaseLocalContainerInvoker.invoke(BaseLocalContainerInvoker.java:301)
      2002-11-27 01:55:06,389 ERROR [STDERR] at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:81)
      2002-11-27 01:55:06,389 ERROR [STDERR] at $Proxy58.registerUser(Unknown Source)
      2002-11-27 01:55:06,389 ERROR [STDERR] at RegisterAction.perform(Unknown Source)
      2002-11-27 01:55:06,389 ERROR [STDERR] at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1787)
      2002-11-27 01:55:06,389 ERROR [STDERR] at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1586)
      2002-11-27 01:55:06,389 ERROR [STDERR] at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
      2002-11-27 01:55:06,389 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
      2002-11-27 01:55:06,389 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      2002-11-27 01:55:06,389 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
      2002-11-27 01:55:06,389 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
      2002-11-27 01:55:06,389 ERROR [STDERR] at SetCharacterEncodingFilter.doFilter(Unknown Source)
      2002-11-27 01:55:06,399 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
      2002-11-27 01:55:06,399 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
      2002-11-27 01:55:06,399 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
      2002-11-27 01:55:06,399 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      2002-11-27 01:55:06,399 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      2002-11-27 01:55:06,399 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      2002-11-27 01:55:06,399 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      2002-11-27 01:55:06,399 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      2002-11-27 01:55:06,399 ERROR [STDERR] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:471)
      2002-11-27 01:55:06,399 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      2002-11-27 01:55:06,399 ERROR [STDERR] at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
      2002-11-27 01:55:06,399 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      2002-11-27 01:55:06,399 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      2002-11-27 01:55:06,399 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      2002-11-27 01:55:06,399 ERROR [STDERR] at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)
      2002-11-27 01:55:06,399 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
      2002-11-27 01:55:06,409 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      2002-11-27 01:55:06,409 ERROR [STDERR] at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
      2002-11-27 01:55:06,409 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      2002-11-27 01:55:06,409 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
      2002-11-27 01:55:06,409 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      2002-11-27 01:55:06,409 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      2002-11-27 01:55:06,409 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      2002-11-27 01:55:06,409 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
      2002-11-27 01:55:06,409 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      2002-11-27 01:55:06,409 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      2002-11-27 01:55:06,409 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      2002-11-27 01:55:06,409 ERROR [STDERR] at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1040)
      2002-11-27 01:55:06,409 ERROR [STDERR] at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1151)
      2002-11-27 01:55:06,409 ERROR [STDERR] at java.lang.Thread.run(Thread.java:536)