2 Replies Latest reply on Oct 10, 2002 4:39 AM by Paul Nardone

    Help!  Error compiling ejbql

    Paul Nardone Newbie

      Hi,

      I get this error when deploying an EntityBean in version 3.0.3/Tomcat.

      org.jboss.deployment.DeploymentException: Error compiling ejbql; - nested throwable: (org.jboss.ejb.plugins.cmp.ejbql.Pa
      rseException: Encountered "1" at line 1, column 71.
      Was expecting one of:
      "ABS" ...
      "LENGTH" ...
      "LOCATE" ...
      "SQRT" ...
      "(" ...
      "+" ...
      "-" ...
      <INTEGER_LITERAL> ...
      <FLOATING_POINT_LITERAL> ...
      <NUMERIC_VALUED_PARAMETER> ...
      <NUMERIC_VALUED_PATH> ...
      )
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.(JDBCEJBQLQuery.java:46)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCCommandFactory.createEJBQLQuery(JDBCCommandFactory.java:44)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCQueryManager.start(JDBCQueryManager.java:218)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.startStoreManager(JDBCStoreManager.java:463)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.java:369)
      at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManager.java:198)
      at org.jboss.ejb.EntityContainer.start(EntityContainer.java:376)
      at org.jboss.ejb.Container.invoke(Container.java:756)
      at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:1058)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:976)
      at $Proxy5.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:397)
      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:517)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy347.start(Unknown Source)
      at org.jboss.ejb.EjbModule.startService(EjbModule.java:430)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:164)
      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:517)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:976)
      at $Proxy5.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:397)
      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:517)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy9.start(Unknown Source)
      at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:394)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:802)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:616)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:580)
      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:517)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy4.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:427)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:553)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:21
      2)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:225)

      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:202)
      + nested throwable:
      org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered "1" at line 1, column 71.
      Was expecting one of:
      "ABS" ...
      "LENGTH" ...
      "LOCATE" ...
      "SQRT" ...
      "(" ...
      "+" ...
      "-" ...
      <INTEGER_LITERAL> ...
      <FLOATING_POINT_LITERAL> ...
      <NUMERIC_VALUED_PARAMETER> ...
      <NUMERIC_VALUED_PATH> ...

      at org.jboss.ejb.plugins.cmp.ejbql.EJBQLParser.generateParseException(EJBQLParser.java:3745)
      at org.jboss.ejb.plugins.cmp.ejbql.EJBQLParser.jj_consume_token(EJBQLParser.java:3626)
      at org.jboss.ejb.plugins.cmp.ejbql.EJBQLParser.ArithmeticPrimary(EJBQLParser.java:1379)
      at org.jboss.ejb.plugins.cmp.ejbql.EJBQLParser.ArithmeticFactor(EJBQLParser.java:1309)
      at org.jboss.ejb.plugins.cmp.ejbql.EJBQLParser.ArithmeticTerm(EJBQLParser.java:1233)
      at org.jboss.ejb.plugins.cmp.ejbql.EJBQLParser.ArithmeticExpression(EJBQLParser.java:1179)
      at org.jboss.ejb.plugins.cmp.ejbql.EJBQLParser.ScalarExpression(EJBQLParser.java:1171)
      at org.jboss.ejb.plugins.cmp.ejbql.EJBQLParser.SingleValueDesignator(EJBQLParser.java:1167)
      at org.jboss.ejb.plugins.cmp.ejbql.EJBQLParser.ComparisonExpression(EJBQLParser.java:1104)
      at org.jboss.ejb.plugins.cmp.ejbql.EJBQLParser.SimpleCondExpression(EJBQLParser.java:588)
      at org.jboss.ejb.plugins.cmp.ejbql.EJBQLParser.ConditionalPrimary(EJBQLParser.java:546)
      at org.jboss.ejb.plugins.cmp.ejbql.EJBQLParser.ConditionalTest(EJBQLParser.java:514)
      at org.jboss.ejb.plugins.cmp.ejbql.EJBQLParser.ConditionalFactor(EJBQLParser.java:491)
      at org.jboss.ejb.plugins.cmp.ejbql.EJBQLParser.ConditionalTerm(EJBQLParser.java:441)
      at org.jboss.ejb.plugins.cmp.ejbql.EJBQLParser.ConditionalExpression(EJBQLParser.java:401)
      at org.jboss.ejb.plugins.cmp.ejbql.EJBQLParser.WhereClause(EJBQLParser.java:370)
      at org.jboss.ejb.plugins.cmp.ejbql.EJBQLParser.EJBQL(EJBQLParser.java:102)
      at org.jboss.ejb.plugins.cmp.ejbql.EJBQLParser.parse(EJBQLParser.java:60)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLCompiler.compileEJBQL(JDBCEJBQLCompiler.java:144)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.(JDBCEJBQLQuery.java:40)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCCommandFactory.createEJBQLQuery(JDBCCommandFactory.java:44)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCQueryManager.start(JDBCQueryManager.java:218)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.startStoreManager(JDBCStoreManager.java:463)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.java:369)
      at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManager.java:198)
      at org.jboss.ejb.EntityContainer.start(EntityContainer.java:376)
      at org.jboss.ejb.Container.invoke(Container.java:756)
      at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:1058)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:976)
      at $Proxy5.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:397)
      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:517)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy347.start(Unknown Source)
      at org.jboss.ejb.EjbModule.startService(EjbModule.java:430)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:164)
      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:517)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:976)
      at $Proxy5.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:397)
      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:517)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy9.start(Unknown Source)
      at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:394)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:802)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:616)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:580)
      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:517)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy4.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:427)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:553)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:21
      2)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:225)

      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:202)


      The wierd thing is there is no finder declared for this bean, heres the ejb-jar



      <![CDATA[DataFieldEJB]]>

      <ejb-name>DataField</ejb-name>

      uk.co.cosmic_solutions.datamatch.DataFieldHome
      uk.co.cosmic_solutions.datamatch.DataField
      <local-home>uk.co.cosmic_solutions.datamatch.DataFieldLocalHome</local-home>
      uk.co.cosmic_solutions.datamatch.DataFieldLocal

      <ejb-class>uk.co.cosmic_solutions.datamatch.DataFieldEJB</ejb-class>
      <persistence-type>Container</persistence-type>
      <prim-key-class>uk.co.cosmic_solutions.datamatch.DataFieldPK</prim-key-class>
      False
      <cmp-version>2.x</cmp-version>
      <abstract-schema-name>DataField</abstract-schema-name>
      <cmp-field >
      <![CDATA[Gets the unique key]]>
      <field-name>uniqueKey</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[Retrieves the type.]]>
      <field-name>type</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[Retrieves the name assigned to the current field]]>
      <field-name>name</field-name>
      </cmp-field>

      <!-- Write a file named ejb-finders-DataFieldEJB.xml if you want to define extra finders. -->


      Any help would be really appreciated as i've been battling with this for 2 days now.

      I made a copy of the bean called DataField2EJB but removed all CMR fields and that deployed fine. This makes me think that the issue could be else where in the code for another bean, but the log says it is this one.

      I'm using xdoclet (1.2 beta) to generate all the interfaces and primarykeys so i don't think that is the issue either.

      Regards

      Paul Nardone