AnsweredAssumed Answered

Exception while suspending a process

Question asked by c.arunrathnakumar on Mar 8, 2013
Latest reply on Apr 3, 2013 by frederikheremans1
Hi,
I created my process engine as

ProcessEngineConfiguration configuration = ProcessEngineConfiguration.createStandaloneProcessEngineConfiguration();
configuration.setDataSourceJndiName("java:jboss/datasources/workflow");
configuration.setDatabaseSchemaUpdate(ProcessEngineConfiguration.DB_SCHEMA_UPDATE_FALSE);
configuration.setJobExecutorActivate(true);
configuration.setTransactionsExternallyManaged(true);
ProcessEngine engine = configuration.buildProcessEngine();

    I created a webservice called testSuspend(String processInstanceId) which in turn calls the suspendProcess() of activiti.
  
    When i call the service testSuspend(String processInstanceId) as a soap service, it works, the process gets suspended.

    But when i call the testSuspend(String processInstanceId) from another webservice, it throws an exception as follows.


Caused by: org.apache.ibatis.exceptions.PersistenceException:
### Error opening session.  Cause: java.sql.SQLException: javax.resource.ResourceException: IJ000457: Unchecked throwable in managedConnectionReconnected() cl=org.jboss.jca.core.connectionmanager.listener.TxConnectionListener@e075b8a[state=NORMAL managed connection=org.jboss.jca.adapters.jdbc.local.LocalManagedConnection@f11fad9 connection handles=0 lastUse=1362658278602 trackByTx=false pool=org.jboss.jca.core.connectionmanager.pool.strategy.OnePool@1a61c596 pool internal context=SemaphoreArrayListManagedConnectionPool@45299c4c[pool=workflowV2] xaResource=LocalXAResourceImpl@10b9a6e3[connectionListener=e075b8a connectionManager=17462cb2 warned=false currentXid=null] txSync=null]
### Cause: java.sql.SQLException: javax.resource.ResourceException: IJ000457: Unchecked throwable in managedConnectionReconnected() cl=org.jboss.jca.core.connectionmanager.listener.TxConnectionListener@e075b8a[state=NORMAL managed connection=org.jboss.jca.adapters.jdbc.local.LocalManagedConnection@f11fad9 connection handles=0 lastUse=1362658278602 trackByTx=false pool=org.jboss.jca.core.connectionmanager.pool.strategy.OnePool@1a61c596 pool internal context=SemaphoreArrayListManagedConnectionPool@45299c4c[pool=workflowV2] xaResource=LocalXAResourceImpl@10b9a6e3[connectionListener=e075b8a connectionManager=17462cb2 warned=false currentXid=null] txSync=null]
        at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:8)
        at org.apache.ibatis.session.defaults.DefaultSqlSessionFactory.openSessionFromDataSource(DefaultSqlSessionFactory.java:83)
        at org.apache.ibatis.session.defaults.DefaultSqlSessionFactory.openSession(DefaultSqlSessionFactory.java:32)
        at org.activiti.engine.impl.db.DbSqlSession.<init>(DbSqlSession.java:94)
        at org.activiti.engine.impl.db.DbSqlSessionFactory.openSession(DbSqlSessionFactory.java:130)
        at org.activiti.engine.impl.interceptor.CommandContext.getSession(CommandContext.java:197)
        at org.activiti.engine.impl.persistence.AbstractManager.getSession(AbstractManager.java:61)
        at org.activiti.engine.impl.persistence.AbstractManager.getDbSqlSession(AbstractManager.java:57)
        at org.activiti.engine.impl.persistence.entity.TaskManager.findTasksByQueryCriteria(TaskManager.java:109)
        at org.activiti.engine.impl.TaskQueryImpl.executeList(TaskQueryImpl.java:459)
        at org.activiti.engine.impl.AbstractQuery.execute(AbstractQuery.java:138)
        at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)
        at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:60)
        at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:32)
        at org.activiti.engine.impl.AbstractQuery.list(AbstractQuery.java:112)
        at net.treetechnologies.workflow.services.Tasks.getTasks(Tasks.java:889)
        … 75 more
Caused by: java.sql.SQLException: javax.resource.ResourceException: IJ000457: Unchecked throwable in managedConnectionReconnected() cl=org.jboss.jca.core.connectionmanager.listener.TxConnectionListener@e075b8a[state=NORMAL managed connection=org.jboss.jca.adapters.jdbc.local.LocalManagedConnection@f11fad9 connection handles=0 lastUse=1362658278602 trackByTx=false pool=org.jboss.jca.core.connectionmanager.pool.strategy.OnePool@1a61c596 pool internal context=SemaphoreArrayListManagedConnectionPool@45299c4c[pool=workflowV2] xaResource=LocalXAResourceImpl@10b9a6e3[connectionListener=e075b8a connectionManager=17462cb2 warned=false currentXid=null] txSync=null]
        at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:137)
        at org.apache.ibatis.session.defaults.DefaultSqlSessionFactory.openSessionFromDataSource(DefaultSqlSessionFactory.java:73)
        … 89 more
Caused by: javax.resource.ResourceException: IJ000457: Unchecked throwable in managedConnectionReconnected() cl=org.jboss.jca.core.connectionmanager.listener.TxConnectionListener@e075b8a[state=NORMAL managed connection=org.jboss.jca.adapters.jdbc.local.LocalManagedConnection@f11fad9 connection handles=0 lastUse=1362658278602 trackByTx=false pool=org.jboss.jca.core.connectionmanager.pool.strategy.OnePool@1a61c596 pool internal context=SemaphoreArrayListManagedConnectionPool@45299c4c[pool=workflowV2] xaResource=LocalXAResourceImpl@10b9a6e3[connectionListener=e075b8a connectionManager=17462cb2 warned=false currentXid=null] txSync=null]
        at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.reconnectManagedConnection(AbstractConnectionManager.java:604)
        at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:467)
        at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:129)
        … 90 more
Caused by: javax.resource.ResourceException: IJ000461: Could not enlist in transaction on entering meta-aware object
        at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.managedConnectionReconnected(TxConnectionManagerImpl.java:474)
        at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.reconnectManagedConnection(AbstractConnectionManager.java:599)
        … 92 more
Caused by: javax.transaction.SystemException: IJ000356: Failed to enlist: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: 0:ffff7f000001:-be300e2:513834f1:1f4b status: ActionStatus.ABORT_ONLY >
        at org.jboss.jca.core.connectionmanager.listener.TxConnectionListener$TransactionSynchronization.checkEnlisted(TxConnectionListener.java:552)
        at org.jboss.jca.core.connectionmanager.listener.TxConnectionListener.enlist(TxConnectionListener.java:282)
        at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.managedConnectionReconnected(TxConnectionManagerImpl.java:467)
        … 93 more



    I use JBOSS as7.

Outcomes