Atomikos Forum |
|
Hi All,
I use Spring+Hibernate+Atomikos+MySQL and I got following exception: ERROR ErrorLogger:2166 - Job (DEFAULT.exampleJobDetail threw an exception. org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: org.springframework.transaction.TransactionSystemException: Could not commit Hibernate transaction; nested exception is org.hibernate.TransactionException: JDBC commit failed] at org.quartz.core.JobRunShell.run(JobRunShell.java:210) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:546) Caused by: org.springframework.transaction.TransactionSystemException: Could not commit Hibernate transaction; nested exception is org.hibernate.TransactionException: JDBC commit failed at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:660) at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:754) at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:723) at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:394) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:117) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at $Proxy21.save(Unknown Source) at com.armobi.domain.user.DefaultUserManager.save(DefaultUserManager.java:21) at com.armobi.domain.user.DefaultUserManager.save(DefaultUserManager.java:1) at com.armobi.scheduler.example.ExampleJob.executeInternal(ExampleJob.java:24) at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86) at org.quartz.core.JobRunShell.run(JobRunShell.java:199) ... 1 more Caused by: org.hibernate.TransactionException: JDBC commit failed at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:130) at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:656) ... 13 more Caused by: com.atomikos.jdbc.AtomikosSQLException: Cannot call method 'commit' while a global transaction is running at com.atomikos.jdbc.AtomikosSQLException.throwAtomikosSQLException(AtomikosSQLException.java:19) at com.atomikos.jdbc.AtomikosSQLException.throwAtomikosSQLException(AtomikosSQLException.java:30) at com.atomikos.jdbc.AtomikosConnectionProxy.invoke(AtomikosConnectionProxy.java:93) at $Proxy70.commit(Unknown Source) at org.hibernate.transaction.JDBCTransaction.commitAndResetAutoCommit(JDBCTransaction.java:139) at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:115) ... 14 more I use Quartz with org.quartz.scheduler.wrapJobExecutionInUserTransaction=true Inside the Quartz Job I'm trying to save Hibernate entity. How I can use nested exception with Atomikos ? Where is my problem ? Thanks in advance, Alex |