0 Replies Latest reply on May 12, 2003 3:19 PM by shelly

    declaring finders in deployment descriptor

    shelly Newbie

      The version of Jboss: 3.x

      i'm getting the error

      14:00:47,630 WARN [verifier] EJB spec violation:
      Bean : CDBean
      Method : public abstract Collection findByType(String) throws RemoteException, FinderException
      Section: 10.5.6
      Warning: Every finder method except findByPrimaryKey(key) must be associated with a query element in the deployment descriptor.

      my ejb-jar.xml looks like this


      Models a music CD
      <ejb-name>CDBean</ejb-name>
      CDHome
      CD
      <ejb-class>CDBean</ejb-class>
      <persistence-type>Container</persistence-type>
      <prim-key-class>java.lang.String</prim-key-class>
      False
      <cmp-version>2.x</cmp-version>
      <abstract-schema-name>CDBean</abstract-schema-name>

      findByType
      type ={0}





      <cmp-field>
      <field-name>id</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>title</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>artist</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>type</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>notes</field-name>
      </cmp-field>
      <primkey-field>id</primkey-field>


      i also put the finder clause in jaws.xml.

      but i keep getting the same error