0 Replies Latest reply on Feb 20, 2003 5:13 PM by Mauricio Nagaoka

    DynamicQL concurrency problem

    Mauricio Nagaoka Newbie

      Hello people!

      I've been using DynamicQL with CMP Entity Beans in JBoss 3.0.6 and it's working quite well, except for a little problem. When I've more than one client running a DynamicQL query at the same time over the same CMP Entity Bean, sometimes I got the following exception:

      2003-02-20 18:58:29,857 ERROR [org.jboss.ejb.plugins.LogInterceptor] TransactionRolledbackLocalException, causedBy:
      java.lang.NullPointerException
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractQueryCommand.execute(JDBCAbstractQueryCommand.java:161)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCDynamicQLQuery.execute(JDBCDynamicQLQuery.java:101)
      at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCSelectorBridge.execute(JDBCSelectorBridge.java:64)
      at org.jboss.ejb.plugins.cmp.bridge.EntityBridgeInvocationHandler.invoke(EntityBridgeInvocationHandler.java:96)
      at org.jboss.proxy.compiler.Runtime.invoke(Runtime.java:59)
      at br.com.smbsoftware.webflow.tc.entity.TaskInfoBean$Proxy.ejbSelectGeneric()
      at br.com.smbsoftware.webflow.tc.entity.TaskInfoBean.ejbHomeSelectGeneric(TaskInfoBean.java:731)
      at sun.reflect.GeneratedMethodAccessor436.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1138)
      at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:73)
      at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:207)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:215)
      at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:73)
      at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:90)
      at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:79)
      at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:44)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:111)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:228)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:62)
      at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:105)
      at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:129)
      at org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:487)
      at org.jboss.ejb.plugins.local.BaseLocalContainerInvoker.invokeHome(BaseLocalContainerInvoker.java:230)
      at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:110)
      at $Proxy198.selectGeneric(Unknown Source)
      at br.com.smbsoftware.webflow.tc.session.TaskControlBean.getTaskInfoId(TaskControlBean.java:932)
      at sun.reflect.GeneratedMethodAccessor483.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:660)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
      at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:77)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:107)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:228)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:92)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:130)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:204)
      at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:313)
      at org.jboss.ejb.plugins.local.BaseLocalContainerInvoker.invoke(BaseLocalContainerInvoker.java:301)
      at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:81)
      at $Proxy208.getTaskInfoId(Unknown Source)
      at br.com.smbsoftware.webflow.tc.TaskControlDelegate.getTaskInfoId(TaskControlDelegate.java:348)
      at br.com.smbsoftware.bombril.struts.SearchTaskAction.execute(SearchTaskAction.java:87)
      at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:446)
      at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:266)
      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1292)
      at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360)
      at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:280)
      at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:553)
      at org.mortbay.http.HttpContext.handle(HttpContext.java:1717)
      at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:549)
      at org.mortbay.http.HttpContext.handle(HttpContext.java:1667)
      at org.mortbay.http.HttpServer.service(HttpServer.java:862)
      at org.jboss.jetty.Jetty.service(Jetty.java:497)
      at org.mortbay.http.HttpConnection.service(HttpConnection.java:759)
      at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:923)
      at org.mortbay.http.HttpConnection.handle(HttpConnection.java:776)
      at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:202)
      at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289)
      at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:455)
      2003-02-20 18:58:29,917 ERROR [org.jboss.ejb.plugins.LogInterceptor] TransactionRolledbackLocalException, causedBy:
      java.lang.NullPointerException
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractQueryCommand.execute(JDBCAbstractQueryCommand.java:161)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCDynamicQLQuery.execute(JDBCDynamicQLQuery.java:101)
      at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCSelectorBridge.execute(JDBCSelectorBridge.java:64)
      at org.jboss.ejb.plugins.cmp.bridge.EntityBridgeInvocationHandler.invoke(EntityBridgeInvocationHandler.java:96)
      at org.jboss.proxy.compiler.Runtime.invoke(Runtime.java:59)
      at br.com.smbsoftware.webflow.tc.entity.TaskInfoBean$Proxy.ejbSelectGeneric()
      at br.com.smbsoftware.webflow.tc.entity.TaskInfoBean.ejbHomeSelectGeneric(TaskInfoBean.java:731)
      at sun.reflect.GeneratedMethodAccessor436.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1138)
      at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:73)
      at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:207)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:215)
      at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:73)
      at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:90)
      at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:79)
      at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:44)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:111)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:228)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:62)
      at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:105)
      at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:129)
      at org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:487)
      at org.jboss.ejb.plugins.local.BaseLocalContainerInvoker.invokeHome(BaseLocalContainerInvoker.java:230)
      at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:110)
      at $Proxy198.selectGeneric(Unknown Source)
      at br.com.smbsoftware.webflow.tc.session.TaskControlBean.getTaskInfoId(TaskControlBean.java:932)
      at sun.reflect.GeneratedMethodAccessor483.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:660)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
      at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:77)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:107)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:228)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:92)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:130)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:204)
      at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:313)
      at org.jboss.ejb.plugins.local.BaseLocalContainerInvoker.invoke(BaseLocalContainerInvoker.java:301)
      at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:81)
      at $Proxy208.getTaskInfoId(Unknown Source)
      at br.com.smbsoftware.webflow.tc.TaskControlDelegate.getTaskInfoId(TaskControlDelegate.java:348)
      at br.com.smbsoftware.bombril.struts.SearchTaskAction.execute(SearchTaskAction.java:87)
      at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:446)
      at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:266)
      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1292)
      at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360)
      at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:280)
      at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:553)
      at org.mortbay.http.HttpContext.handle(HttpContext.java:1717)
      at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:549)
      at org.mortbay.http.HttpContext.handle(HttpContext.java:1667)
      at org.mortbay.http.HttpServer.service(HttpServer.java:862)
      at org.jboss.jetty.Jetty.service(Jetty.java:497)
      at org.mortbay.http.HttpConnection.service(HttpConnection.java:759)
      at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:923)
      at org.mortbay.http.HttpConnection.handle(HttpConnection.java:776)
      at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:202)
      at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289)
      at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:455)

      I was using JBoss 3.0.4 and this problem was occurring even more frequently. When I switched to JBoss 3.0.6, it got quite better, but it occurs sometimes.

      Did anybody get the same problem?
      Any suggestions?
      Could it be any mistake of mine (probably) or a JBoss bug?

      Thanks!

      Mauricio
      Brazil.