Uploaded image for project: 'MariaDB Connector/J'
  1. MariaDB Connector/J
  2. CONJ-902

BatchedTooManyRowsAffectedException with Hibernate

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 3.0.2-rc
    • 3.0.3
    • batch
    • None

    Description

      Switched from 2.7.3 to 3.0.2rc and get the following Error:
      By searching for this, I've stumbled over https://hibernate.atlassian.net/browse/HHH-9134
      which points to http://bugs.mysql.com/bug.php?id=61213 (so JDBC related).

      Had the behavior from the Connector/J changed (unintentionally)?

      org.hibernate.jdbc.BatchedTooManyRowsAffectedException: Batch update returned unexpected row count from update [0]; actual row count: 2; expected: 1
      	at org.hibernate.jdbc.Expectations$BasicExpectation.checkBatched(Expectations.java:78)
      	at org.hibernate.jdbc.Expectations$BasicExpectation.verifyOutcome(Expectations.java:54)
      	at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.checkRowCounts(BatchingBatch.java:151)
      	at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.performExecution(BatchingBatch.java:126)
      	at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.doExecuteBatch(BatchingBatch.java:106)
      	at org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl.execute(AbstractBatchImpl.java:148)
      	at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.executeBatch(JdbcCoordinatorImpl.java:198)
      	at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:633)
      	at org.hibernate.engine.spi.ActionQueue.executeInserts(ActionQueue.java:461)
      	at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:258)
      	at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:317)
      	at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:330)
      	at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:287)
      	at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:193)
      	at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:123)
      	at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:194)
      	at org.hibernate.event.internal.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:38)
      	at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:179)
      	at org.hibernate.event.internal.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:32)
      	at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:75)
      	at org.hibernate.event.service.internal.EventListenerGroupImpl.fireEventOnEachListener(EventListenerGroupImpl.java:107)
      	at org.hibernate.internal.SessionImpl.fireSave(SessionImpl.java:665)
      	at org.hibernate.internal.SessionImpl.save(SessionImpl.java:658)
      	at org.hibernate.internal.SessionImpl.save(SessionImpl.java:653)
      	at sun.reflect.GeneratedMethodAccessor45.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.hibernate.context.internal.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:351)
      	at com.sun.proxy.$Proxy55.save(Unknown Source)
      

      Attachments

        Activity

          People

            diego dupin Diego Dupin
            sstamm Sebastian Stamm
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.