1 Reply Latest reply on Apr 3, 2003 2:26 PM by juhalindfors

    DeploymentException: Query method not found: findAll

    robin_kat

      Hi,
      i was trying to deploy my application having a number EJB2.0 entity beans onto jboss 3.0. Initially the the Bean implementations were generated with 'ant middlegen'. After this, i selected to generate only the Remote Home interfaces for the entity beans by mentioning "viewtype="remote"" in the build.xml of middlegen. 'ant ejbdoclet' completed the process by generating the remote and the remote home interfaces (no local home). But, i found that the CMR fields, when mentioned in the create or ejbCreate methods, are being passed as the Local interfaces of related classes. I changed them to their real java types and prepared the jar to be deployed. But the jar, when deployed gave the following exception :-

      file:/D:/jboss-3.0.0_tomcat-4.0.3/server/default/deploy/Test.jar; - nested throwable: (org.jboss.deployment.DeploymentException: Query method not found: findAll)
      at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:384) at org.jboss.deployment.MainDeployer.create(MainDeployer.java:637) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:512)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:481) at java.lang.reflect.Method.invoke(Native Method) at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java
      :284) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491) at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy4.deploy(Unknown Source) at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:405)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scanDirectory(URLDeploymentScanner.java:586) at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:465)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:202) at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDepl
      oymentScanner.java:191)

      Corresponding ej-jar snippet -
      query>
      <query-method>
      <method-name>findAll</method-name>
      <method-params>
      </method-params>
      </query-method>
      <ejb-ql><![CDATA[SELECT OBJECT(o) FROM ABCDtable AS o]]></ejb-ql>


      jb

      Find all entities
      <query-method>
      <method-name>findAll</method-name>
      <method-params>

      </method-params>
      </query-method>
      <declared-sql>


      </declared-sql>

      osscmp-jdbc.xml snippet -


      Plz. help
      TIA
      robin

        • 1. Re: DeploymentException: Query method not found: findAll

          something wrong with your tags -- there shouldnt be any declared sql in jbosscmp-jdbc.xml, the EJB QL in ejb-jar.xml is enough. Also check your home interface that it actually declares findAll method.

          make sure you understand what the generated code should look like and what the XML files should contain before you start using code generation tools -- they're not very user friendly and too easy to mess up