2 Replies Latest reply on Dec 28, 2001 12:06 PM by armint

    Problem running cmp

    ramkumar


      I had an application having entitybeans with following
      manner.

      public class PartEnt implements EntityBean

      public class ComponentEnt extends PartEnt

      Here the PartEnt bean is having all the cmp-fields and componentEnt is not having any cmp-fields.

      The home interface of PartEnt is having findAll method for which finder tag is declared in "jaws.xml" as shown below.


      <ejb-name>PartEnt</ejb-name>
      <table-name>PartEnt</table-name>

      <cmp-field>
      <field-name>id</field-name>
      <column-name>id</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>name</field-name>
      <column-name>name</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>description</field-name>
      <column-name>description</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>revision</field-name>
      <column-name>revision</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>planner</field-name>
      <column-name>planner</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>type</field-name>
      <column-name>type</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>purchased</field-name>
      <column-name>purchased</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>lomark</field-name>
      <column-name>lomark</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>himark</field-name>
      <column-name>himark</column-name>
      </cmp-field>


      findAll





      the declartion of componentEnt in jaws.xml is


      <ejb-name>ComponentEnt</ejb-name>
      <table-name>ComponentEnt</table-name>
      <create-table>false</create-table>


      I had a client application which calls the findAll method on home interface of ComponentEnt but the server throws FinderException.What might be the problem.I am working with JBoss 2.4.3

        • 1. Re: Problem running cmp
          armint

          Get rid of your findAll declaration in jaws.xml. If you have findAll() in the home interface of ComponentEnt, JAWS should implement it for you. This may be the problem. Also, even though you are inheriting the implementation of PartEnt, I don't think it will inherit the field to db mapping in jaws.xml. If JBoss can do this, it's probably not portable. So, you will probably have to map the fields for ComponentEnt in jaws.xml

          • 2. Re: Problem running cmp
            armint

            it's probably not portable
            Never mind this, I guess jaws.xml isn't portable anyways.