6 Replies Latest reply on Dec 31, 2003 5:25 PM by ianlinsdell

    Error compiling EJB-QL statment .....  NoSuchMethodError

    ianlinsdell Newbie

      I'm trying to use JBoss 3.2.2 with an EJB-QL finder or select.

      I'm using it configured as downloaded with Hypersonic and have
      tried the Workbook examples and also some others without sucsess.:o(

      Any ideas greatly apreciated as I'm pulling my hair out at the mo,
      even a small example download would help.
      ( the workbook ones ch 8 give me the same error )

      Everything works fine, with regualr CMP beans except with the EJBQL
      methods.

      When I deploy my app I get the following error:

      ----8<------8<-------8<---------8<----------8<---------
      10:27:56,177 ERROR [EntityContainer] Starting failed
      org.jboss.deployment.DeploymentException: Error compiling EJB-QL statement 'SELE
      CT OBJECT(o) FROM UserBean AS o'; - nested throwable: (java.lang.NoSuchMethodErr
      or)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.(JDBCEJBQLQuery.j
      ava:45)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCCommandFactory.createEJBQLQuery(JD
      BCCommandFactory.java:53)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCQueryManager.start(JDBCQueryManage
      r.java:212)

      -------------------------------------------------------------------------------

      My ejb-jar.xml looks like this:
      --------------------------------------------------------------------------------

      <?xml version="1.0" encoding="UTF-8"?>

      <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>

      <ejb-jar>
      <display-name>User</display-name>
      <enterprise-beans>


      <display-name>UserBean</display-name>
      <ejb-name>UserBean</ejb-name>

      <local-home>com.mycmpejb.bean.UserHomeLocal</local-home>
      com.mycmpejb.bean.UserLocal
      <ejb-class>com.mycmpejb.bean.UserBean</ejb-class>

      <persistence-type>Container</persistence-type>

      <prim-key-class>java.lang.String</prim-key-class>

      True
      <cmp-version>2.x</cmp-version>

      <abstract-schema-name>UserBean</abstract-schema-name>

      <cmp-field>
      no description
      <field-name>email</field-name>
      </cmp-field>
      <cmp-field>
      no description
      <field-name>password</field-name>
      </cmp-field>
      <primkey-field>email</primkey-field>

      <security-identity>

      <use-caller-identity></use-caller-identity>
      </security-identity>



      <query-method>
      <method-name>findAll</method-name>
      <method-params />
      </query-method>
      <ejb-ql><![CDATA[SELECT OBJECT(o) FROM UserBean AS o]]></ejb-ql>





      <ejb-name>TestSesEJB</ejb-name>
      com.mycmpejb.test.TestSesHomeRemote
      com.mycmpejb.test.TestSesRemote
      <ejb-class>com.mycmpejb.test.TestSesBean</ejb-class>
      <session-type>Stateless</session-type>
      <transaction-type>Container</transaction-type>
      <ejb-local-ref>
      <ejb-ref-name>UserHomeLocal</ejb-ref-name>
      <ejb-ref-type>Entity</ejb-ref-type>
      <local-home>com.mycmpejb.bean.UserHomeLocal</local-home>
      com.mycmpejb.bean.UserHomeLocal
      <!-- ejb-link is required by jboss for local-refs. -->
      <ejb-link>UserBean</ejb-link>
      </ejb-local-ref>



      </enterprise-beans>

      <assembly-descriptor>

      <method-permission>


      <ejb-name>UserBean</ejb-name>
      <method-name>*</method-name>

      </method-permission>

      </assembly-descriptor>
      </ejb-jar>


        • 1. Re: Error compiling EJB-QL statment .....  NoSuchMethodError
          Mikkel Heisterberg Newbie

          Have you created the finder method in your home interface(s) ?

          public java.util.Collection findAll() throws javax.ejb.FinderException, java.rmi.RemoteException;

          • 2. Re: Error compiling EJB-QL statment .....  NoSuchMethodError
            ianlinsdell Newbie

            Thanks for the reply, Still not managed to get this to work yet.

            I Installed MySQL and configured it with JBoss today to rule out a Hypersonic database problem and in install went fine, tested everything afterwards with MySQL....

            BMP Bean, CMP Bean with Relationships but no EJBQL, JMS
            Topic and Queue.

            All worked fine except when I tried to use an EJBQL finder again when I got the same error as with Hypersonic.

            My beans Local home interface has the finder method as follows:

            ----------------------------------------------------------------------------
            package com.mycmpejb.bean;

            import javax.ejb.EJBLocalHome;
            import javax.ejb.CreateException;
            import javax.ejb.FinderException;

            import java.util.Collection;

            public interface UserHomeLocal extends EJBLocalHome {

            public UserLocal create (String email, String password) throws CreateException;

            public UserLocal findByPrimaryKey (String email) throws FinderException;

            public Collection findAll() throws FinderException;

            }

            ---------------------------------------------------------------------------

            Thanks for the reply, still no joy yet, I'm running out of ideas on
            what I can try ?

            • 3. Re: Error compiling EJB-QL statment .....  NoSuchMethodError
              ianlinsdell Newbie

              I added a remote interface to my entity bean as well as a local one incase this was the problem but still throws the error.

              I managed to copy the whole stack trace for the error..

              seems to mention something about org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.
              not sure if this has anything to do with the error.
              this looks like its an internal JBoss error ?



              ------------------------------------------------------------------------------------
              05:50:57,381 ERROR [EntityContainer] Starting failed
              org.jboss.deployment.DeploymentException: Error compiling EJB-QL statement 'SELECT OBJECT(o) FROM UserBean AS o'; - nested throwable: (java.lang.NoSuchMethodError)
              at org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.(JDBCEJBQLQuery.java:45)
              at org.jboss.ejb.plugins.cmp.jdbc.JDBCCommandFactory.createEJBQLQuery(JD
              BCCommandFactory.java:53)
              at org.jboss.ejb.plugins.cmp.jdbc.JDBCQueryManager.start(JDBCQueryManage
              r.java:212)
              at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.startStoreManager(JDB
              CStoreManager.java:451)
              at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManage
              r.java:351)
              at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManag
              er.java:152)
              at org.jboss.ejb.EntityContainer.startService(EntityContainer.java:343)
              at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:1
              92)
              at java.lang.reflect.Method.invoke(Native Method)
              at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
              nDispatcher.java:284)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
              at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
              ler.java:976)
              at $Proxy15.start(Unknown Source)
              at org.jboss.system.ServiceController.start(ServiceController.java:394)
              at java.lang.reflect.Method.invoke(Native Method)
              at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
              nDispatcher.java:284)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
              at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
              at $Proxy49.start(Unknown Source)
              at org.jboss.ejb.EjbModule.startService(EjbModule.java:331)
              at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:1
              92)
              at java.lang.reflect.Method.invoke(Native Method)
              at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
              nDispatcher.java:284)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
              at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
              ler.java:976)
              at $Proxy15.start(Unknown Source)
              at org.jboss.system.ServiceController.start(ServiceController.java:394)
              at java.lang.reflect.Method.invoke(Native Method)
              at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
              nDispatcher.java:284)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
              at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
              at $Proxy12.start(Unknown Source)
              at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:544)
              at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
              at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:642)
              at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
              at java.lang.reflect.Method.invoke(Native Method)
              at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
              nDispatcher.java:284)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
              at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
              at $Proxy6.deploy(Unknown Source)
              at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen
              tScanner.java:302)
              at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
              canner.java:476)
              at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
              doScan(AbstractDeploymentScanner.java:201)
              at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
              loop(AbstractDeploymentScanner.java:212)
              at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
              run(AbstractDeploymentScanner.java:191)
              + nested throwable:
              java.lang.NoSuchMethodError
              at org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLCompiler.visit(JDBCEJBQLCompi
              ler.java:517)
              at org.jboss.ejb.plugins.cmp.ejbql.ASTEJBQL.jjtAccept(ASTEJBQL.java:23)
              at org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLCompiler.compileEJBQL(JDBCEJB
              QLCompiler.java:142)
              at org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.(JDBCEJBQLQuery.j
              ava:39)
              at org.jboss.ejb.plugins.cmp.jdbc.JDBCCommandFactory.createEJBQLQuery(JD
              BCCommandFactory.java:53)
              at org.jboss.ejb.plugins.cmp.jdbc.JDBCQueryManager.start(JDBCQueryManage
              r.java:212)
              at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.startStoreManager(JDB
              CStoreManager.java:451)
              at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManage
              r.java:351)
              at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManag
              er.java:152)
              at org.jboss.ejb.EntityContainer.startService(EntityContainer.java:343)
              at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:1
              92)
              at java.lang.reflect.Method.invoke(Native Method)
              at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
              nDispatcher.java:284)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
              at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
              ler.java:976)
              at $Proxy15.start(Unknown Source)
              at org.jboss.system.ServiceController.start(ServiceController.java:394)
              at java.lang.reflect.Method.invoke(Native Method)
              at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
              nDispatcher.java:284)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
              at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
              at $Proxy49.start(Unknown Source)
              at org.jboss.ejb.EjbModule.startService(EjbModule.java:331)
              at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:1
              92)
              at java.lang.reflect.Method.invoke(Native Method)
              at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
              nDispatcher.java:284)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
              at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
              ler.java:976)
              at $Proxy15.start(Unknown Source)
              at org.jboss.system.ServiceController.start(ServiceController.java:394)
              at java.lang.reflect.Method.invoke(Native Method)
              at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
              nDispatcher.java:284)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
              at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
              at $Proxy12.start(Unknown Source)
              at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:544)
              at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
              at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:642)
              at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
              at java.lang.reflect.Method.invoke(Native Method)
              at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
              nDispatcher.java:284)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
              at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
              at $Proxy6.deploy(Unknown Source)
              at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen
              tScanner.java:302)
              at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
              canner.java:476)
              at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
              doScan(AbstractDeploymentScanner.java:201)
              at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
              loop(AbstractDeploymentScanner.java:212)
              at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
              run(AbstractDeploymentScanner.java:191)
              05:50:58,032 WARN [ServiceController] Problem starting service jboss.j2ee:jndiN
              ame=UserEJB,service=EJB
              org.jboss.deployment.DeploymentException: Error compiling EJB-QL statement 'SELE
              CT OBJECT(o) FROM UserBean AS o'; - nested throwable: (java.lang.NoSuchMethodErr
              or)
              at org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.(JDBCEJBQLQuery.j
              ava:45)
              at org.jboss.ejb.plugins.cmp.jdbc.JDBCCommandFactory.createEJBQLQuery(JD
              BCCommandFactory.java:53)
              at org.jboss.ejb.plugins.cmp.jdbc.JDBCQueryManager.start(JDBCQueryManage
              r.java:212)
              at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.startStoreManager(JDB
              CStoreManager.java:451)
              at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManage
              r.java:351)
              at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManag
              er.java:152)
              at org.jboss.ejb.EntityContainer.startService(EntityContainer.java:343)
              at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:1
              92)
              at java.lang.reflect.Method.invoke(Native Method)
              at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
              nDispatcher.java:284)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
              at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
              ler.java:976)
              at $Proxy15.start(Unknown Source)
              at org.jboss.system.ServiceController.start(ServiceController.java:394)
              at java.lang.reflect.Method.invoke(Native Method)
              at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
              nDispatcher.java:284)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
              at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
              at $Proxy49.start(Unknown Source)
              at org.jboss.ejb.EjbModule.startService(EjbModule.java:331)
              at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:1
              92)
              at java.lang.reflect.Method.invoke(Native Method)
              at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
              nDispatcher.java:284)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
              at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
              ler.java:976)
              at $Proxy15.start(Unknown Source)
              at org.jboss.system.ServiceController.start(ServiceController.java:394)
              at java.lang.reflect.Method.invoke(Native Method)
              at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
              nDispatcher.java:284)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
              at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
              at $Proxy12.start(Unknown Source)
              at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:544)
              at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
              at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:642)
              at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
              at java.lang.reflect.Method.invoke(Native Method)
              at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
              nDispatcher.java:284)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
              at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
              at $Proxy6.deploy(Unknown Source)
              at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen
              tScanner.java:302)
              at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
              canner.java:476)
              at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
              doScan(AbstractDeploymentScanner.java:201)
              at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
              loop(AbstractDeploymentScanner.java:212)
              at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
              run(AbstractDeploymentScanner.java:191)
              + nested throwable:
              java.lang.NoSuchMethodError
              at org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLCompiler.visit(JDBCEJBQLCompi
              ler.java:517)
              at org.jboss.ejb.plugins.cmp.ejbql.ASTEJBQL.jjtAccept(ASTEJBQL.java:23)
              at org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLCompiler.compileEJBQL(JDBCEJB
              QLCompiler.java:142)
              at org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.(JDBCEJBQLQuery.j
              ava:39)
              at org.jboss.ejb.plugins.cmp.jdbc.JDBCCommandFactory.createEJBQLQuery(JD
              BCCommandFactory.java:53)
              at org.jboss.ejb.plugins.cmp.jdbc.JDBCQueryManager.start(JDBCQueryManage
              r.java:212)
              at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.startStoreManager(JDB
              CStoreManager.java:451)
              at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManage
              r.java:351)
              at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManag
              er.java:152)
              at org.jboss.ejb.EntityContainer.startService(EntityContainer.java:343)
              at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:1
              92)
              at java.lang.reflect.Method.invoke(Native Method)
              at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
              nDispatcher.java:284)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
              at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
              ler.java:976)
              at $Proxy15.start(Unknown Source)
              at org.jboss.system.ServiceController.start(ServiceController.java:394)
              at java.lang.reflect.Method.invoke(Native Method)
              at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
              nDispatcher.java:284)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
              at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
              at $Proxy49.start(Unknown Source)
              at org.jboss.ejb.EjbModule.startService(EjbModule.java:331)
              at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:1
              92)
              at java.lang.reflect.Method.invoke(Native Method)
              at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
              nDispatcher.java:284)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
              at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
              ler.java:976)
              at $Proxy15.start(Unknown Source)
              at org.jboss.system.ServiceController.start(ServiceController.java:394)
              at java.lang.reflect.Method.invoke(Native Method)
              at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
              nDispatcher.java:284)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
              at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
              at $Proxy12.start(Unknown Source)
              at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:544)
              at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
              at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:642)
              at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
              at java.lang.reflect.Method.invoke(Native Method)
              at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
              nDispatcher.java:284)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
              at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
              at $Proxy6.deploy(Unknown Source)
              at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen
              tScanner.java:302)
              at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
              canner.java:476)
              at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
              doScan(AbstractDeploymentScanner.java:201)
              at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
              loop(AbstractDeploymentScanner.java:212)
              at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
              run(AbstractDeploymentScanner.java:191)
              05:50:58,723 INFO [StatelessSessionInstancePool] Started jboss.j2ee:jndiName=Te
              stSesHomeRemote,plugin=pool,service=EJB
              05:50:58,723 INFO [StatelessSessionContainer] Started jboss.j2ee:jndiName=TestS
              esHomeRemote,service=EJB
              05:50:58,733 INFO [EjbModule] Started jboss.j2ee:module=mycmpejb.jar,service=Ej
              bModule
              05:50:58,743 INFO [EJBDeployer] Deployed: file:/H:/JBossJ2ee/jboss-3.2.2/server
              /default/deploy/mycmpejb.jar
              05:50:58,783 INFO [MainDeployer] Deployed package: file:/H:/JBossJ2ee/jboss-3.2
              .2/server/default/deploy/mycmpejb.jar
              05:50:58,793 ERROR [URLDeploymentScanner] MBeanException: Exception in MBean ope
              ration 'checkIncompleteDeployments()'
              Cause: Incomplete Deployment listing:
              Packages waiting for a deployer:

              Incompletely deployed packages:

              MBeans waiting for classes:

              MBeans waiting for other MBeans:
              [ObjectName: jboss.j2ee:jndiName=UserEJB,service=EJB
              state: FAILED
              I Depend On:
              Depends On Me: org.jboss.deployment.DeploymentException: Error compiling EJB-QL
              statement 'SELECT OBJECT(o) FROM UserBean AS o'; - nested throwable: (java.lang
              .NoSuchMethodError)]

              • 4. Re: Error compiling EJB-QL statment .....  NoSuchMethodError
                Pablo Pedemonte Newbie

                I 'm having exactly the same error! The top level stack trace is the same, but the nested one is slightly different, because I'm trying with another EJQ query:

                + nested throwable:
                java.lang.NoSuchMethodError
                at org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLCompiler.visit(JDBCEJBQLCompiler.java:932)
                at org.jboss.ejb.plugins.cmp.ejbql.ASTSelect.jjtAccept(ASTSelect.java:25)
                at org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLCompiler.visit(JDBCEJBQLCompiler.java:487)
                at org.jboss.ejb.plugins.cmp.ejbql.ASTEJBQL.jjtAccept(ASTEJBQL.java:23)
                at org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLCompiler.compileEJBQL(JDBCEJBQLCompiler.java:148)
                at org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.(JDBCEJBQLQuery.java:42)
                at org.jboss.ejb.plugins.cmp.jdbc.JDBCCommandFactory.createEJBQLQuery(JDBCCommandFactory.java:59)
                at org.jboss.ejb.plugins.cmp.jdbc.JDBCQueryManager.start(JDBCQueryManager.java:212)
                at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.startStoreManager(JDBCStoreManager.java:490)
                at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.java:388)
                at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManager.java:152)
                at org.jboss.ejb.EntityContainer.startService(EntityContainer.java:342)
                (...)

                Looking at the JDBCEJBQLCompiler source, at line 932 we find the following:

                932:
                try
                {
                leftJoinCMRList = JDBCAbstractQueryCommand.getLeftJoinCMRNodes(
                selectEntity, path.getPath(), readAhead.getLeftJoins());
                }
                catch(DeploymentException e)
                {
                throw new IllegalStateException(e.getMessage());
                }

                Since the throwable NoSuchMethodError typically signals an incompatible class change, I did the following:

                - Decompiled JDBCAbstractQueryCommand as found in jboss.jar
                - Compared it against the ``official'' source for that class

                The differences between both classes are quite notorious, particularly, I couldn't find the getLeftJoinCMRNodes method in the decompiled source (but it is there in the downloaded sources)

                Did anyone else found the same problem? Am I right assuming that there is some distribution error? My JBoss version is 3.2.3.

                Thanks in advance for any comment/advice.
                Regards,
                Pablo

                • 5. Re: Error compiling EJB-QL statment .....  NoSuchMethodError
                  ianlinsdell Newbie

                  Intersting results,

                  I started to debug the JBoss source too and got as far as the following:

                  In JDBCEJBQLQuery.java
                  ~~~~~~~~~~~~~~~~

                  compiler.compileEJBQL(
                  metadata.getEjbQl(), = SELECT OBJECT(o) FROM UserBean AS o
                  metadata.getMethod().getReturnType(), = interface java.util.Collection
                  metadata.getMethod().getParameterTypes(), = []
                  metadata.getReadAhead()); = [JDBCReadAheadMetaData : strategy=on-load, pageSize=1000, eagerLoadGroup=*]


                  In JDBCEJBQLCompiler.java
                  ~~~~~~~~~~~~~~~~~~

                  I exxamined the catalog variable which has correct table information.

                  The exception is being thrown at the line

                  // translate to sql
                  sql = ejbqlNode.jjtAccept(this, new StringBuffer()).toString();


                  I am wondering if anyone has got this to work as I have talked to some other who all tell me they have the same problem.

                  I tried downloading and using JBoss3.2.3 and the same error occurs.

                  I don't know why but the same SQL seems to work if you go back to CMP1.x and use a tag in the jaws.xml ?

                  anyone have an example of a working EJBQL in the ejb-jar.xml ?

                  • 6. Re: Error compiling EJB-QL statment .....  NoSuchMethodError
                    ianlinsdell Newbie

                    Hopefully this information will prevent other people
                    from wasting 2 days trying to find the problem like I have.

                    I have noticed several others using this forum with the same
                    problem, I am a little suprised that no one has posted the
                    solution yet ?

                    Journal
                    ~~~~~~~
                    I installing JBoss3.2.2 but everytime I tried to deploy a CMP2.0
                    entity bean I got a MethodNotFoundError.

                    I then tried installing JBoss3.2.3. ( still the same )

                    I then tried configuring JBoss to use MySQL instead of the supplied
                    Hypersonic SQL database. ( still the same )

                    I downloaded the JBoss source and debuged the deployment, the problem
                    was comming from the EJBQL token parser.

                    I compiled the testsuite, in particular the cmp2-simple.jar as a good
                    CMP2.0 sample. ( still the same )

                    I deduced from this that there was not a problem with my code,
                    which in fact is what turned out to be the case !

                    bearing this in mind I tried different environments, the very last
                    thing I tried.....

                    The Jboss download page says: 'JBoss 3.2 and earlier will run on 1.3+ JVMs. JBoss 4.0 requires 1.4+ JVMs'

                    wholy smoke I should know better than to believe what I read and also
                    you would have thought I have lernt the lesson by now that Java is:

                    Write many times, run onece and not Write onece, run many times.

                    I can confirm that JBoss3.x will not run correctly on JVM1.3.1_02

                    Changing to JVM1.4 fixed my problem and no more NoSuchMethodError.

                    Hope this helps others.