java.sql.BatchUpdateException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • h3. Summary When trying to save or edit a question with an image attachment, an error is thrown, and the question cannot be saved. This also applies to questions with attachments that are edited after the fact (i.e. questions with attachments cannot be edited). h3. Steps to Reproduce # Ask a question in Questions for Confluence # Add an image attachment in the question # Add a “Popular topic” # Click *Save* h3. Expected Results The question is saved and posted. h3. Actual Results The below exception is thrown in the Confluence Log file: {noformat} org.springframework.dao.DataIntegrityViolationException: Hibernate operation: Could not execute JDBC batch update; SQL []; Batch entry 0 insert into IMAGEDETAILS (HEIGHT, WIDTH, MIMETYPE, ATTACHMENTID) values (482, 630, 'image/jpeg', 17137749) was aborted. Call getNextException to see the cause.; nested exception is java.sql.BatchUpdateException: Batch entry 0 insert into IMAGEDETAILS (HEIGHT, WIDTH, MIMETYPE, ATTACHMENTID) values (482, 630, 'image/jpeg', 17137749) was aborted. Call getNextException to see the cause. at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:102) caused by: java.sql.BatchUpdateException: Batch entry 0 insert into IMAGEDETAILS (HEIGHT, WIDTH, MIMETYPE, ATTACHMENTID) values (482, 630, 'image/jpeg', 17137749) was aborted. Call getNextException to see the cause. at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError(AbstractJdbc2Statement.java:2746) Caused by: java.sql.BatchUpdateException: Batch entry 0 insert into IMAGEDETAILS (HEIGHT, WIDTH, MIMETYPE, ATTACHMENTID) values (482, 630, 'image/jpeg', 17137749) was aborted. Call getNextException to see the cause. at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError(AbstractJdbc2Statement.java:2746) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1887) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:405) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:2893) at sun.reflect.GeneratedMethodAccessor621.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.github.gquintana.metrics.proxy.MethodInvocation.proceed(MethodInvocation.java:75) at com.github.gquintana.metrics.sql.AbstractStatementProxyHandler.invoke(AbstractStatementProxyHandler.java:64) at com.github.gquintana.metrics.proxy.ProxyHandler.invoke(ProxyHandler.java:73) at com.sun.proxy.$Proxy525.executeBatch(Unknown Source) at org.apache.tomcat.dbcp.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297) at org.apache.tomcat.dbcp.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297) at org.apache.tomcat.dbcp.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297) at net.sf.hibernate.impl.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:54) at net.sf.hibernate.impl.BatcherImpl.executeBatch(BatcherImpl.java:128) at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2465) at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2419) at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2288) at net.sf.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:61) at org.springframework.orm.hibernate.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:510) ... 400 more caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "imagedetails_pkey" {noformat} h3. Notes This occurs with or without assigning a question to a space. It has been reproduced in Confluence Cloud version 1000.122.0 and Questions for Confluence version 2.4.14-D20160504T221817. h3.Workaround Add image attachment as a comment to the question instead of directly in the question.
    via by Rachel Fuerst [Atlassian],
  • Openfire SSO on Windows - Spiceworks
    via by Unknown author,
  • ImageMosaic-JDBC Error
    via Geographic Information Systems by user17653
    ,
    • java.sql.BatchUpdateException: Batch entry 0 insert into IMAGEDETAILS (HEIGHT, WIDTH, MIMETYPE, ATTACHMENTID) values (482, 630, 'image/jpeg', 17137749) was aborted. Call getNextException to see the cause. at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError(AbstractJdbc2Statement.java:2746) Caused by: java.sql.BatchUpdateException: Batch entry 0 insert into IMAGEDETAILS (HEIGHT, WIDTH, MIMETYPE, ATTACHMENTID) values (482, 630, 'image/jpeg', 17137749) was aborted. Call getNextException to see the cause. at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError(AbstractJdbc2Statement.java:2746) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1887) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:405) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:2893) at sun.reflect.GeneratedMethodAccessor621.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.github.gquintana.metrics.proxy.MethodInvocation.proceed(MethodInvocation.java:75) at com.github.gquintana.metrics.sql.AbstractStatementProxyHandler.invoke(AbstractStatementProxyHandler.java:64) at com.github.gquintana.metrics.proxy.ProxyHandler.invoke(ProxyHandler.java:73) at com.sun.proxy.$Proxy525.executeBatch(Unknown Source) at org.apache.tomcat.dbcp.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297) at org.apache.tomcat.dbcp.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297) at org.apache.tomcat.dbcp.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297) at net.sf.hibernate.impl.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:54) at net.sf.hibernate.impl.BatcherImpl.executeBatch(BatcherImpl.java:128) at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2465) at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2419) at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2288) at net.sf.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:61) at org.springframework.orm.hibernate.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:510) ... 1 more

    Users with the same issue

    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    6 more bugmates