4 Replies Latest reply on Jun 2, 2003 1:16 PM by Erik Hansen

    Failed deploy with customer Finder methods

    Erik Hansen Newbie

      I am consistently getting messages from JBoss when I try to deploy a entity bean with a customer finder defined (using XDoclet). I can see that the query element is present in ejb-jar.xml, but JBoss complains:

      15:59:52,021 WARN [verifier] EJB spec violation:
      Bean : Chassis
      Method : public abstract ChassisLocal findChassisByName(String) throws FinderException
      Section: 10.5.6
      Warning: Every finder method except findByPrimaryKey(key) must be associated with a query element in the deployment descriptor.


      What gives? Am I missing something?

        • 1. Re: Failed deploy with customer Finder methods
          Adrian Brock Master

          Post ejb-jar.xml so that we can see it as well.

          Regards,
          Adrian

          • 2. Re: Failed deploy with customer Finder methods
            Erik Hansen Newbie

            Here is the section for the bean in question.

            <!-- Entity Beans -->

            <![CDATA[]]>

            <ejb-name>Chassis</ejb-name>

            com.cvni.pmc.entity.ChassisHome
            com.cvni.pmc.entity.Chassis
            <local-home>com.cvni.pmc.entity.ChassisLocalHome</local-home>
            com.cvni.pmc.entity.ChassisLocal

            <ejb-class>com.cvni.pmc.entity.ChassisCMP</ejb-class>
            <persistence-type>Container</persistence-type>
            <prim-key-class>java.lang.Integer</prim-key-class>
            False
            <cmp-version>2.x</cmp-version>
            <abstract-schema-name>chassisSchema</abstract-schema-name>
            <cmp-field >
            <![CDATA[Returns the chassisId]]>
            <field-name>chassisId</field-name>
            </cmp-field>
            <cmp-field >
            <![CDATA[Returns the chassisName]]>
            <field-name>chassisName</field-name>
            </cmp-field>
            <cmp-field >
            <![CDATA[Returns the chassisAdminStatus]]>
            <field-name>chassisAdminStatus</field-name>
            </cmp-field>
            <cmp-field >
            <![CDATA[Returns the chassisScopeId]]>
            <field-name>chassisScopeId</field-name>
            </cmp-field>
            <cmp-field >
            <![CDATA[Returns the recordCreateDate]]>
            <field-name>recordCreateDate</field-name>
            </cmp-field>
            <cmp-field >
            <![CDATA[Returns the recordUpdateDate]]>
            <field-name>recordUpdateDate</field-name>
            </cmp-field>
            <cmp-field >
            <![CDATA[Returns the recordCreateUser]]>
            <field-name>recordCreateUser</field-name>
            </cmp-field>
            <cmp-field >
            <![CDATA[Returns the recordUpdateUser]]>
            <field-name>recordUpdateUser</field-name>
            </cmp-field>
            <cmp-field >
            <![CDATA[Returns the notes]]>
            <field-name>notes</field-name>
            </cmp-field>
            <primkey-field>chassisId</primkey-field>


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


            <query-method>
            <method-name>findChassisByName</method-name>
            <method-params>
            <method-param>String</method-param>
            </method-params>
            </query-method>
            <result-type-mapping>Local</result-type-mapping>
            <ejb-ql><![CDATA[SELECT OBJECT(a) FROM chassisSchema as a WHERE a.chassisName = ?1]]></ejb-ql>

            <!-- Write a file named ejb-finders-ChassisBean.xml if you want to define extra finders. -->

            • 3. Re: Failed deploy with customer Finder methods
              Harald Gliebe Novice

              You must fully qualify the class names of the finder parameters, so use java.lang.String instead of String.

              Regards,
              Harald

              • 4. Re: Failed deploy with customer Finder methods
                Erik Hansen Newbie

                The error message I was getting wasn't indicating a problem with that field, so thank you very much. That fixed my problem.