I am trying to add custom finder methods to a CMP entity bean using xdoclet.
When I deploy I get the following errors 

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

20:21:42,553 WARN  [verifier] EJB spec violation: 
Bean   : Player
Method : public abstract Collection findByPosition(String) throws FinderException, 
RemoteException
Section: 10.5.6
Warning: Every finder method except findByPrimaryKey(key) must be associated with a 
query element in the deployment descriptor.
FOLLOWED BY :

20:21:42,933 ERROR [MainDeployer] could not create deployment: 
file:/K:/jboss-3.2.5/server/default/deploy/FBDraftEJB.jar
org.jboss.deployment.DeploymentException: Verification of Enterprise Beans failed, see 
above for error messages.
        at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:517)

These lines appear in ejb-jar.xml within the Entity tag 

<!-- THIS IS OK -->
        
            <query-method>
               <method-name>findAll</method-name>
               <method-params>
               </method-params>
            </query-method>
            <ejb-ql><![CDATA[SELECT OBJECT(a) FROM Player as a]]></ejb-ql>
         
<!-- FAILS -->
         
            <query-method>
               <method-name>findByValues</method-name>
               <method-params>
                  <method-param>java.lang.String</method-param>
                  <method-param>java.lang.String</method-param>
                  <method-param>java.lang.String</method-param>
                  <method-param>java.lang.String</method-param>
               </method-params>
            </query-method>
            <ejb-ql><![CDATA[SELECT OBJECT(a) FROM Player as a WHERE a.firstName LIKE 
?1 and a.lastName LIKE ?2 and a.team.teamId LIKE ?3 and a.position.positionId LIKE 
?4]]></ejb-ql>
         
<!-- FAILS -->
         
            <query-method>
               <method-name>findByPosition</method-name>
               <method-params>
                  <method-param>java.lang.String</method-param>
               </method-params>
            </query-method>
            <ejb-ql><![CDATA[SELECT OBJECT(a) FROM Player as a WHERE 
a.position.positionId = ?1]]></ejb-ql>
         
As far as I can tell everything looks right and the query tags that the deployer is 
complaining about are there - 
Any bright ideas what is wrong

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3844750#3844750

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3844750


-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to