One of my DAO classes is throwing a DataAccessException. In this case, not finding a row to return is totally normal, but I don't want to transaction to roll back. I catch the exception and eat it but still spring gives me this error. Is there something I need to add to my txTemplate XML config to make it ignore this and not roll back?
Code:Exception in thread "pool-1-thread-2" org.springframework.transaction.UnexpectedRollbackException: Transaction rolled back because it has been marked as rollback-only at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:626) at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:319) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:116) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy3.dispatchResourcesToJob(Unknown Source) at com.imageworks.spcue.dispatcher.DispatchNextFrame.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) at java.lang.Thread.run(Thread.java:619)


Reply With Quote