Atomikos Forum |
|
The DB2 database throws a com.ibm.db2.jcc.am.SqlIntegrityConstraintViolationException (well-grounded). But my application only catches a com.atomikos.icatch.RollbackException without the DB2 exception as cause. The application does not know the reason for the rollback.
To find out the reason for the rollback I have to inspect the Atomikos log. Do I have to live with thos constraint or do I have a configuration problem? Best regards Andreas Stacktrace in application log: Caused by: org.springframework.transaction.UnexpectedRollbackException: JTA transaction unexpectedly rolled back (maybe due to a timeout); nested exception is javax.transaction.RollbackException: The transaction was set to rollback only at org.springframework.transaction.jta.JtaTransactionManager.doCommit(JtaTransactionManager.java:1012) 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:393) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:120) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:621) at com.provinzial.beispielanwendung.firmenverwaltung.services.impl.FirmenverwaltungInternImpl$$EnhancerByCGLIB$$cb7d072.aendereFirma(<generated>) at com.provinzial.beispielanwendung.aktivitaeten.A7FirmaSpeichern.ausfuehrenImplementierung(A7FirmaSpeichern.java:116) at de.rpv.proweb.gen.muster.Kommando.ausfuehren(Kommando.java:78) at com.provinzial.beispielanwendung.vorgaenge.V7Firmaverwaltung.a7FirmaSpeichern(V7Firmaverwaltung.java:211) at com.provinzial.beispielanwendung.vorgaenge.V7Firmaverwaltung.ausfuehrenImplementierung(V7Firmaverwaltung.java:742) at de.rpv.proweb.gen.muster.Kommando.ausfuehren(Kommando.java:78) at com.provinzial.beispielanwendung.prozesse.Prozess7.v7Firmaverwaltung(Prozess7.java:1004) at com.provinzial.beispielanwendung.prozesse.Prozess7.ausfuehrenImplementierung(Prozess7.java:723) at de.rpv.proweb.gen.muster.Kommando.ausfuehren(Kommando.java:78) at com.provinzial.framework.prozess.client.prozessausfuehrer.util.ProzessStarter.starteProzess(ProzessStarter.java:140) ... 50 more Caused by: javax.transaction.RollbackException: The transaction was set to rollback only at com.atomikos.icatch.jta.TransactionImp.rethrowAsJtaRollbackException(TransactionImp.java:70) at com.atomikos.icatch.jta.TransactionImp.commit(TransactionImp.java:250) at com.atomikos.icatch.jta.TransactionManagerImp.commit(TransactionManagerImp.java:498) at com.atomikos.icatch.jta.UserTransactionImp.commit(UserTransactionImp.java:129) at org.springframework.transaction.jta.JtaTransactionManager.doCommit(JtaTransactionManager.java:1009) ... 66 more Caused by: com.atomikos.icatch.RollbackException: The transaction was set to rollback only at com.atomikos.icatch.imp.TransactionStateHandler.commit(TransactionStateHandler.java:290) at com.atomikos.icatch.imp.CompositeTransactionImp.doCommit(CompositeTransactionImp.java:319) at com.atomikos.icatch.imp.CompositeTerminatorImp.commit(CompositeTerminatorImp.java:79) at com.atomikos.icatch.jta.TransactionImp.commit(TransactionImp.java:236) ... 69 more Stacktrace in Atomikos log: <openjpa-2.2.0-r422266:1244990 fatal general error> org.apache.openjpa.persistence.PersistenceException: The transaction has been rolled back. See the nested exceptions for details on the errors that occurred. FailedObject: org.apache.openjpa.enhance.com$provinzial$beispielanwendung$firmenverwaltung$entity$Firma$pcsubclass-11154 at org.apache.openjpa.kernel.BrokerImpl.newFlushException(BrokerImpl.java:2337) at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:2174) at org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:2072) at org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1990) at com.atomikos.icatch.jta.Sync2Sync.beforeCompletion(Sync2Sync.java:55) at com.atomikos.icatch.imp.TransactionStateHandler.commit(TransactionStateHandler.java:278) at com.atomikos.icatch.imp.CompositeTransactionImp.doCommit(CompositeTransactionImp.java:319) at com.atomikos.icatch.imp.CompositeTerminatorImp.commit(CompositeTerminatorImp.java:79) at com.atomikos.icatch.jta.TransactionImp.commit(TransactionImp.java:236) at com.atomikos.icatch.jta.TransactionManagerImp.commit(TransactionManagerImp.java:498) at com.atomikos.icatch.jta.UserTransactionImp.commit(UserTransactionImp.java:129) at org.springframework.transaction.jta.JtaTransactionManager.doCommit(JtaTransactionManager.java:1009) 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:393) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:120) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:621) at com.provinzial.beispielanwendung.firmenverwaltung.services.impl.FirmenverwaltungInternImpl$$EnhancerByCGLIB$$cb7d072.aendereFirma(<generated>) at com.provinzial.beispielanwendung.aktivitaeten.A7FirmaSpeichern.ausfuehrenImplementierung(A7FirmaSpeichern.java:116) at de.rpv.proweb.gen.muster.Kommando.ausfuehren(Kommando.java:78) at com.provinzial.beispielanwendung.vorgaenge.V7Firmaverwaltung.a7FirmaSpeichern(V7Firmaverwaltung.java:211) at com.provinzial.beispielanwendung.vorgaenge.V7Firmaverwaltung.ausfuehrenImplementierung(V7Firmaverwaltung.java:742) at de.rpv.proweb.gen.muster.Kommando.ausfuehren(Kommando.java:78) at com.provinzial.beispielanwendung.prozesse.Prozess7.v7Firmaverwaltung(Prozess7.java:1004) at com.provinzial.beispielanwendung.prozesse.Prozess7.ausfuehrenImplementierung(Prozess7.java:723) at de.rpv.proweb.gen.muster.Kommando.ausfuehren(Kommando.java:78) at com.provinzial.framework.prozess.client.prozessausfuehrer.util.ProzessStarter.starteProzess(ProzessStarter.java:140) at com.provinzial.framework.prozess.client.prozessausfuehrer.impl.MikroProzessSteuerung.vorgangHatNichtGewechselt(MikroProzessSteuerung.java:390) at com.provinzial.framework.prozess.client.prozessausfuehrer.impl.MikroProzessSteuerung.microProzessAusfuehrung(MikroProzessSteuerung.java:364) at com.provinzial.framework.prozess.client.StandardProzessProxy.fuehreMicroProzessListeAus(StandardProzessProxy.java:115) at com.provinzial.framework.prozess.client.StandardProzessProxy.prozessAusfuehren(StandardProzessProxy.java:573) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.provinzial.framework.service.remote.rest.RemoteServiceExporter.invokeServiceProvider(RemoteServiceExporter.java:182) at com.provinzial.framework.service.remote.rest.RemoteServiceExporter.callServiceMethod(RemoteServiceExporter.java:128) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:173) at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:89) at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:164) at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:91) at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37) at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:106) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263) at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:206) at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:218) at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:161) at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:114) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:184) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:107) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:163) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:113) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:662) Caused by: <openjpa-2.2.0-r422266:1244990 fatal store error> org.apache.openjpa.persistence.EntityExistsException: DB2 SQL Error: SQLCODE=-803, SQLSTATE=23505, SQLERRMC=IJF9011N;0000000F14, DRIVER=4.9.80 {prepstmnt 1148611374 UPDATE PR.TJF9010N SET name = ?, email = ?, fax = ?, telefon = ?, hausnr = ?, ort = ?, plz = ?, strasse = ? WHERE id = ? [params=(String) Unit Test Firma 1, (String) mail@mail, (null) null, (null) null, (String) 12, (String) Ort, (String) 12345, (String) Strasse, (long) 11154]} [code=-803, state=23505]SQLCA OUTPUT[Errp=DSNXRUP2, Errd=-150, 13172739, 0, 13814229, -489488384, 0] DB2 SQL Error: SQLCODE=-803, SQLSTATE=23505, SQLERRMC=IJF9011N;0000000F14, DRIVER=4.9.80 FailedObject: org.apache.openjpa.enhance.com$provinzial$beispielanwendung$firmenverwaltung$entity$Firma$pcsubclass-11154 at org.apache.openjpa.jdbc.sql.DBDictionary.narrow(DBDictionary.java:4903) at org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java:4878) at org.apache.openjpa.jdbc.sql.DB2Dictionary.newStoreException(DB2Dictionary.java:564) at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:136) at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:78) at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushAndUpdate(PreparedStatementManagerImpl.java:143) at org.apache.openjpa.jdbc.kernel.BatchingPreparedStatementManagerImpl.batchOrExecuteRow(BatchingPreparedStatementManagerImpl.java:99) at org.apache.openjpa.jdbc.kernel.BatchingPreparedStatementManagerImpl.flushAndUpdate(BatchingPreparedStatementManagerImpl.java:83) at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushInternal(PreparedStatementManagerImpl.java:99) at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flush(PreparedStatementManagerImpl.java:87) at org.apache.openjpa.jdbc.kernel.ConstraintUpdateManager.flush(ConstraintUpdateManager.java:550) at org.apache.openjpa.jdbc.kernel.ConstraintUpdateManager.flush(ConstraintUpdateManager.java:107) at org.apache.openjpa.jdbc.kernel.BatchingConstraintUpdateManager.flush(BatchingConstraintUpdateManager.java:59) at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:103) at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:76) at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.flush(JDBCStoreManager.java:713) at org.apache.openjpa.kernel.DelegatingStoreManager.flush(DelegatingStoreManager.java:131) ... 77 more Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: DB2 SQL Error: SQLCODE=-803, SQLSTATE=23505, SQLERRMC=IJF9011N;0000000F14, DRIVER=4.9.80 {prepstmnt 1148611374 UPDATE PR.TJF9010N SET name = ?, email = ?, fax = ?, telefon = ?, hausnr = ?, ort = ?, plz = ?, strasse = ? WHERE id = ? [params=(String) Unit Test Firma 1, (String) mail@mail, (null) null, (null) null, (String) 12, (String) Ort, (String) 12345, (String) Strasse, (long) 11154]} [code=-803, state=23505] at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:247) at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:223) at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.access$1000(LoggingConnectionDecorator.java:72) at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingPreparedStatement.executeUpdate(LoggingConnectionDecorator.java:1162) at org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:272) at org.apache.openjpa.jdbc.kernel.JDBCStoreManager$CancelPreparedStatement.executeUpdate(JDBCStoreManager.java:1741) at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.executeUpdate(PreparedStatementManagerImpl.java:267) at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushAndUpdate(PreparedStatementManagerImpl.java:118) ... 88 more NestedThrowables: <openjpa-2.2.0-r422266:1244990 fatal store error> org.apache.openjpa.persistence.EntityExistsException: DB2 SQL Error: SQLCODE=-803, SQLSTATE=23505, SQLERRMC=IJF9011N;0000000F14, DRIVER=4.9.80 {prepstmnt 459291666 UPDATE PR.TJF9010N SET name = ?, email = ?, fax = ?, telefon = ?, hausnr = ?, ort = ?, plz = ?, strasse = ? WHERE id = ? [params=(String) Unit Test Firma 1, (String) mail@mail, (null) null, (null) null, (String) 12, (String) Ort, (String) 12345, (String) Strasse, (long) 11154]} [code=-803, state=23505]SQLCA OUTPUT[Errp=DSNXRUP2, Errd=-150, 13172739, 0, 13814229, -489488384, 0] DB2 SQL Error: SQLCODE=-803, SQLSTATE=23505, SQLERRMC=IJF9011N;0000000F14, DRIVER=4.9.80 FailedObject: org.apache.openjpa.enhance.com$provinzial$beispielanwendung$firmenverwaltung$entity$Firma$pcsubclass-11154 at org.apache.openjpa.jdbc.sql.DBDictionary.narrow(DBDictionary.java:4903) at org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java:4878) at org.apache.openjpa.jdbc.sql.DB2Dictionary.newStoreException(DB2Dictionary.java:564) at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:136) at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:78) at org.apache.openjpa.jdbc.kernel.BatchingPreparedStatementManagerImpl.flushBatch(BatchingPreparedStatementManagerImpl.java:221) at org.apache.openjpa.jdbc.kernel.BatchingConstraintUpdateManager.flush(BatchingConstraintUpdateManager.java:63) at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:103) at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:76) at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.flush(JDBCStoreManager.java:713) at org.apache.openjpa.kernel.DelegatingStoreManager.flush(DelegatingStoreManager.java:131) at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:2174) at org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:2072) at org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1990) at com.atomikos.icatch.jta.Sync2Sync.beforeCompletion(Sync2Sync.java:55) at com.atomikos.icatch.imp.TransactionStateHandler.commit(TransactionStateHandler.java:278) at com.atomikos.icatch.imp.CompositeTransactionImp.doCommit(CompositeTransactionImp.java:319) at com.atomikos.icatch.imp.CompositeTerminatorImp.commit(CompositeTerminatorImp.java:79) at com.atomikos.icatch.jta.TransactionImp.commit(TransactionImp.java:236) at com.atomikos.icatch.jta.TransactionManagerImp.commit(TransactionManagerImp.java:498) at com.atomikos.icatch.jta.UserTransactionImp.commit(UserTransactionImp.java:129) at org.springframework.transaction.jta.JtaTransactionManager.doCommit(JtaTransactionManager.java:1009) 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:393) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:120) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:621) at com.provinzial.beispielanwendung.firmenverwaltung.services.impl.FirmenverwaltungInternImpl$$EnhancerByCGLIB$$cb7d072.aendereFirma(<generated>) at com.provinzial.beispielanwendung.aktivitaeten.A7FirmaSpeichern.ausfuehrenImplementierung(A7FirmaSpeichern.java:116) at de.rpv.proweb.gen.muster.Kommando.ausfuehren(Kommando.java:78) at com.provinzial.beispielanwendung.vorgaenge.V7Firmaverwaltung.a7FirmaSpeichern(V7Firmaverwaltung.java:211) at com.provinzial.beispielanwendung.vorgaenge.V7Firmaverwaltung.ausfuehrenImplementierung(V7Firmaverwaltung.java:742) at de.rpv.proweb.gen.muster.Kommando.ausfuehren(Kommando.java:78) at com.provinzial.beispielanwendung.prozesse.Prozess7.v7Firmaverwaltung(Prozess7.java:1004) at com.provinzial.beispielanwendung.prozesse.Prozess7.ausfuehrenImplementierung(Prozess7.java:723) at de.rpv.proweb.gen.muster.Kommando.ausfuehren(Kommando.java:78) at com.provinzial.framework.prozess.client.prozessausfuehrer.util.ProzessStarter.starteProzess(ProzessStarter.java:140) at com.provinzial.framework.prozess.client.prozessausfuehrer.impl.MikroProzessSteuerung.vorgangHatNichtGewechselt(MikroProzessSteuerung.java:390) at com.provinzial.framework.prozess.client.prozessausfuehrer.impl.MikroProzessSteuerung.microProzessAusfuehrung(MikroProzessSteuerung.java:364) at com.provinzial.framework.prozess.client.StandardProzessProxy.fuehreMicroProzessListeAus(StandardProzessProxy.java:115) at com.provinzial.framework.prozess.client.StandardProzessProxy.prozessAusfuehren(StandardProzessProxy.java:573) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.provinzial.framework.service.remote.rest.RemoteServiceExporter.invokeServiceProvider(RemoteServiceExporter.java:182) at com.provinzial.framework.service.remote.rest.RemoteServiceExporter.callServiceMethod(RemoteServiceExporter.java:128) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:173) at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:89) at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:164) at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:91) at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37) at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:106) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263) at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:206) at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:218) at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:161) at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:114) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:184) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:107) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:163) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:113) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:662) Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: DB2 SQL Error: SQLCODE=-803, SQLSTATE=23505, SQLERRMC=IJF9011N;0000000F14, DRIVER=4.9.80 {prepstmnt 459291666 UPDATE PR.TJF9010N SET name = ?, email = ?, fax = ?, telefon = ?, hausnr = ?, ort = ?, plz = ?, strasse = ? WHERE id = ? [params=(String) Unit Test Firma 1, (String) mail@mail, (null) null, (null) null, (String) 12, (String) Ort, (String) 12345, (String) Strasse, (long) 11154]} [code=-803, state=23505] at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:247) at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:223) at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.access$1000(LoggingConnectionDecorator.java:72) at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingPreparedStatement.executeUpdate(LoggingConnectionDecorator.java:1162) at org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:272) at org.apache.openjpa.jdbc.kernel.JDBCStoreManager$CancelPreparedStatement.executeUpdate(JDBCStoreManager.java:1741) at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.executeUpdate(PreparedStatementManagerImpl.java:267) at org.apache.openjpa.jdbc.kernel.BatchingPreparedStatementManagerImpl.flushSingleRow(BatchingPreparedStatementManagerImpl.java:250) at org.apache.openjpa.jdbc.kernel.BatchingPreparedStatementManagerImpl.flushBatch(BatchingPreparedStatementManagerImpl.java:153) ... 82 more NestedThrowables: com.ibm.db2.jcc.am.SqlIntegrityConstraintViolationException: DB2 SQL Error: SQLCODE=-803, SQLSTATE=23505, SQLERRMC=IJF9011N;0000000F14, DRIVER=4.9.80 at com.ibm.db2.jcc.am.fd.a(fd.java:672) at com.ibm.db2.jcc.am.fd.a(fd.java:60) at com.ibm.db2.jcc.am.fd.a(fd.java:127) at com.ibm.db2.jcc.am.en.b(en.java:2222) at com.ibm.db2.jcc.am.en.c(en.java:2205) at com.ibm.db2.jcc.t4.cb.k(cb.java:355) at com.ibm.db2.jcc.t4.cb.a(cb.java:61) at com.ibm.db2.jcc.t4.q.a(q.java:50) at com.ibm.db2.jcc.t4.sb.b(sb.java:218) at com.ibm.db2.jcc.am.fn.nc(fn.java:2898) at com.ibm.db2.jcc.am.fn.b(fn.java:3836) at com.ibm.db2.jcc.am.fn.ec(fn.java:738) at com.ibm.db2.jcc.am.fn.executeUpdate(fn.java:717) at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:102) at org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:272) at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingPreparedStatement.executeUpdate(LoggingConnectionDecorator.java:1160) at org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:272) at org.apache.openjpa.jdbc.kernel.JDBCStoreManager$CancelPreparedStatement.executeUpdate(JDBCStoreManager.java:1741) at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.executeUpdate(PreparedStatementManagerImpl.java:267) at org.apache.openjpa.jdbc.kernel.BatchingPreparedStatementManagerImpl.flushSingleRow(BatchingPreparedStatementManagerImpl.java:250) at org.apache.openjpa.jdbc.kernel.BatchingPreparedStatementManagerImpl.flushBatch(BatchingPreparedStatementManagerImpl.java:153) at org.apache.openjpa.jdbc.kernel.BatchingConstraintUpdateManager.flush(BatchingConstraintUpdateManager.java:63) at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:103) at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:76) at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.flush(JDBCStoreManager.java:713) at org.apache.openjpa.kernel.DelegatingStoreManager.flush(DelegatingStoreManager.java:131) at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:2174) at org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:2072) at org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1990) at com.atomikos.icatch.jta.Sync2Sync.beforeCompletion(Sync2Sync.java:55) at com.atomikos.icatch.imp.TransactionStateHandler.commit(TransactionStateHandler.java:278) at com.atomikos.icatch.imp.CompositeTransactionImp.doCommit(CompositeTransactionImp.java:319) at com.atomikos.icatch.imp.CompositeTerminatorImp.commit(CompositeTerminatorImp.java:79) at com.atomikos.icatch.jta.TransactionImp.commit(TransactionImp.java:236) at com.atomikos.icatch.jta.TransactionManagerImp.commit(TransactionManagerImp.java:498) at com.atomikos.icatch.jta.UserTransactionImp.commit(UserTransactionImp.java:129) at org.springframework.transaction.jta.JtaTransactionManager.doCommit(JtaTransactionManager.java:1009) 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:393) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:120) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:621) at com.provinzial.beispielanwendung.firmenverwaltung.services.impl.FirmenverwaltungInternImpl$$EnhancerByCGLIB$$cb7d072.aendereFirma(<generated>) at com.provinzial.beispielanwendung.aktivitaeten.A7FirmaSpeichern.ausfuehrenImplementierung(A7FirmaSpeichern.java:116) at de.rpv.proweb.gen.muster.Kommando.ausfuehren(Kommando.java:78) at com.provinzial.beispielanwendung.vorgaenge.V7Firmaverwaltung.a7FirmaSpeichern(V7Firmaverwaltung.java:211) at com.provinzial.beispielanwendung.vorgaenge.V7Firmaverwaltung.ausfuehrenImplementierung(V7Firmaverwaltung.java:742) at de.rpv.proweb.gen.muster.Kommando.ausfuehren(Kommando.java:78) at com.provinzial.beispielanwendung.prozesse.Prozess7.v7Firmaverwaltung(Prozess7.java:1004) at com.provinzial.beispielanwendung.prozesse.Prozess7.ausfuehrenImplementierung(Prozess7.java:723) at de.rpv.proweb.gen.muster.Kommando.ausfuehren(Kommando.java:78) at com.provinzial.framework.prozess.client.prozessausfuehrer.util.ProzessStarter.starteProzess(ProzessStarter.java:140) at com.provinzial.framework.prozess.client.prozessausfuehrer.impl.MikroProzessSteuerung.vorgangHatNichtGewechselt(MikroProzessSteuerung.java:390) at com.provinzial.framework.prozess.client.prozessausfuehrer.impl.MikroProzessSteuerung.microProzessAusfuehrung(MikroProzessSteuerung.java:364) at com.provinzial.framework.prozess.client.StandardProzessProxy.fuehreMicroProzessListeAus(StandardProzessProxy.java:115) at com.provinzial.framework.prozess.client.StandardProzessProxy.prozessAusfuehren(StandardProzessProxy.java:573) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.provinzial.framework.service.remote.rest.RemoteServiceExporter.invokeServiceProvider(RemoteServiceExporter.java:182) at com.provinzial.framework.service.remote.rest.RemoteServiceExporter.callServiceMethod(RemoteServiceExporter.java:128) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:173) at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:89) at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:164) at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:91) at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37) at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:106) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263) at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:206) at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:218) at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:161) at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:114) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:184) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:107) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:163) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:113) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:662)
Hi,
We've seen this issue a few times. The problem is as follows: 1. the application requests commit 2. the transaction manager first calls all beforeCompletion calls on Synhronization instances (like JPA, Hibernate etc) 3. the transaction manager then attempts commit The problem is: in step 2, one or more Synhronization instances are allowed to call setRollbackOnly, making step 3 fail. But there is (in general) no exception as part of step 2 that makes it to the transaction manager. Consequently, the transaction manager would not know what to chain in step 3. Any suggestions? Thanks
I also have a problem because the cause field is not populated.... I'm using apache camel and it's route retry mechanism can be configured on a per Exception basis, in my case I'm looking for an OptimisticLockException...
Now looking at the 3.7.1 release code, my first impression is that the RuntimeException that is caught at line 279 in TransactionStateHandler can easily be set as the cause to the RollbackException from line 290. right? ...also the while loop on synchronizations_.elements()... probably you don't need to run through all elements if one failed, because they will be rolled-back.. right? |