4 Replies Latest reply on Aug 4, 2003 4:42 AM by trahayu

    Query method not found

    kitz

      Hi all,

      I'm getting a non-informative error message when I deploy an EJB that has worked in the past for me.

      Here's the message:

      01:04:11,394 WARN [ServiceController] Problem starting service jboss.j2ee:service=EJB,jndiName=dnrscremote/SyncItem
      org.jboss.deployment.DeploymentException: Query method not found:

      It seems to say that a query method was not found, but it doesn't say which.

      Is this a known problem?

      Thanks,

      Jacob

      Btw, this happens on JBoss 3.0.2 and 3.2.0

        • 1. Re: Query method not found

          It is actually trying to tell you that one of
          your queries doesn't have a method name.

          Regards,
          Adrian

          • 2. Re: Query method not found
            kitz

            Adrian,

            Thanks, that's what I thought at first too... but all of the tags in my ejb-jar.xml and jbosscmp-jdbc.xml have <method-name> elements within their <query-method> elements.

            For instance,


            <query-method>
            <method-name>findSamplesFromCenter_id</method-name>
            <method-params><method-param>java.lang.Integer</method-param></method-params>
            </query-method>

            <ejb-ql>
            <![CDATA[
            SELECT OBJECT (g)
            FROM sample AS g
            WHERE g.samplingCenter=?1
            ]]>
            </ejb-ql>


            Any more ideas? Maybe I misunderstood what you meant...

            Thanks!

            Jacob

            • 3. Re: Query method not found
              kitz

              ... and I'm an idiot :)
              Was looking at an older version of the file in my editor somehow. Thanks for the help!

              Jacob

              • 4. Re: Query method not found
                trahayu

                I'm trying to use dynamicQL for my ejbselect method. you know, we don't need to declare it in the jbosscmp-jdbc.xml but we build it in our method.
                But when i deployed, it always says 'Query Method Not Found'? can someone help me? my query tag in jbosscmp-jdbc.xml is like this :


                <query-method>
                <method-name>ejbSelectGeneric</method-name>
                <method-params>
                <method-param>java.lang.String</method-param>
                <method-param>java.lang.Object[]</method-param>
                </method-params>
                </query-method>
                <dynamic-ql/>



                i'm using jboss3.2.1