0 Replies Latest reply on Aug 14, 2004 2:38 AM by ikigovenku

    EJB QL and FOR UPDATE problem

    ikigovenku Newbie

      I am getting following error, If I use FOR UPDATE in QL. I cannot use <row-locking>TRUE</row-locking>, because some of my other QL's involved DISTINCT.

      Please help me how to acheive FOR UPDATE for a this query.


      MBeanException: org.jboss.deployment.DeploymentException: Error compiling JBossQ
      L statement 'SELECT OBJECT(o) FROM IkgInProcessScenario o WHERE o.uniqueId = ?1
      AND o.packageName = ?2 AND o.scenarioName = ?3 FOR UPDATE'; - nested throwable:
      (org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered "FOR" at line 1, co
      lumn 115.
      Was expecting one of:

      "AND" ...
      "OR" ...
      "LIMIT" ...
      "OFFSET" ...
      "ORDER" ...
      )
      Cause: org.jboss.deployment.DeploymentException: Error compiling JBossQL stateme
      nt 'SELECT OBJECT(o) FROM IkgInProcessScenario o WHERE o.uniqueId = ?1 AND o.pac
      kageName = ?2 AND o.scenarioName = ?3 FOR UPDATE'; - nested throwable: (org.jbos
      s.ejb.plugins.cmp.ejbql.ParseException: Encountered "FOR" at line 1, column 115.

      Was expecting one of:

      "AND" ...
      "OR" ...
      "LIMIT" ...
      "OFFSET" ...
      "ORDER" ...
      )
      at org.jboss.mx.server.ReflectedDispatcher.handleInvocationExceptions(Re
      flectedDispatcher.java:91)
      at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.
      java:64)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:185)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
      ler.java:837)
      at $Proxy17.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:367)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.
      java:60)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:185)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy81.start(Unknown Source)
      at org.jboss.ejb.EjbModule.startService(EjbModule.java:367)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanS
      upport.java:271)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMB
      eanSupport.java:221)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.
      java:60)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:185)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
      ler.java:837)
      at $Proxy17.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:367)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.
      java:60)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:185)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy14.start(Unknown Source)
      at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:570)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:836)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:828)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:645)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:608)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.
      java:60)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:185)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy7.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen
      tScanner.java:304)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
      canner.java:478)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
      doScan(AbstractDeploymentScanner.java:201)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(A
      bstractDeploymentScanner.java:274)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanS
      upport.java:271)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMB
      eanSupport.java:221)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.
      java:60)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:185)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
      ler.java:837)
      at $Proxy0.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:367)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.
      java:60)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:185)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy4.start(Unknown Source)
      at org.jboss.deployment.SARDeployer.start(SARDeployer.java:251)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:836)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:645)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:608)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:592)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.
      java:60)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:185)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy5.deploy(Unknown Source)
      at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:407)
      at org.jboss.system.server.ServerImpl.start(ServerImpl.java:311)
      at org.jboss.Main.boot(Main.java:145)
      at org.jboss.Main$1.run(Main.java:399)
      at java.lang.Thread.run(Thread.java:484)