3 Replies Latest reply on Aug 3, 2004 8:17 AM by Hideki Mae

    JBossQL and DynamicQL

    Hideki Mae Newbie

      To all,
      I was trying to implement a generic finder method that I found in :
      The goal was to pass select statements that you define yourself. (My code is at the bottom.)

      When I deploy it, I get the error:
      11:04:49,055 WARN [verifier] EJB spec violation:
      Bean : DWMUsrAdmin
      Method : public abstract Collection findGeneric(String, Object;) 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.

      Since @jboss.query is set to dynamic I thought that the query will be overridden and having an empty query will not cause a problem. I checked the ejb-jar.xml and the only thing that might be a problem was: <ejb-ql><![CDATA[]]></ejb-ql>
      Is there something I am doing wrong?

      I am using JBoss 3.2.4.

      Thanks in advance for any help you can give me.

      I have the following in my Bean:
      /* @ejb.select
      * signature="java.util.Collection ejbSelectGeneric(java.lang.String query, java.lang.Object[] params)"
      * result-type-mapping="Local"
      * method-intf="LocalHome"
      * query=""
      * @jboss.query
      * dynamic="true"
      * signature="java.util.Collection ejbSelectGeneric(java.lang.String query, java.lang.Object[] params)"

      * @jboss.dynamic-ql
      public abstract java.util.Collection ejbSelectGeneric ( java.lang.String jbossQl, java.lang.Object[] arguments ) throws FinderException;

      * @ejb.home-method
      * view-type="local"
      public java.util.Collection ejbHomeFindGeneric(java.lang.String jbossQl, java.lang.Object[] parameters) throws FinderException{
      return ejbSelectGeneric(jbossQl, parameters);