2 Replies Latest reply on Apr 27, 2002 2:25 PM by cssnmf

    Query problem

    ywhking

      Hi,everyone
      I defined a query method in jbosscmp-jdbc.xml,but can't deploy it.The Jboss server printed out following error messages:

      20:30:52,689 ERROR [EntityContainer] Exception in service lifecyle operation: create
      org.jboss.deployment.DeploymentException: Unknown query method : public abstract java.util.Collection com.css.src.sqm.organization.RoleHome.findByCompanyAndType(java.lang.String,java.lang.String) throws java.rmi.RemoteException,javax.ejb.FinderException
      .......

      I don't know if there are syntax problem in the query or something else.
      My platform is win2k + jboss3.0beta

      Any advice will be appriciate.
      ywhking


        • 1. Re: Query problem
          ywhking

          Hi,everyone
          I defined a query method in jbosscmp-jdbc.xml,but can't deploy it.The Jboss server printed out following error messages:

          20:30:52,689 ERROR [EntityContainer] Exception in service lifecyle operation: create
          org.jboss.deployment.DeploymentException: Unknown query method : public abstract java.util.Collection com.css.src.sqm.organization.RoleHome.findByCompanyAndType(java.lang.String,java.lang.String) throws java.rmi.RemoteException,javax.ejb.FinderException
          .......

          I don't know if there are syntax problem in the query or something else.My query method is as follows:


          <query-method>
          <method-name>findByCompanyAndType</method-name>
          <method-params>
          <method-param>java.lang.String</method-param>
          <method-param>java.lang.String</method-param>
          </method-params>
          </query-method>
          <declared-sql>

          companyId = {0} AND type = {1}

          </declared-sql>


          My platform is win2k + jboss3.0beta

          Any advice will be appriciate.
          ywhking



          • 2. Re: Query problem
            cssnmf

            I got similar problem when using <jboss-ql>, try to COPY the the section in your jbosscmp-jdbc.xml back to the ejb-jar.xml with the <ejb-ql> being empty, see if it works.