Bug 983421 - Exception when opening TaskList
Exception when opening TaskList
Status: CLOSED CURRENTRELEASE
Product: JBoss BPMS Platform 6
Classification: JBoss
Component: Business Central (Show other bugs)
6.0.0
Unspecified Unspecified
medium Severity high
: ER2
: 6.0.0
Assigned To: Mauricio Salatino
Jan Hrcek
: TestBlocker
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-11 03:49 EDT by Jan Hrcek
Modified: 2014-08-06 16:12 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-08-06 16:12:38 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Server log with exception (65.03 KB, text/x-log)
2013-07-11 03:49 EDT, Jan Hrcek
no flags Details
server.log when deploying on AS 7.1.1. (282.25 KB, text/x-log)
2013-07-11 04:42 EDT, Jan Hrcek
no flags Details

  None (edit)
Description Jan Hrcek 2013-07-11 03:49:37 EDT
Created attachment 772060 [details]
Server log with exception

Description of problem:
When you start business central and go to Task > Tasks List for the first time, and exception (1) is thrown (org.jboss.errai.bus.client.api.base.MessageDeliveryFailure: error invoking endpoint)

If it is not thrown immediately, it is thrown when you create new task and try to start it start button.

Version-Release number of selected component (if applicable):
6.0.0.DR6 deployed on JBoss EAP 6.1

How reproducible:
One of the 2 exceptions is thrown 10 times of 10 I tried (my environment: Fedora 19, Firefox 22/Chrome 28)

Steps to Reproduce:
1. login to business-central
2. Navigate to Tasks > Task List (exception is thrown)
3. Create new task (click New Task, fill in task name and click Create)
4. Click Start button on the line with newly created task (exception is thrown)

Actual results:
The task list is open (exception 1 doesn't stop us from using the application) but because of exception 2 no tasks can be started.

Expected results:
No exceptions are thrown when entering Task List or when starting new tasks.

Additional info:

server.log attached

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

Exception stack trace:
 org.jboss.errai.bus.client.api.base.MessageDeliveryFailure: error invoking endpoint
 	at org.jboss.errai.bus.server.io.ConversationalEndpointCallback.callback(ConversationalEndpointCallback.java:132)
 	at org.jboss.errai.bus.server.io.RemoteServiceCallback.callback(RemoteServiceCallback.java:54)
 	at org.jboss.errai.cdi.server.CDIExtensionPoints$3.callback(CDIExtensionPoints.java:512)
 	at org.jboss.errai.bus.client.framework.DeliveryPlan.deliver(DeliveryPlan.java:43)
 	at org.jboss.errai.bus.server.ServerMessageBusImpl.sendGlobal(ServerMessageBusImpl.java:632)
 	at org.jboss.errai.bus.server.SimpleDispatcher.dispatchGlobal(SimpleDispatcher.java:46)
 	at org.jboss.errai.bus.server.service.ErraiServiceImpl.store(ErraiServiceImpl.java:93)
 	at org.jboss.errai.bus.server.service.ErraiServiceImpl.store(ErraiServiceImpl.java:107)
 	at org.jboss.errai.bus.server.servlet.DefaultBlockingServlet.doPost(DefaultBlockingServlet.java:117)
 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295)
 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
 	at org.jboss.solder.servlet.exception.CatchExceptionFilter.doFilter(CatchExceptionFilter.java:65)
 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
 	at org.jboss.solder.servlet.event.ServletEventBridgeFilter.doFilter(ServletEventBridgeFilter.java:74)
 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
 	at org.jbpm.designer.web.filter.impl.PluggableFilter.doFilter(PluggableFilter.java:70)
 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
 	at org.uberfire.security.server.UberFireSecurityFilter.doFilter(UberFireSecurityFilter.java:224)
 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149)
 	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:481)
 	at org.jboss.as.web.session.ClusteredSessionValve.handleRequest(ClusteredSessionValve.java:134)
 	at org.jboss.as.web.session.ClusteredSessionValve.invoke(ClusteredSessionValve.java:99)
 	at org.jboss.as.web.session.JvmRouteValve.invoke(JvmRouteValve.java:92)
 	at org.jboss.as.web.session.LockingValve.invoke(LockingValve.java:64)
 	at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50)
 	at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50)
 	at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169)
 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:145)
 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97)
 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102)
 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:336)
 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653)
 	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:920)
 	at java.lang.Thread.run(Thread.java:722)
 Caused by: java.lang.RuntimeException: Operation failed
 	at org.jbpm.shared.services.impl.JbpmServicesPersistenceManagerImpl.queryWithParametersInTransaction(JbpmServicesPersistenceManagerImpl.java:407)
 	at org.jbpm.shared.services.impl.JbpmServicesPersistenceManagerImpl.queryWithParametersInTransaction(JbpmServicesPersistenceManagerImpl.java:414)
 	at org.jbpm.services.task.impl.TaskQueryServiceImpl.getTasksAssignedAsPotentialOwnerByStatusByGroup(TaskQueryServiceImpl.java:243)
 	at org.jbpm.services.task.impl.TaskQueryServiceImpl$Proxy$_$$_WeldSubclass.getTasksAssignedAsPotentialOwnerByStatusByGroup(TaskQueryServiceImpl$Proxy$_$$_WeldSubclass.java)
 	at org.jbpm.services.task.identity.UserGroupTaskQueryServiceDecorator.getTasksAssignedAsPotentialOwnerByStatus(UserGroupTaskQueryServiceDecorator.java:71)
 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 	at java.lang.reflect.Method.invoke(Method.java:601)
 	at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:267)
 	at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52)
 	at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:137)
 	at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:263)
 	at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:170)
 	at org.jboss.weld.bean.proxy.DecoratorProxyMethodHandler.doInvoke(DecoratorProxyMethodHandler.java:79)
 	at org.jboss.weld.interceptor.util.proxy.TargetInstanceProxyMethodHandler.invoke(TargetInstanceProxyMethodHandler.java:36)
 	at org.jboss.weld.bean.proxy.TargetBeanInstance.invoke(TargetBeanInstance.java:88)
 	at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:105)
 	at org.jbpm.services.task.impl.TaskQueryServiceImpl$Proxy$_$$_Weld$Proxy$.getTasksAssignedAsPotentialOwnerByStatus(TaskQueryServiceImpl$Proxy$_$$_Weld$Proxy$.java)
 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 	at java.lang.reflect.Method.invoke(Method.java:601)
 	at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:267)
 	at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52)
 	at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:137)
 	at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:263)
 	at org.jboss.weld.bean.proxy.CombinedInterceptorAndDecoratorStackMethodHandler.invoke(CombinedInterceptorAndDecoratorStackMethodHandler.java:61)
 	at org.jbpm.services.task.impl.TaskQueryServiceImpl$Proxy$_$$_WeldSubclass.getTasksAssignedAsPotentialOwnerByStatus(TaskQueryServiceImpl$Proxy$_$$_WeldSubclass.java)
 	at org.jbpm.services.task.impl.TaskQueryServiceImpl$Proxy$_$$_WeldClientProxy.getTasksAssignedAsPotentialOwnerByStatus(TaskQueryServiceImpl$Proxy$_$$_WeldClientProxy.java)
 	at org.jbpm.services.task.impl.TaskServiceEntryPointImpl.getTasksAssignedAsPotentialOwnerByStatus(TaskServiceEntryPointImpl.java:366)
 	at org.jbpm.services.task.impl.TaskServiceEntryPointImpl$Proxy$_$$_WeldClientProxy.getTasksAssignedAsPotentialOwnerByStatus(TaskServiceEntryPointImpl$Proxy$_$$_WeldClientProxy.java)
 	at org.jbpm.console.ng.ht.backend.server.TaskServiceEntryPointImpl.getTasksAssignedAsPotentialOwnerByExpirationDateOptional(TaskServiceEntryPointImpl.java:75)
 	at org.jbpm.console.ng.ht.backend.server.TaskServiceEntryPointImpl$Proxy$_$$_WeldClientProxy.getTasksAssignedAsPotentialOwnerByExpirationDateOptional(TaskServiceEntryPointImpl$Proxy$_$$_WeldClientProxy.java)
 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 	at java.lang.reflect.Method.invoke(Method.java:601)
 	at org.jboss.errai.bus.server.io.ConversationalEndpointCallback.callback(ConversationalEndpointCallback.java:114)
 	... 42 more
 Caused by: javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Could not open connection
 	at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1387)
 	at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1310)
 	at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:273)
 	at org.jbpm.shared.services.impl.JbpmServicesPersistenceManagerImpl.queryWithParameters(JbpmServicesPersistenceManagerImpl.java:447)
 	at org.jbpm.shared.services.impl.JbpmServicesPersistenceManagerImpl.queryWithParametersInTransaction(JbpmServicesPersistenceManagerImpl.java:396)
 	... 80 more
 Caused by: org.hibernate.exception.GenericJDBCException: Could not open connection
 	at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:54)
 	at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:125)
 	at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:110)
 	at org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.obtainConnection(LogicalConnectionImpl.java:221)
 	at org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.getConnection(LogicalConnectionImpl.java:157)
 	at org.hibernate.engine.jdbc.internal.StatementPreparerImpl.connection(StatementPreparerImpl.java:56)
 	at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$5.doPrepare(StatementPreparerImpl.java:161)
 	at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$StatementPreparationTemplate.prepareStatement(StatementPreparerImpl.java:182)
 	at org.hibernate.engine.jdbc.internal.StatementPreparerImpl.prepareQueryStatement(StatementPreparerImpl.java:159)
 	at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1854)
 	at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1831)
 	at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1811)
 	at org.hibernate.loader.Loader.doQuery(Loader.java:899)
 	at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:341)
 	at org.hibernate.loader.Loader.doList(Loader.java:2516)
 	at org.hibernate.loader.Loader.doList(Loader.java:2502)
 	at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2332)
 	at org.hibernate.loader.Loader.list(Loader.java:2327)
 	at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:490)
 	at org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:355)
 	at org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:195)
 	at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1268)
 	at org.hibernate.internal.QueryImpl.list(QueryImpl.java:101)
 	at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:264)
 	... 82 more
 Caused by: java.sql.SQLException: javax.resource.ResourceException: IJ000460: Error checking for a transaction
 	at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:147)
 	at org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.getConnection(InjectedDataSourceConnectionProvider.java:70)
 	at org.hibernate.internal.AbstractSessionImpl$NonContextualJdbcConnectionAccess.obtainConnection(AbstractSessionImpl.java:292)
 	at org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.obtainConnection(LogicalConnectionImpl.java:214)
 	... 102 more
 Caused by: javax.resource.ResourceException: IJ000460: Error checking for a transaction
 	at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.getManagedConnection(TxConnectionManagerImpl.java:362)
 	at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:464)
 	at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:139)
 	... 105 more
 Caused by: javax.resource.ResourceException: IJ000459: Transaction is not active: tx=TransactionImple < ac, BasicAction: 0:ffff7f000001:a3e95ff:51de5df9:44 status: ActionStatus.ABORT_ONLY >
 	at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.getManagedConnection(TxConnectionManagerImpl.java:352)
 	... 107 more
 *** Message delivery failure ***
 Bus: org.jboss.errai.bus.server.ServerMessageBusImpl@364b5cde
 Message: CommandType=getTasksAssignedAsPotentialOwnerByExpirationDateOptional:java.lang.String:java.util.List:java.util.Date:java.lang.String:, ErrorTo=org.jbpm.console.ng.ht.service.TaskServiceEntryPoint:RPC.getTasksAssignedAsPotentialOwnerByExpirationDateOptional:java.lang.String:java.util.List:java.util.Date:java.lang.String::Errors:3, ReplyTo=org.jbpm.console.ng.ht.service.TaskServiceEntryPoint:RPC.getTasksAssignedAsPotentialOwnerByExpirationDateOptional:java.lang.String:java.util.List:java.util.Date:java.lang.String::RespondTo:3, ToSubject=org.jbpm.console.ng.ht.service.TaskServiceEntryPoint:RPC, MethodParms=[admin, [Ready, Reserved, InProgress], null, en-UK]
 errorMessage: Error calling remote service: org.jbpm.console.ng.ht.service.TaskServiceEntryPoint:RPC
 exception: org.jboss.errai.bus.client.api.base.MessageDeliveryFailure: error invoking endpoint
 disconnect: false
Comment 1 Mauricio Salatino 2013-07-11 04:17:35 EDT
Hi Jan,
Can you please check if you have the same exception with JBoss AS 7.1.1? 
If you don't have the exception there it must be something EAP 6.1 specific. Please let me know how it goes? Here I wasn't able to reproduce that exception
Comment 2 Jan Hrcek 2013-07-11 04:41:04 EDT
I just checked on JBoss AS 7.1.1. and the issue is still there. There seems to be some issue in persistence layer (see log of AS 7.1.1 attached)

Also I just discussed the issue with my teamleader and he said it was officially agreed by management (see bpms-pm list for discussion), that we should officially test BPMS with EAP 6.1.0.
Comment 3 Jan Hrcek 2013-07-11 04:42:00 EDT
Created attachment 772073 [details]
server.log when deploying on AS 7.1.1.
Comment 4 Jan Hrcek 2013-07-11 05:10:39 EDT
We just found out the issue is caused by integration with dashbuilder (when dashbuilder is not deployed, the issue is gone). Since all the exceptions seem to be thrown from persistence layer and the integration between dashbuilder / console NG works by sharing table(s) in shared datasource this will be the root cause.
Comment 5 Roger Martínez 2013-07-12 11:45:51 EDT
This issue is same as reported yesterday on JIRA: https://bugzilla.redhat.com/show_bug.cgi?id=983421

I have same issue in EAP 6.1 without installing the dashbuilder application. It's a clean EAP installation with only this deployed application..

As far as I know, this issue happens when login as admin user and first time entering tasklist after a process instance started.
Comment 6 Roger Martínez 2013-07-12 11:46:36 EDT
Sorry, there was a copy&paste, error the JIRA issue was: https://issues.jboss.org/browse/JBPM-4058
Comment 7 Mauricio Salatino 2013-07-15 04:16:21 EDT
I couldn't reproduce the error and it could definitely be related with the integration with the dashbuilder. Jan, can you please confirm that if the dashbuilder is not there it works correctly 100% of the times?
Cheers
Comment 8 Jan Hrcek 2013-07-15 05:19:26 EDT
Unfortunately, the error appears even WITHOUT dashbuilder deployed. However it does not occur in 100% of cases. But when performing some manual clicking in the task list it is sure to occur after few moments.

This issue is definitely related to another issue (same exception stacktrace when starting task via REST api) https://bugzilla.redhat.com/show_bug.cgi?id=975878

Are you sure you are trying to reproduce the error on EAP 6.1?

-------------
The root cause exception seems to be always thrown from the persistence layer. Here's an example of several exceptions from the bottom of stack trace:

1) org.h2.jdbc.JdbcSQLException: Unique index or primary key violation: "PRIMARY_KEY_C6 ON PUBLIC.ORGANIZATIONALENTITY(ID)"; SQL statement:
 insert into OrganizationalEntity (DTYPE, id) values ('GroupImpl', ?)

2) javax.resource.ResourceException: IJ000459: Transaction is not active: tx=TransactionImple < ac, BasicAction: 0:ffff7f000001:25e15c1d:51e3bc8a:7f status: ActionStatus.ABORT_ONLY
Comment 9 Radovan Synek 2013-07-16 04:31:30 EDT
Verified that the issue no more exists on actual snapshot - after beta 5 (tested with EAP 6.1 bundle from nexus: /org/kie/kie-wb-distribution-wars/6.0.0-SNAPSHOT/kie-wb-distribution-wars-6.0.0-20130716.005046-463-eap-6.1.war md5 6c3cfd171340a94f17f0a424092f8393)

Will retest on the next production build.
Comment 10 Mauricio Salatino 2013-07-16 07:57:42 EDT
This is marked as modified so it can be retested with the next build
Comment 11 Jan Hrcek 2013-09-04 02:55:05 EDT
The root cause of this issue was that I used EAP use with username same as one of its roles (i.e. user 'admin' with role 'admin'). This has been reported in https://bugzilla.redhat.com/show_bug.cgi?id=988804

For other cases (username != one of his roles) the issue is not there. Verified with BPMS 6.0.0.ER2

Note You need to log in before you can comment on or make changes to this bug.