1 Reply Latest reply on Aug 16, 2006 12:06 PM by Marco

    generating EJBs with Xdoclet, deployed on jboss4.0.2/ EJB sp

    Marco Novice

      hi all,
      i have written few EJBs (2.0)and have generated releted classes using xdoclet..
      i have deployed them on jboss 4.0.2, and as a result i got this followign exception

      ..
      Bean : StatusRecipient
      Method : public abstract Collection findStatusRecipients(String, String) throws FinderException
      Section: 10.5.6
      Warning: Every finder method except findByPrimaryKey(key) must be associated with a query element in the deployment descriptor.
      
      2006-08-16 16:14:31,015 WARN [org.jboss.ejb.EJBDeployer.verifier] EJB spec violation:
      Bean : ReplenRequest
      Method : public abstract ReplenRequestLocal findByRecordKey(String) throws FinderException
      Section: 10.5.6
      Warning: Every finder method except findByPrimaryKey(key) must be associated with a query element in the deployment descriptor.
      
      2006-08-16 16:14:31,015 WARN [org.jboss.ejb.EJBDeployer.verifier] EJB spec violation:
      Bean : TransferRecord
      Method : public abstract Collection findTransferRecord(String, int, int, String) throws FinderException
      Section: 10.5.6
      Warning: Every finder method except findByPrimaryKey(key) must be associated with a query element in the deployment descriptor.
      
      .

      Thing is, i don't know why jboss is raising this excepiton since i can see the query correctly defined in ejb-jar.xml and in the generated LocalHome...

      here are my files...(i pick only one of EJBs, since it looks like it fails for every custom finder..)

      **** ExpectedReceipt ****
      /**
       * @ejb.bean
       * name="ExpectedReceipt"
       * type="CMP"
       * primkey-field="receiptID"
       * view-type="local"
       * local-jndi-name="marco/mw/ExpectedReceiptLocalHome"
       *
       * @ejb.persistence table-name="expectedreceipt"
       *
       * @ejb.finder
       * signature="com.marco.mw.ejb.ExpectedReceiptLocal findByRecordKey(String recordKey)"
       * query="select object(o) from ExpectedReceipt o where o.recordKey = ?1"
       *
       * @ejb.finder
       * signature="com.marco.mw.ejb.ExpectedReceiptLocal
       * findByTicket(String ticket)"
       * query="select object(o) from ExpectedReceipt o
       * where o.ticket = ?1"
       *
       */
      ..
      


      *** ejb-jar.xml ***
      <query>
       <query-method>
       <method-name>findByRecordKey</method-name>
       <method-params>
       <method-param>String</method-param>
       </method-params>
       </query-method>
       <ejb-ql><![CDATA[select object(o) from ExpectedReceipt o where o.recordKey = ?1]]></ejb-ql>
       </query>
       <query>
       <query-method>
       <method-name>findByTicket</method-name>
       <method-params>
       <method-param>String</method-param>
       </method-params>
       </query-method>
       <ejb-ql><![CDATA[select object(o) from ExpectedReceipt o where o.ticket = ?1]]></ejb-ql>
       </query>
       <!-- Write a file named ejb-finders-ExpectedReceiptBean.xml if you want to define extra finders. -->
      


      and here's the localHome of bean, generated by xdoclet
      ...
       public com.marco.mw.ejb.ExpectedReceiptLocal create(java.lang.String receiptID)
       throws javax.ejb.CreateException;
      
       public com.marco.mw.ejb.ExpectedReceiptLocal findByRecordKey(String recordKey)
       throws javax.ejb.FinderException;
      
       public com.marco.mw.ejb.ExpectedReceiptLocal findByTicket(String ticket)
       throws javax.ejb.FinderException;
      
       public com.marco.mw.ejb.ExpectedReceiptLocal findByPrimaryKey(java.lang.String pk)
       throws javax.ejb.FinderException;
      


      can anyone help me out?
      heres' the exception

      Bean : StatusRecipient
      Method : public abstract Collection findStatusRecipients(String, String) throws FinderException
      Section: 10.5.6
      Warning: Every finder method except findByPrimaryKey(key) must be associated with a query element in the deployment descriptor.
      
      2006-08-16 16:14:31,015 WARN [org.jboss.ejb.EJBDeployer.verifier] EJB spec violation:
      Bean : ReplenRequest
      Method : public abstract ReplenRequestLocal findByRecordKey(String) throws FinderException
      Section: 10.5.6
      Warning: Every finder method except findByPrimaryKey(key) must be associated with a query element in the deployment descriptor.
      
      2006-08-16 16:14:31,015 WARN [org.jboss.ejb.EJBDeployer.verifier] EJB spec violation:
      Bean : TransferRecord
      Method : public abstract Collection findTransferRecord(String, int, int, String) throws FinderException
      Section: 10.5.6
      Warning: Every finder method except findByPrimaryKey(key) must be associated with a query element in the deployment descriptor.
      
      2006-08-16 16:14:31,015 WARN [org.jboss.ejb.EJBDeployer.verifier] EJB spec violation:
      Bean : ReceiptConfirmation
      Method : public abstract ReceiptConfirmationLocal findByRecordKey(String) throws FinderException
      Section: 10.5.6
      Warning: Every finder method except findByPrimaryKey(key) must be associated with a query element in the deployment descriptor.
      
      2006-08-16 16:14:31,031 WARN [org.jboss.ejb.EJBDeployer.verifier] EJB spec violation:
      Bean : ExpectedReceipt
      Method : public abstract ExpectedReceiptLocal findByRecordKey(String) throws FinderException
      Section: 10.5.6
      Warning: Every finder method except findByPrimaryKey(key) must be associated with a query element in the deployment descriptor.
      
      2006-08-16 16:14:31,031 WARN [org.jboss.ejb.EJBDeployer.verifier] EJB spec violation:
      Bean : ExpectedReceipt
      Method : public abstract ExpectedReceiptLocal findByTicket(String) throws FinderException
      Section: 10.5.6
      Warning: Every finder method except findByPrimaryKey(key) must be associated with a query element in the deployment descriptor.
      
      2006-08-16 16:14:31,046 DEBUG [org.jboss.ejb.EJBDeployer.verifier] Bean checked: Configurator: Verified.
      2006-08-16 16:14:31,062 WARN [org.jboss.ejb.EJBDeployer.verifier] EJB spec violation:
      Bean : SiteTransmissionType
      Method : public abstract Collection findByWarehouseAndDlf(String, String) throws FinderException
      Section: 10.5.6
      Warning: Every finder method except findByPrimaryKey(key) must be associated with a query element in the deployment descriptor.
      


      it looksl ike every custom finder i created fails.....
      any clues?

      thanks in advance and regards
      marco