5 Replies Latest reply on Nov 9, 2004 3:34 AM by Alexey Loubyansky

    EJB QL parsing pb

    a d Newbie

      Hello,

      I am currently migrate a J2EE application (with MDB CMP .... ) in order to
      use JBoss server.
      I have created jboss.xml and jbosscmp-jdbc.xml file. I didn't change my ejbjar.xml (that is working perfectly with my previous apps server) so in this file I have got all EJB QL query that is working perfectly.

      My problem is when I try to deploy my ear in Jboss at this time I have got the following error about EJB QL statement.
      Is there a problem with this statement :

      'SELECT OBJECT(o) FROM MonitoringFailed AS o WHERE o.domain LIKE ?1 AND o.finished <= ?2'
      


      in particular on characters "<=" ?? JBOSS does not accept this characters ??
      Thanks for any help


      15:52:50,187 ERROR [EntityContainer] Starting failed jboss.j2ee:jndiName=local/MonitoringAnalyseBean,service=EJB
      org.jboss.deployment.DeploymentException: Error compiling EJB-QL statement 'SELECT OBJECT(o) FROM MonitoringFailed AS o WHERE o.domain LIKE ?1 AND o.finished <= ?2'; - nested throwable: (org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered "<=" at line 1, column 83.
      Was expecting one of:
      "=" ...
      "<>" ...
      )
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.(JDBCEJBQLQuery.java:52)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCCommandFactory.createEJBQLQuery(JDBCCommandFactory.java:60)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCQueryManager.start(JDBCQueryManager.java:271)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.startStoreManager(JDBCStoreManager.java:498)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.java:396)
      at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManager.java:157)
      at org.jboss.ejb.EntityContainer.startService(EntityContainer.java:348)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221)
      at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:230)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:844)
      at $Proxy18.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:369)
      at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:230)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy75.start(Unknown Source)
      at org.jboss.ejb.EjbModule.startService(EjbModule.java:394)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221)
      at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:230)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:844)
      at $Proxy18.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:369)
      at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:230)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy15.start(Unknown Source)
      at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:605)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:863)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:855)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:674)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:637)
      at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:230)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy7.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:304)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:478)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:274)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221)
      at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:230)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:844)
      at $Proxy0.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:369)
      at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:230)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy4.start(Unknown Source)
      at org.jboss.deployment.SARDeployer.start(SARDeployer.java:260)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:863)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:674)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:637)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:621)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:230)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy5.deploy(Unknown Source)
      at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:387)
      at org.jboss.system.server.ServerImpl.start(ServerImpl.java:291)
      at org.jboss.Main.boot(Main.java:151)
      at org.jboss.Main$1.run(Main.java:405)
      at java.lang.Thread.run(Thread.java:534)
      Caused by: org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered "<=" at line 1, column 83.
      Was expecting one of:
      "=" ...
      "<>" ...

      at org.jboss.ejb.plugins.cmp.ejbql.EJBQLParser.generateParseException(EJBQLParser.java:4495)
      at org.jboss.ejb.plugins.cmp.ejbql.EJBQLParser.jj_consume_token(EJBQLParser.java:4376)
      at org.jboss.ejb.plugins.cmp.ejbql.EJBQLParser.ComparisonExpression(EJBQLParser.java:1267)
      at org.jboss.ejb.plugins.cmp.ejbql.EJBQLParser.SimpleCondExpression(EJBQLParser.java:864)
      at org.jboss.ejb.plugins.cmp.ejbql.EJBQLParser.ConditionalPrimary(EJBQLParser.java:821)
      at org.jboss.ejb.plugins.cmp.ejbql.EJBQLParser.ConditionalTest(EJBQLParser.java:789)
      at org.jboss.ejb.plugins.cmp.ejbql.EJBQLParser.ConditionalFactor(EJBQLParser.java:766)
      at org.jboss.ejb.plugins.cmp.ejbql.EJBQLParser.WhereConditionalTerm(EJBQLParser.java:625)
      at org.jboss.ejb.plugins.cmp.ejbql.EJBQLParser.WhereExpression(EJBQLParser.java:568)
      at org.jboss.ejb.plugins.cmp.ejbql.EJBQLParser.WhereClause(EJBQLParser.java:532)
      at org.jboss.ejb.plugins.cmp.ejbql.EJBQLParser.EJBQL(EJBQLParser.java:117)
      at org.jboss.ejb.plugins.cmp.ejbql.EJBQLParser.parse(EJBQLParser.java:65)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLCompiler.compileEJBQL(JDBCEJBQLCompiler.java:153)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.(JDBCEJBQLQuery.java:43)
      ... 116 more