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

JIRA | Yannick Marcon | 4 years ago
  1. 0

    Steps: * add the (attached) view * check that there are some unicode chars (≥) in METABSYNDR_NBR_STRICT and METABSYNDR_NBR_MODERATE variables description attribute * copy it in an other datasource (Copy data menu) => SQL error {code} 2013-05-14 14:23:57,245 - INFO - a.support.DatasourceCopier - Copying ValueTable 'HOP' to 'bioshare.HOP' (copyMetadata=true, copyValues=false). 2013-05-14 14:23:59,062 - WARN - util.JDBCExceptionReporter - SQL Error: 1366, SQLState: HY000 2013-05-14 14:23:59,062 - ERROR - util.JDBCExceptionReporter - Incorrect string value: '\xE2\x89\xA5 13...' for column 'value' at row 1 2013-05-14 14:23:59,062 - ERROR - tractFlushingEventListener - Could not synchronize database state with session org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:140) at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:128) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:275) at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:114) at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:109) at org.hibernate.jdbc.AbstractBatcher.prepareBatchStatement(AbstractBatcher.java:244) at org.hibernate.persister.collection.AbstractCollectionPersister.recreate(AbstractCollectionPersister.java:1180) at org.hibernate.action.CollectionRecreateAction.execute(CollectionRecreateAction.java:58) at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:267) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:259) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:182) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321) at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51) at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1206) at org.obiba.magma.datasource.hibernate.HibernateValueTableWriter$HibernateVariableWriter.close(HibernateValueTableWriter.java:117) at org.obiba.magma.support.DatasourceCopier.copyMetadata(DatasourceCopier.java:205) at org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:161) at org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:153) at org.obiba.magma.support.MultithreadedDatasourceCopier.copyVariables(MultithreadedDatasourceCopier.java:215) at org.obiba.magma.support.MultithreadedDatasourceCopier.write(MultithreadedDatasourceCopier.java:175) at org.obiba.magma.support.MultithreadedDatasourceCopier.copy(MultithreadedDatasourceCopier.java:165) at org.obiba.opal.core.service.impl.DefaultExportServiceImpl$ExportActionTemplate$ExportAction.exportTableToDatasource(DefaultExportServiceImpl.java:255) at org.obiba.opal.core.service.impl.DefaultExportServiceImpl$ExportActionTemplate$ExportAction.execute(DefaultExportServiceImpl.java:227) at org.obiba.opal.core.magma.concurrent.LockingActionTemplate$1.doInTransactionWithoutResult(LockingActionTemplate.java:47) at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:33) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130) at org.obiba.opal.core.magma.concurrent.LockingActionTemplate.doInTransaction(LockingActionTemplate.java:42) at org.obiba.opal.core.magma.concurrent.LockingActionTemplate.execute(LockingActionTemplate.java:31) at org.obiba.opal.core.service.impl.DefaultExportServiceImpl.exportTablesToDatasource(DefaultExportServiceImpl.java:127) at org.obiba.opal.shell.commands.CopyCommand.execute(CopyCommand.java:89) at org.obiba.opal.shell.CommandJob.run(CommandJob.java:121) at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120) at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:636) Caused by: java.sql.BatchUpdateException: Incorrect string value: '\xE2\x89\xA5 13...' for column 'value' at row 1 at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2054) at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1467) at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297) at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297) at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70) at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268) ... 36 more Caused by: java.sql.SQLException: Incorrect string value: '\xE2\x89\xA5 13...' for column 'value' at row 1 at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1078) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4120) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4052) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2503) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2664) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2815) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2155) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2458) at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2006) ... 41 more {code}

    JIRA | 4 years ago | Yannick Marcon
    org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update
  2. 0

    Steps: * add the (attached) view * check that there are some unicode chars (≥) in METABSYNDR_NBR_STRICT and METABSYNDR_NBR_MODERATE variables description attribute * copy it in an other datasource (Copy data menu) => SQL error {code} 2013-05-14 14:23:57,245 - INFO - a.support.DatasourceCopier - Copying ValueTable 'HOP' to 'bioshare.HOP' (copyMetadata=true, copyValues=false). 2013-05-14 14:23:59,062 - WARN - util.JDBCExceptionReporter - SQL Error: 1366, SQLState: HY000 2013-05-14 14:23:59,062 - ERROR - util.JDBCExceptionReporter - Incorrect string value: '\xE2\x89\xA5 13...' for column 'value' at row 1 2013-05-14 14:23:59,062 - ERROR - tractFlushingEventListener - Could not synchronize database state with session org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:140) at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:128) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:275) at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:114) at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:109) at org.hibernate.jdbc.AbstractBatcher.prepareBatchStatement(AbstractBatcher.java:244) at org.hibernate.persister.collection.AbstractCollectionPersister.recreate(AbstractCollectionPersister.java:1180) at org.hibernate.action.CollectionRecreateAction.execute(CollectionRecreateAction.java:58) at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:267) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:259) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:182) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321) at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51) at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1206) at org.obiba.magma.datasource.hibernate.HibernateValueTableWriter$HibernateVariableWriter.close(HibernateValueTableWriter.java:117) at org.obiba.magma.support.DatasourceCopier.copyMetadata(DatasourceCopier.java:205) at org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:161) at org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:153) at org.obiba.magma.support.MultithreadedDatasourceCopier.copyVariables(MultithreadedDatasourceCopier.java:215) at org.obiba.magma.support.MultithreadedDatasourceCopier.write(MultithreadedDatasourceCopier.java:175) at org.obiba.magma.support.MultithreadedDatasourceCopier.copy(MultithreadedDatasourceCopier.java:165) at org.obiba.opal.core.service.impl.DefaultExportServiceImpl$ExportActionTemplate$ExportAction.exportTableToDatasource(DefaultExportServiceImpl.java:255) at org.obiba.opal.core.service.impl.DefaultExportServiceImpl$ExportActionTemplate$ExportAction.execute(DefaultExportServiceImpl.java:227) at org.obiba.opal.core.magma.concurrent.LockingActionTemplate$1.doInTransactionWithoutResult(LockingActionTemplate.java:47) at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:33) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130) at org.obiba.opal.core.magma.concurrent.LockingActionTemplate.doInTransaction(LockingActionTemplate.java:42) at org.obiba.opal.core.magma.concurrent.LockingActionTemplate.execute(LockingActionTemplate.java:31) at org.obiba.opal.core.service.impl.DefaultExportServiceImpl.exportTablesToDatasource(DefaultExportServiceImpl.java:127) at org.obiba.opal.shell.commands.CopyCommand.execute(CopyCommand.java:89) at org.obiba.opal.shell.CommandJob.run(CommandJob.java:121) at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120) at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:636) Caused by: java.sql.BatchUpdateException: Incorrect string value: '\xE2\x89\xA5 13...' for column 'value' at row 1 at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2054) at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1467) at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297) at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297) at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70) at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268) ... 36 more Caused by: java.sql.SQLException: Incorrect string value: '\xE2\x89\xA5 13...' for column 'value' at row 1 at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1078) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4120) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4052) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2503) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2664) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2815) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2155) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2458) at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2006) ... 41 more {code}

    JIRA | 4 years ago | Yannick Marcon
    org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update
  3. 0

    DataIntegrity Exception with Multiple Web Application Containers and 1 Database

    Stack Overflow | 6 years ago | Melissa W
    java.sql.BatchUpdateException: null, message from server: "Duplicate entry '56' for key 'PRIMARY'"
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Not able to insert a record in mysql table with auto-increment key as PK

    Stack Overflow | 6 years ago | yogi
    java.sql.BatchUpdateException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM, TO, DISTANCE, TIME, ROUTE_ID) values ('A099', 'Hadapser', 'Pune Station', ' at line 1 at </code></pre> <hr> <pre><code>com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2024)
  6. 0

    Sonarqube 5.0 upgrade error

    Stack Overflow | 2 years ago | msa
    java.sql.BatchUpdateException: Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging. InnoDB is limited to row-logging when transaction isolation level is READ COMMITTED or READ UNCOMMITTED.

  1. linxiaolong 26 times, last 3 weeks ago
  2. linxiaolong 4 times, last 3 months ago
  3. mortalman7 32 times, last 5 months ago
9 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.SQLException

    Incorrect string value: '\xE2\x89\xA5 13...' for column 'value' at row 1

    at com.mysql.jdbc.SQLError.createSQLException()
  2. MySQL jdbc
    PreparedStatement.executeBatch
    1. com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1078)
    2. com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4120)
    3. com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4052)
    4. com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2503)
    5. com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2664)
    6. com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2815)
    7. com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2155)
    8. com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2458)
    9. com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2006)
    10. com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1467)
    10 frames
  3. Commons DBCP
    DelegatingStatement.executeBatch
    1. org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297)
    2. org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297)
    2 frames
  4. Hibernate
    AbstractCollectionPersister.recreate
    1. org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70)
    2. org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268)
    3. org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:114)
    4. org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:109)
    5. org.hibernate.jdbc.AbstractBatcher.prepareBatchStatement(AbstractBatcher.java:244)
    6. org.hibernate.persister.collection.AbstractCollectionPersister.recreate(AbstractCollectionPersister.java:1180)
    6 frames
  5. Hibernate
    CollectionRecreateAction.execute
    1. org.hibernate.action.CollectionRecreateAction.execute(CollectionRecreateAction.java:58)
    1 frame
  6. Hibernate
    ActionQueue.executeActions
    1. org.hibernate.engine.ActionQueue.execute(ActionQueue.java:267)
    2. org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:259)
    3. org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:182)
    3 frames
  7. Hibernate
    SessionImpl.flush
    1. org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
    2. org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51)
    3. org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1206)
    3 frames
  8. org.obiba.magma
    MultithreadedDatasourceCopier.copy
    1. org.obiba.magma.datasource.hibernate.HibernateValueTableWriter$HibernateVariableWriter.close(HibernateValueTableWriter.java:117)
    2. org.obiba.magma.support.DatasourceCopier.copyMetadata(DatasourceCopier.java:205)
    3. org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:161)
    4. org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:153)
    5. org.obiba.magma.support.MultithreadedDatasourceCopier.copyVariables(MultithreadedDatasourceCopier.java:215)
    6. org.obiba.magma.support.MultithreadedDatasourceCopier.write(MultithreadedDatasourceCopier.java:175)
    7. org.obiba.magma.support.MultithreadedDatasourceCopier.copy(MultithreadedDatasourceCopier.java:165)
    7 frames
  9. org.obiba.opal
    LockingActionTemplate$1.doInTransactionWithoutResult
    1. org.obiba.opal.core.service.impl.DefaultExportServiceImpl$ExportActionTemplate$ExportAction.exportTableToDatasource(DefaultExportServiceImpl.java:255)
    2. org.obiba.opal.core.service.impl.DefaultExportServiceImpl$ExportActionTemplate$ExportAction.execute(DefaultExportServiceImpl.java:227)
    3. org.obiba.opal.core.magma.concurrent.LockingActionTemplate$1.doInTransactionWithoutResult(LockingActionTemplate.java:47)
    3 frames
  10. Spring Tx
    TransactionTemplate.execute
    1. org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:33)
    2. org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)
    2 frames
  11. org.obiba.opal
    CommandJob.run
    1. org.obiba.opal.core.magma.concurrent.LockingActionTemplate.doInTransaction(LockingActionTemplate.java:42)
    2. org.obiba.opal.core.magma.concurrent.LockingActionTemplate.execute(LockingActionTemplate.java:31)
    3. org.obiba.opal.core.service.impl.DefaultExportServiceImpl.exportTablesToDatasource(DefaultExportServiceImpl.java:127)
    4. org.obiba.opal.shell.commands.CopyCommand.execute(CopyCommand.java:89)
    5. org.obiba.opal.shell.CommandJob.run(CommandJob.java:121)
    5 frames
  12. Shiro
    SubjectRunnable.run
    1. org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120)
    2. org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108)
    2 frames
  13. Java RT
    Thread.run
    1. java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    2. java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    3. java.util.concurrent.FutureTask.run(FutureTask.java:166)
    4. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    5. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    6. java.lang.Thread.run(Thread.java:636)
    6 frames