2 Replies Latest reply on May 8, 2003 4:08 PM by natonoll

    EJB spec violation

    natonoll

      I was pleased when my first container managed entity EJB with JBOSS 3.2.0 and MySQL 4.0.12 worked.

      I then proceeded to create an additional finder Collection findByJobId(Integer)

      When I deploy the bean I receive the following:
      Bean : CountEntityEJB
      Method : public abstract Collection findByJobId(Integer) throws FinderException, RemoteException
      Section: 10.5.6
      Warning: Every finder method except findByPrimaryKey(key) must be associated with a query element in the deployment descriptor.

      I think I have done that as the deployment descriptor looks like this:

      <query-method>
      <method-name>findAll</method-name>
      <method-params>
      </method-params>
      </query-method>
      <ejb-ql><![CDATA[SELECT OBJECT(a) FROM trucktally as a]]></ejb-ql>


      <query-method>
      <method-name>findByJobId</method-name>
      <method-params>
      <method-param>Integer</method-param>
      </method-params>
      </query-method>
      <ejb-ql><![CDATA[SELECT OBJECT(a) FROM portable_count WHERE job_id = ?1]]></ejb-ql>


      What else do I need to do to create an additional finder?

      Thanks,

      NN