0 Replies Latest reply on May 20, 2006 4:46 AM by Nimrod Shaham

    Finder does not work

    Nimrod Shaham Newbie

      Hi,

      I am using Jboss 4.03, java 1.4.2_10.
      I tryied to build entity bean cmp 1.1 on informix db.

      I have defined findAsType method in Home interface.
      After deployment to app server I run a test client and
      I get this Exception:
      javax.ejb.FinderException:Unknown query: public abstract java.util.Collection com.celltick.ejb.entity.CCtEArgumentHome.findAsType(int) throws java.rmi.RemoteException,javax.ejb.FinderException


      1. This is my Jaws.xml

      <!DOCTYPE jaws PUBLIC
      "-//JBoss//DTD JAWS 2.4//EN"
      "http://www.jboss.org/j2ee/dtd/jaws_2_4.dtd">


      celltickDB
      <type-mapping>InformixDB</type-mapping>
      <enterprise-beans>

      <ejb-name>CCtEArgument</ejb-name>
      <cmp-field>
      <field-name>argumentname</field-name>
      <column-name>argumentname</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>displayname</field-name>
      <column-name>displayname</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>value</field-name>
      <column-name>value</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>defaultvalue</field-name>
      <column-name>defaultvalue</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>description</field-name>
      <column-name>description</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>argumenttypeid</field-name>
      <column-name>argumenttypeid</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>valuetype</field-name>
      <column-name>valuetype</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>edittype</field-name>
      <column-name>edittype</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>itemid</field-name>
      <column-name>itemid</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>validationrule</field-name>
      <column-name>validationrule</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>userid</field-name>
      <column-name>userid</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>lastupdate</field-name>
      <column-name>lastupdate</column-name>
      </cmp-field>

      findAll



      findAsType
      argumenttypeid = {0}


      </enterprise-beans>



      2. This is my jboss.xml

      <!DOCTYPE jboss PUBLIC
      "-//JBoss//DTD JBOSS//EN"
      "http://www.jboss.org/j2ee/dtd/jboss.dtd">


      <enterprise-beans>

      <ejb-name>CCtEArgument</ejb-name>
      <jndi-name>celltick/sadmin/argument/CCtEArgument</jndi-name>

      <resource-ref>
      <res-ref-name>jdbc/DataSource</res-ref-name>
      <resource-name>celltickDB</resource-name>
      </resource-ref>


      <ejb-name>CCtSArgument</ejb-name>
      <jndi-name>celltick/sadmin/argument/CCtSArgument</jndi-name>


      </enterprise-beans>



      3. This is my ejb-jar.xml


      <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN" "http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd">
      <ejb-jar>
      <enterprise-beans>

      <ejb-name>CCtSArgument</ejb-name>
      com.celltick.ejb.session.CCtSArgumentHome
      com.celltick.ejb.session.CCtSArgumentRemote
      <ejb-class>com.celltick.ejb.session.CCtSArgumentBean</ejb-class>
      <session-type>Stateless</session-type>
      <transaction-type>Container</transaction-type>


      <ejb-name>CCtEArgument</ejb-name>
      com.celltick.ejb.entity.CCtEArgumentHome
      com.celltick.ejb.entity.CCtEArgumentRemote
      <ejb-class>com.celltick.ejb.entity.CCtEArgumentBean</ejb-class>
      <persistence-type>Container</persistence-type>
      <prim-key-class>java.lang.String</prim-key-class>
      False
      <cmp-field>
      <field-name>argumentname</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>displayname</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>value</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>defaultvalue</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>description</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>argumenttypeid</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>valuetype</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>edittype</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>itemid</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>validationrule</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>userid</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>lastupdate</field-name>
      </cmp-field>
      <primkey-field>argumentname</primkey-field>
      <resource-ref>

      <res-ref-name>jdbc/DataSource</res-ref-name>
      <res-type>javax.sql.DataSource</res-type>
      <res-auth>Container</res-auth>
      </resource-ref>

      </enterprise-beans>
      <assembly-descriptor>
      <container-transaction>

      <ejb-name>CCtEArgument</ejb-name>
      <method-name>*</method-name>

      <trans-attribute>Required</trans-attribute>
      </container-transaction>
      </assembly-descriptor>
      </ejb-jar>



      Can anyone help ? what is wrong here ?

      Thanks.
      Nim