0 Replies Latest reply on Sep 17, 2003 8:07 PM by Dave Wms

    Custom Finder Delpoyment

    Dave Wms Newbie

      Hello All,

      I'am new to JBOSS and CMP. I am having trouble deploying an entity bean that has a custom finder method using JBOSS 3.2.1

      The exception is:
      2003-09-17 22:01:23,140 WARN [org.jboss.system.ServiceController] Problem starting service jboss.j2ee:jndiName=ShipRemote,service=EJB
      org.jboss.deployment.DeploymentException: Query method not found: findByShipname
      at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCQueryMetaDataFactory.getQueryMethods(JDBCQueryMetaDataFactory.java:274)
      at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCQueryMetaDataFactory.getQueryMethods(JDBCQueryMetaDataFactory.java:232)
      at org.jboss.ejb.plugins.cmp.jdbc.metad

      My ejb-jar.xml:

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
      <ejb-jar>
      <enterprise-beans>

      <display-name>Ship</display-name>
      <ejb-name>Ship</ejb-name>
      testing.ShipRemoteHome
      testing.ShipRemote
      <ejb-class>testing.ShipBean</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>Ship</abstract-schema-name>
      <cmp-field>
      <field-name>shipid</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>shipname</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>cabin</field-name>
      </cmp-field>
      <primkey-field>shipid</primkey-field>

      <query-method>
      <method-name>findByShipname</method-name>
      <method-params>
      <method-param>java.lang.String</method-param>
      </method-params>
      </query-method>
      <ejb-ql>SELECT OBJECT(c) FROM Ship AS c WHERE c.shipname = 'test'</ejb-ql>


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

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

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

      Any help would be great, as I am truly stuck !