org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update

Hibernate JIRA | Anjan Deb | 9 years ago
  1. 0

    I am using Hibernate 3.0 with JTA (Weblogic 8.1 SP4). Basically, I am trying to handle transaction/hibernate exceptions in my application. I am managing transactions with UserTransaction. I start a transaction at the begining of the request and after that I am doing some operations on that transaction. And if some exception comes I log it, rollback the transaction and throw the exception. UserTransaction.commit() throws RollbackException if anything goes wrong with the operation, but, it does not return what exactly went wrong, like, exceptions related to SQL Exception or hibernate Exception. It basically dumps all that information to the logs internally and throws RollbackException with the following trace (see below). But this trace has no such information which I can send back to the user. As, information of what went wrong has already been dumped to the server console. I will appreciate if you can tell if there is anyway I can recieve the actual exception trace or am I doing anything wrong with the hibernate configuration?? Thanks in Advance, Anjan ------------------------------------------------------------------------------------------------------------------------------ Actual Exception which transaction dumps to the server console/log ERROR - ORA-00001: unique constraint (NOVATXN.UQ_BROKERS) violated ERROR - ORA-00001: unique constraint (NOVATXN.UQ_BROKERS) violated ERROR - Could not synchronize database state with session org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:69) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:202) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:230) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:140) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:296) at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27) at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:980) at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:353) at org.hibernate.transaction.CacheSynchronization.beforeCompletion(CacheSynchronization.java:59) at weblogic.transaction.internal.ServerSCInfo.callBeforeCompletions(ServerSCInfo.java:1010) at weblogic.transaction.internal.ServerSCInfo.startPrePrepareAndChain(ServerSCInfo.java:115) at weblogic.transaction.internal.ServerTransactionImpl.localPrePrepareAndChain(ServerTransactionImpl.java:1216) at weblogic.transaction.internal.ServerTransactionImpl.globalPrePrepare(ServerTransactionImpl.java:1990) at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:275) at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:246) at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:303) at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:296) at com.ebw.nova.common.invoker.JTATransactionalAction.commit(JTATransactionalAction.java:31) at com.ebw.nova.common.invoker.TransactionalAction.doAction(TransactionalAction.java:47) at com.ebw.nova.common.invoker.ActionInvoker.invokeAction(ActionInvoker.java:21) at com.ebw.nova.server.handler.AbstractRequestHandler.process(AbstractRequestHandler.java:73) at com.ebw.nova.server.communication.jms.MessageProcessor.processRequest(MessageProcessor.java:44) at com.ebw.ejb.mdb.MQManager.onMessage(MQManager.java:70) at weblogic.ejb20.internal.MDListener.execute(MDListener.java:370) at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:262) at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2678) at weblogic.jms.client.JMSSession.execute(JMSSession.java:2598) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178) Caused by: java.sql.BatchUpdateException: ORA-00001: unique constraint (NOVATXN.UQ_BROKERS) violated at oracle.jdbc.driver.DatabaseError.throwBatchUpdateException(DatabaseError.java:367) at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:8726) at weblogic.jdbc.wrapper.PreparedStatement.executeBatch(PreparedStatement.java:169) at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:58) at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:195) ... 27 more RollbackException Trace: 03/17/2008 08:50:09 [EROR] JTATransactionalAction weblogic.transaction.RollbackException: Unknown reason - with nested exception: [weblogic.transaction.internal.AppSetRollbackOnlyException] 03/17/2008 08:50:09 [EROR] JTATransactionalAction com.novarum.nova.application.OperationException: Transaction does not exist 03/17/2008 08:50:09 [DBUG] MessageProcessor Unknown reason java.lang.RuntimeException: Unknown reason at com.ebw.nova.common.invoker.TransactionalAction.doAction(TransactionalAction.java:54) at com.ebw.nova.common.invoker.ActionInvoker.invokeAction(ActionInvoker.java:21) at com.ebw.nova.server.handler.AbstractRequestHandler.process(AbstractRequestHandler.java:73) at com.ebw.nova.server.communication.jms.MessageProcessor.processRequest(MessageProcessor.java:44) at com.ebw.ejb.mdb.MQManager.onMessage(MQManager.java:70) at weblogic.ejb20.internal.MDListener.execute(MDListener.java:370) at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:262) at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2678) at weblogic.jms.client.JMSSession.execute(JMSSession.java:2598) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178) Caused by: com.novarum.nova.application.OperationException: Unknown reason at com.ebw.nova.common.invoker.JTATransactionalAction.commit(JTATransactionalAction.java:35) at com.ebw.nova.common.invoker.TransactionalAction.doAction(TransactionalAction.java:47) ... 10 more Caused by: weblogic.transaction.RollbackException: Unknown reason - with nested exception: [weblogic.transaction.internal.AppSetRollbackOnlyException] at weblogic.transaction.internal.TransactionImpl.throwRollbackException(TransactionImpl.java:1683) at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:325) at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:246) at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:303) at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:296) at com.ebw.nova.common.invoker.JTATransactionalAction.commit(JTATransactionalAction.java:31) ... 11 more getCause(): com.novarum.nova.application.OperationException: Unknown reason at com.ebw.nova.common.invoker.JTATransactionalAction.commit(JTATransactionalAction.java:35) at com.ebw.nova.common.invoker.TransactionalAction.doAction(TransactionalAction.java:47) at com.ebw.nova.common.invoker.ActionInvoker.invokeAction(ActionInvoker.java:21) at com.ebw.nova.server.handler.AbstractRequestHandler.process(AbstractRequestHandler.java:73) at com.ebw.nova.server.communication.jms.MessageProcessor.processRequest(MessageProcessor.java:44) at com.ebw.ejb.mdb.MQManager.onMessage(MQManager.java:70) at weblogic.ejb20.internal.MDListener.execute(MDListener.java:370) at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:262) at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2678) at weblogic.jms.client.JMSSession.execute(JMSSession.java:2598) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178) Caused by: weblogic.transaction.RollbackException: Unknown reason - with nested exception: [weblogic.transaction.internal.AppSetRollbackOnlyException] at weblogic.transaction.internal.TransactionImpl.throwRollbackException(TransactionImpl.java:1683) at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:325) at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:246) at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:303) at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:296) at com.ebw.nova.common.invoker.JTATransactionalAction.commit(JTATransactionalAction.java:31) ... 11 more getCause(): weblogic.transaction.internal.AppSetRollbackOnlyException at weblogic.transaction.internal.TransactionImpl.setRollbackOnly(TransactionImpl.java:504) at org.hibernate.transaction.CacheSynchronization.setRollbackOnly(CacheSynchronization.java:73) at org.hibernate.transaction.CacheSynchronization.beforeCompletion(CacheSynchronization.java:63) at weblogic.transaction.internal.ServerSCInfo.callBeforeCompletions(ServerSCInfo.java:1010) at weblogic.transaction.internal.ServerSCInfo.startPrePrepareAndChain(ServerSCInfo.java:115) at weblogic.transaction.internal.ServerTransactionImpl.localPrePrepareAndChain(ServerTransactionImpl.java:1216) at weblogic.transaction.internal.ServerTransactionImpl.globalPrePrepare(ServerTransactionImpl.java:1990) at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:275) at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:246) at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:303) at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:296) at com.ebw.nova.common.invoker.JTATransactionalAction.commit(JTATransactionalAction.java:31) at com.ebw.nova.common.invoker.TransactionalAction.doAction(TransactionalAction.java:47) at com.ebw.nova.common.invoker.ActionInvoker.invokeAction(ActionInvoker.java:21) at com.ebw.nova.server.handler.AbstractRequestHandler.process(AbstractRequestHandler.java:73) at com.ebw.nova.server.communication.jms.MessageProcessor.processRequest(MessageProcessor.java:44) at com.ebw.ejb.mdb.MQManager.onMessage(MQManager.java:70) at weblogic.ejb20.internal.MDListener.execute(MDListener.java:370) at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:262) at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2678) at weblogic.jms.client.JMSSession.execute(JMSSession.java:2598) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178) --------------- nested within: ------------------ weblogic.transaction.RollbackException: Unknown reason - with nested exception: [weblogic.transaction.internal.AppSetRollbackOnlyException] at weblogic.transaction.internal.TransactionImpl.throwRollbackException(TransactionImpl.java:1683) at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:325) at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:246) at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:303) at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:296) at com.ebw.nova.common.invoker.JTATransactionalAction.commit(JTATransactionalAction.java:31) at com.ebw.nova.common.invoker.TransactionalAction.doAction(TransactionalAction.java:47) at com.ebw.nova.common.invoker.ActionInvoker.invokeAction(ActionInvoker.java:21) at com.ebw.nova.server.handler.AbstractRequestHandler.process(AbstractRequestHandler.java:73) at com.ebw.nova.server.communication.jms.MessageProcessor.processRequest(MessageProcessor.java:44) at com.ebw.ejb.mdb.MQManager.onMessage(MQManager.java:70) at weblogic.ejb20.internal.MDListener.execute(MDListener.java:370) at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:262) at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2678) at weblogic.jms.client.JMSSession.execute(JMSSession.java:2598) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178) getNested(): weblogic.transaction.internal.AppSetRollbackOnlyException at weblogic.transaction.internal.TransactionImpl.setRollbackOnly(TransactionImpl.java:504) at org.hibernate.transaction.CacheSynchronization.setRollbackOnly(CacheSynchronization.java:73) at org.hibernate.transaction.CacheSynchronization.beforeCompletion(CacheSynchronization.java:63) at weblogic.transaction.internal.ServerSCInfo.callBeforeCompletions(ServerSCInfo.java:1010) at weblogic.transaction.internal.ServerSCInfo.startPrePrepareAndChain(ServerSCInfo.java:115) at weblogic.transaction.internal.ServerTransactionImpl.localPrePrepareAndChain(ServerTransactionImpl.java:1216) at weblogic.transaction.internal.ServerTransactionImpl.globalPrePrepare(ServerTransactionImpl.java:1990) at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:275) at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:246) at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:303) at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:296) at com.ebw.nova.common.invoker.JTATransactionalAction.commit(JTATransactionalAction.java:31) at com.ebw.nova.common.invoker.TransactionalAction.doAction(TransactionalAction.java:47) at com.ebw.nova.common.invoker.ActionInvoker.invokeAction(ActionInvoker.java:21) at com.ebw.nova.server.handler.AbstractRequestHandler.process(AbstractRequestHandler.java:73) at com.ebw.nova.server.communication.jms.MessageProcessor.processRequest(MessageProcessor.java:44) at com.ebw.ejb.mdb.MQManager.onMessage(MQManager.java:70) at weblogic.ejb20.internal.MDListener.execute(MDListener.java:370) at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:262) at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2678) at weblogic.jms.client.JMSSession.execute(JMSSession.java:2598) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178) Following is the hibernate.cfg.xml <session-factory> <!-- properties --> <property name="connection.datasource">jdbc/novaJDBCDataSource</property> <property name="transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property> <property name="transaction.manager_lookup_class">org.hibernate.transaction.WeblogicTransactionManagerLookup</property> <property name="dialect">org.hibernate.dialect.OracleDialect</property> <property name="current_session_context_class">jta</property> <property name="show_sql">false</property> <property name="format_sql">true</property> <property name="hibernate.default_schema">novatxn</property> <property name="jdbc.batch_size">30</property> <!-- jdbc.batch_versioned_data is set to false, making it true hibernate doesn't raise optimistic exception. --> <property name="jdbc.batch_versioned_data">false</property> <property name="jdbc.use_streams_for_binary">true</property> <!-- Outer join fetching is used in MultiDArray--> <property name="max_fetch_depth">1</property> <property name="query.substitutions">true 1, false 0, yes 'Y', no 'N'</property> <!--property name="cache.provider_class">org.hibernate.cache.EhCacheProvider</property--> <!--#Using the Hibernate 2.1 query parser, because of Weblogic 8.1 ANTLR issue.--> <property name="query.factory_class">org.hibernate.hql.classic.ClassicQueryTranslatorFactory</property> </session-factory>

    Hibernate JIRA | 9 years ago | Anjan Deb
    org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
  2. 0

    I am using Hibernate 3.0 with JTA (Weblogic 8.1 SP4). Basically, I am trying to handle transaction/hibernate exceptions in my application. I am managing transactions with UserTransaction. I start a transaction at the begining of the request and after that I am doing some operations on that transaction. And if some exception comes I log it, rollback the transaction and throw the exception. UserTransaction.commit() throws RollbackException if anything goes wrong with the operation, but, it does not return what exactly went wrong, like, exceptions related to SQL Exception or hibernate Exception. It basically dumps all that information to the logs internally and throws RollbackException with the following trace (see below). But this trace has no such information which I can send back to the user. As, information of what went wrong has already been dumped to the server console. I will appreciate if you can tell if there is anyway I can recieve the actual exception trace or am I doing anything wrong with the hibernate configuration?? Thanks in Advance, Anjan ------------------------------------------------------------------------------------------------------------------------------ Actual Exception which transaction dumps to the server console/log ERROR - ORA-00001: unique constraint (NOVATXN.UQ_BROKERS) violated ERROR - ORA-00001: unique constraint (NOVATXN.UQ_BROKERS) violated ERROR - Could not synchronize database state with session org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:69) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:202) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:230) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:140) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:296) at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27) at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:980) at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:353) at org.hibernate.transaction.CacheSynchronization.beforeCompletion(CacheSynchronization.java:59) at weblogic.transaction.internal.ServerSCInfo.callBeforeCompletions(ServerSCInfo.java:1010) at weblogic.transaction.internal.ServerSCInfo.startPrePrepareAndChain(ServerSCInfo.java:115) at weblogic.transaction.internal.ServerTransactionImpl.localPrePrepareAndChain(ServerTransactionImpl.java:1216) at weblogic.transaction.internal.ServerTransactionImpl.globalPrePrepare(ServerTransactionImpl.java:1990) at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:275) at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:246) at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:303) at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:296) at com.ebw.nova.common.invoker.JTATransactionalAction.commit(JTATransactionalAction.java:31) at com.ebw.nova.common.invoker.TransactionalAction.doAction(TransactionalAction.java:47) at com.ebw.nova.common.invoker.ActionInvoker.invokeAction(ActionInvoker.java:21) at com.ebw.nova.server.handler.AbstractRequestHandler.process(AbstractRequestHandler.java:73) at com.ebw.nova.server.communication.jms.MessageProcessor.processRequest(MessageProcessor.java:44) at com.ebw.ejb.mdb.MQManager.onMessage(MQManager.java:70) at weblogic.ejb20.internal.MDListener.execute(MDListener.java:370) at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:262) at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2678) at weblogic.jms.client.JMSSession.execute(JMSSession.java:2598) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178) Caused by: java.sql.BatchUpdateException: ORA-00001: unique constraint (NOVATXN.UQ_BROKERS) violated at oracle.jdbc.driver.DatabaseError.throwBatchUpdateException(DatabaseError.java:367) at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:8726) at weblogic.jdbc.wrapper.PreparedStatement.executeBatch(PreparedStatement.java:169) at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:58) at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:195) ... 27 more RollbackException Trace: 03/17/2008 08:50:09 [EROR] JTATransactionalAction weblogic.transaction.RollbackException: Unknown reason - with nested exception: [weblogic.transaction.internal.AppSetRollbackOnlyException] 03/17/2008 08:50:09 [EROR] JTATransactionalAction com.novarum.nova.application.OperationException: Transaction does not exist 03/17/2008 08:50:09 [DBUG] MessageProcessor Unknown reason java.lang.RuntimeException: Unknown reason at com.ebw.nova.common.invoker.TransactionalAction.doAction(TransactionalAction.java:54) at com.ebw.nova.common.invoker.ActionInvoker.invokeAction(ActionInvoker.java:21) at com.ebw.nova.server.handler.AbstractRequestHandler.process(AbstractRequestHandler.java:73) at com.ebw.nova.server.communication.jms.MessageProcessor.processRequest(MessageProcessor.java:44) at com.ebw.ejb.mdb.MQManager.onMessage(MQManager.java:70) at weblogic.ejb20.internal.MDListener.execute(MDListener.java:370) at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:262) at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2678) at weblogic.jms.client.JMSSession.execute(JMSSession.java:2598) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178) Caused by: com.novarum.nova.application.OperationException: Unknown reason at com.ebw.nova.common.invoker.JTATransactionalAction.commit(JTATransactionalAction.java:35) at com.ebw.nova.common.invoker.TransactionalAction.doAction(TransactionalAction.java:47) ... 10 more Caused by: weblogic.transaction.RollbackException: Unknown reason - with nested exception: [weblogic.transaction.internal.AppSetRollbackOnlyException] at weblogic.transaction.internal.TransactionImpl.throwRollbackException(TransactionImpl.java:1683) at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:325) at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:246) at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:303) at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:296) at com.ebw.nova.common.invoker.JTATransactionalAction.commit(JTATransactionalAction.java:31) ... 11 more getCause(): com.novarum.nova.application.OperationException: Unknown reason at com.ebw.nova.common.invoker.JTATransactionalAction.commit(JTATransactionalAction.java:35) at com.ebw.nova.common.invoker.TransactionalAction.doAction(TransactionalAction.java:47) at com.ebw.nova.common.invoker.ActionInvoker.invokeAction(ActionInvoker.java:21) at com.ebw.nova.server.handler.AbstractRequestHandler.process(AbstractRequestHandler.java:73) at com.ebw.nova.server.communication.jms.MessageProcessor.processRequest(MessageProcessor.java:44) at com.ebw.ejb.mdb.MQManager.onMessage(MQManager.java:70) at weblogic.ejb20.internal.MDListener.execute(MDListener.java:370) at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:262) at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2678) at weblogic.jms.client.JMSSession.execute(JMSSession.java:2598) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178) Caused by: weblogic.transaction.RollbackException: Unknown reason - with nested exception: [weblogic.transaction.internal.AppSetRollbackOnlyException] at weblogic.transaction.internal.TransactionImpl.throwRollbackException(TransactionImpl.java:1683) at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:325) at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:246) at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:303) at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:296) at com.ebw.nova.common.invoker.JTATransactionalAction.commit(JTATransactionalAction.java:31) ... 11 more getCause(): weblogic.transaction.internal.AppSetRollbackOnlyException at weblogic.transaction.internal.TransactionImpl.setRollbackOnly(TransactionImpl.java:504) at org.hibernate.transaction.CacheSynchronization.setRollbackOnly(CacheSynchronization.java:73) at org.hibernate.transaction.CacheSynchronization.beforeCompletion(CacheSynchronization.java:63) at weblogic.transaction.internal.ServerSCInfo.callBeforeCompletions(ServerSCInfo.java:1010) at weblogic.transaction.internal.ServerSCInfo.startPrePrepareAndChain(ServerSCInfo.java:115) at weblogic.transaction.internal.ServerTransactionImpl.localPrePrepareAndChain(ServerTransactionImpl.java:1216) at weblogic.transaction.internal.ServerTransactionImpl.globalPrePrepare(ServerTransactionImpl.java:1990) at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:275) at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:246) at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:303) at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:296) at com.ebw.nova.common.invoker.JTATransactionalAction.commit(JTATransactionalAction.java:31) at com.ebw.nova.common.invoker.TransactionalAction.doAction(TransactionalAction.java:47) at com.ebw.nova.common.invoker.ActionInvoker.invokeAction(ActionInvoker.java:21) at com.ebw.nova.server.handler.AbstractRequestHandler.process(AbstractRequestHandler.java:73) at com.ebw.nova.server.communication.jms.MessageProcessor.processRequest(MessageProcessor.java:44) at com.ebw.ejb.mdb.MQManager.onMessage(MQManager.java:70) at weblogic.ejb20.internal.MDListener.execute(MDListener.java:370) at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:262) at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2678) at weblogic.jms.client.JMSSession.execute(JMSSession.java:2598) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178) --------------- nested within: ------------------ weblogic.transaction.RollbackException: Unknown reason - with nested exception: [weblogic.transaction.internal.AppSetRollbackOnlyException] at weblogic.transaction.internal.TransactionImpl.throwRollbackException(TransactionImpl.java:1683) at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:325) at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:246) at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:303) at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:296) at com.ebw.nova.common.invoker.JTATransactionalAction.commit(JTATransactionalAction.java:31) at com.ebw.nova.common.invoker.TransactionalAction.doAction(TransactionalAction.java:47) at com.ebw.nova.common.invoker.ActionInvoker.invokeAction(ActionInvoker.java:21) at com.ebw.nova.server.handler.AbstractRequestHandler.process(AbstractRequestHandler.java:73) at com.ebw.nova.server.communication.jms.MessageProcessor.processRequest(MessageProcessor.java:44) at com.ebw.ejb.mdb.MQManager.onMessage(MQManager.java:70) at weblogic.ejb20.internal.MDListener.execute(MDListener.java:370) at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:262) at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2678) at weblogic.jms.client.JMSSession.execute(JMSSession.java:2598) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178) getNested(): weblogic.transaction.internal.AppSetRollbackOnlyException at weblogic.transaction.internal.TransactionImpl.setRollbackOnly(TransactionImpl.java:504) at org.hibernate.transaction.CacheSynchronization.setRollbackOnly(CacheSynchronization.java:73) at org.hibernate.transaction.CacheSynchronization.beforeCompletion(CacheSynchronization.java:63) at weblogic.transaction.internal.ServerSCInfo.callBeforeCompletions(ServerSCInfo.java:1010) at weblogic.transaction.internal.ServerSCInfo.startPrePrepareAndChain(ServerSCInfo.java:115) at weblogic.transaction.internal.ServerTransactionImpl.localPrePrepareAndChain(ServerTransactionImpl.java:1216) at weblogic.transaction.internal.ServerTransactionImpl.globalPrePrepare(ServerTransactionImpl.java:1990) at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:275) at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:246) at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:303) at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:296) at com.ebw.nova.common.invoker.JTATransactionalAction.commit(JTATransactionalAction.java:31) at com.ebw.nova.common.invoker.TransactionalAction.doAction(TransactionalAction.java:47) at com.ebw.nova.common.invoker.ActionInvoker.invokeAction(ActionInvoker.java:21) at com.ebw.nova.server.handler.AbstractRequestHandler.process(AbstractRequestHandler.java:73) at com.ebw.nova.server.communication.jms.MessageProcessor.processRequest(MessageProcessor.java:44) at com.ebw.ejb.mdb.MQManager.onMessage(MQManager.java:70) at weblogic.ejb20.internal.MDListener.execute(MDListener.java:370) at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:262) at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2678) at weblogic.jms.client.JMSSession.execute(JMSSession.java:2598) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178) Following is the hibernate.cfg.xml <session-factory> <!-- properties --> <property name="connection.datasource">jdbc/novaJDBCDataSource</property> <property name="transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property> <property name="transaction.manager_lookup_class">org.hibernate.transaction.WeblogicTransactionManagerLookup</property> <property name="dialect">org.hibernate.dialect.OracleDialect</property> <property name="current_session_context_class">jta</property> <property name="show_sql">false</property> <property name="format_sql">true</property> <property name="hibernate.default_schema">novatxn</property> <property name="jdbc.batch_size">30</property> <!-- jdbc.batch_versioned_data is set to false, making it true hibernate doesn't raise optimistic exception. --> <property name="jdbc.batch_versioned_data">false</property> <property name="jdbc.use_streams_for_binary">true</property> <!-- Outer join fetching is used in MultiDArray--> <property name="max_fetch_depth">1</property> <property name="query.substitutions">true 1, false 0, yes 'Y', no 'N'</property> <!--property name="cache.provider_class">org.hibernate.cache.EhCacheProvider</property--> <!--#Using the Hibernate 2.1 query parser, because of Weblogic 8.1 ANTLR issue.--> <property name="query.factory_class">org.hibernate.hql.classic.ClassicQueryTranslatorFactory</property> </session-factory>

    Hibernate JIRA | 9 years ago | Anjan Deb
    org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
  3. 0

    db:: 4.22::Could not execute JDBC batch update Error 7d

    hivmr.com | 4 months ago
    java.sql.BatchUpdateException: ORA-01461: can bind a LONG value only for insert into a LONG column
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    problem with hibernate while saving xml data

    Oracle Community | 1 decade ago | 843859
    java.sql.BatchUpdateException: ORA-01461: can bind a LONG value only for insert into a LONG column
  6. 0

    Closed Connection exceptions every day with WL813 SP3 and 10g

    objectmix.com | 8 months ago
    java.sql.BatchUpdateException: ORA-00001: unique constraint (TRUTH.TMP$DATA_CENTER_ID_PK) violated

    3 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.sql.BatchUpdateException

      ORA-00001: unique constraint (NOVATXN.UQ_BROKERS) violated

      at oracle.jdbc.driver.DatabaseError.throwBatchUpdateException()
    2. Oracle jdbc
      OraclePreparedStatement.executeBatch
      1. oracle.jdbc.driver.DatabaseError.throwBatchUpdateException(DatabaseError.java:367)
      2. oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:8726)
      2 frames
    3. weblogic.jdbc.wrapper
      PreparedStatement.executeBatch
      1. weblogic.jdbc.wrapper.PreparedStatement.executeBatch(PreparedStatement.java:169)
      1 frame
    4. Hibernate
      ActionQueue.executeActions
      1. org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:58)
      2. org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:195)
      3. org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:230)
      4. org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:140)
      4 frames
    5. Hibernate
      SessionImpl.managedFlush
      1. org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:296)
      2. org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
      3. org.hibernate.impl.SessionImpl.flush(SessionImpl.java:980)
      4. org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:353)
      4 frames
    6. Hibernate
      CacheSynchronization.beforeCompletion
      1. org.hibernate.transaction.CacheSynchronization.beforeCompletion(CacheSynchronization.java:59)
      1 frame
    7. weblogic.transaction.internal
      TransactionManagerImpl.commit
      1. weblogic.transaction.internal.ServerSCInfo.callBeforeCompletions(ServerSCInfo.java:1010)
      2. weblogic.transaction.internal.ServerSCInfo.startPrePrepareAndChain(ServerSCInfo.java:115)
      3. weblogic.transaction.internal.ServerTransactionImpl.localPrePrepareAndChain(ServerTransactionImpl.java:1216)
      4. weblogic.transaction.internal.ServerTransactionImpl.globalPrePrepare(ServerTransactionImpl.java:1990)
      5. weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:275)
      6. weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:246)
      7. weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:303)
      8. weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:296)
      8 frames
    8. com.ebw.nova
      MessageProcessor.processRequest
      1. com.ebw.nova.common.invoker.JTATransactionalAction.commit(JTATransactionalAction.java:31)
      2. com.ebw.nova.common.invoker.TransactionalAction.doAction(TransactionalAction.java:47)
      3. com.ebw.nova.common.invoker.ActionInvoker.invokeAction(ActionInvoker.java:21)
      4. com.ebw.nova.server.handler.AbstractRequestHandler.process(AbstractRequestHandler.java:73)
      5. com.ebw.nova.server.communication.jms.MessageProcessor.processRequest(MessageProcessor.java:44)
      5 frames
    9. com.ebw.ejb
      MQManager.onMessage
      1. com.ebw.ejb.mdb.MQManager.onMessage(MQManager.java:70)
      1 frame
    10. weblogic.ejb20.internal
      MDListener.onMessage
      1. weblogic.ejb20.internal.MDListener.execute(MDListener.java:370)
      2. weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:262)
      2 frames
    11. weblogic.jms.client
      JMSSession.execute
      1. weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2678)
      2. weblogic.jms.client.JMSSession.execute(JMSSession.java:2598)
      2 frames
    12. weblogic.kernel
      ExecuteThread.run
      1. weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
      2. weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
      2 frames