AnsweredAssumed Answered

Tracing Activiti execution within an Eclipse JUnit test

Question asked by bwd on Apr 1, 2011
Latest reply on Apr 4, 2011 by frederikheremans1
Hi,

I'm trying to turn on Activiti engine debug logging when running the engine from a JUnit test in Eclipse.  I've tried placing the following line

   org.activiti.level=FINEST

in assorted property locations, but have so far been unable to get any logging.

In particular, i'm trying to find the cause for the following stack trace:

org.apache.ibatis.exceptions.PersistenceException:
### Error updating database.  Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '1218' for key 'PRIMARY'
### The error may involve org.activiti.persistence.insertVariableInstance-Inline
### The error occurred while setting parameters
### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '1218' for key 'PRIMARY'
   at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:8)
   at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:100)
   at org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:87)
   at org.activiti.engine.impl.db.DbSqlSession.flushInserts(DbSqlSession.java:392)
   at org.activiti.engine.impl.db.DbSqlSession.flush(DbSqlSession.java:319)
   at org.activiti.engine.impl.interceptor.CommandContext.flushSessions(CommandContext.java:135)
   at org.activiti.engine.impl.interceptor.CommandContext.close(CommandContext.java:91)
   at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:49)
   at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:42)
   at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)
   at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:40)
   at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
   at org.activiti.engine.impl.RuntimeServiceImpl.startProcessInstanceByKey(RuntimeServiceImpl.java:49)



It comes and goes in a single test case, and appears more likely to occur when I run all the tests in a suite at once.

Thanks,

bwd.

Outcomes