3 Replies Latest reply on Jan 16, 2003 3:23 AM by pranav

    Finder Mappings in Deployment Descriptor

    pranav

      Dear All,

      >>> JBoss/Ant/XDoclet/HyperSonic/Tomcat <<<

      ----------------------------------
      JBoss] Method : public abstract Collection findByName(String) throws
      RemoteException, FinderException
      [JBoss] Section: 10.5.6
      [JBoss] Warning: Every finder method except findByPrimaryKey(key) must be associated with a query element in the deployment descriptor.
      -----------------------------------

      When I deploy my application thru the build file following error comes with every Finder method that I have...

      Try it....may be you cud help...

      Cheers

        • 1. Re: Finder Mappings in Deployment Descriptor
          lorensrosen

          What's your deployment descriptor look like?

          • 2. Re: Finder Mappings in Deployment Descriptor
            pranav

            Following the content of my jaws.xml file
            I don't want to make changes in this by-hand. I need something which I can do in the main Bean class, which is generating other files/classes.

            Pranav

            • 3. Re: Finder Mappings in Deployment Descriptor
              pranav

              Sorrrrrrrrrrrry forget to add the file...

              Cheers...

              <?xml version="1.0" encoding="UTF-8"?>
              <!DOCTYPE jaws PUBLIC "-//JBoss//DTD JAWS 3.0//EN" "http://www.jboss.org/j2ee/dtd/jaws_3_0.dtd">


              java:/DefaultDS
              <type-mapping>Hypersonic SQL</type-mapping>

              <enterprise-beans>


              <ejb-name>cmp/Product</ejb-name>

              <cmp-field>
              <field-name>basePrice</field-name>
              <column-name>BasePrice</column-name>

              </cmp-field>
              <cmp-field>
              <field-name>description</field-name>
              <column-name>Description</column-name>

              </cmp-field>
              <cmp-field>
              <field-name>name</field-name>
              <column-name>Name</column-name>

              </cmp-field>
              <cmp-field>
              <field-name>productID</field-name>
              <column-name>ProductID</column-name>

              </cmp-field>


              findAllProducts
              <![CDATA[productID IS NOT NULL]]>



              findByName
              <![CDATA[name = {0}]]>



              findByDescription
              <![CDATA[description = {0}]]>



              findByBasePrice
              <![CDATA[basePrice = {0}]]>



              findExpensiveProducts
              <![CDATA[basePrice >= {0}]]>



              findCheapProducts
              <![CDATA[basePrice <= {0}]]>



              <table-name>Product</table-name>
              <create-table>true</create-table>
              <remove-table>true</remove-table>
              <row-locking></row-locking>



              </enterprise-beans>