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

Atlassian JIRA | Kah Loun Foong [Atlassian] | 4 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    [FE-4562] Renaming a user to a deleted user fails - Atlassian JIRA

    atlassian.com | 2 years ago
    javax.servlet.ServletException: org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update
  2. 0

    h3.Steps to reproduce # Create users: UserA and UserB # Add UserA to a group 'GroupA' # Delete UserB # Rename UserA to be UserB # It fail with the following errors in {{atlassian-fisheye-<date>.log}}: {noformat} 2013-03-13 21:26:12,605 WARN [btpool0-30 ] org.hibernate.util.JDBCExceptionReporter JDBCExceptionReporter-logExceptions - SQL Error: 0, SQLState: null 2013-03-13 21:26:12,628 ERROR [btpool0-30 ] org.hibernate.util.JDBCExceptionReporter JDBCExceptionReporter-logExceptions - failed batch 2013-03-13 21:26:12,630 ERROR [btpool0-30 ] org.hibernate.event.def.AbstractFlushingEventListener AbstractFlushingEventListener-performExecutions - 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.engine.ActionQueue.executeActions(ActionQueue.java:262) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:179) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321) ... Caused by: java.sql.BatchUpdateException: failed batch ... 2013-03-13 21:26:12,960 ERROR [btpool0-30 ] fisheye TotalityFilter-logExceptionDetails - Exception "org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update" (javax.servlet.ServletException) while processing "/admin/userRename.do" (Referer:"http://localhost:8060/admin/userRename-default.do") javax.servlet.ServletException: org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update at com.opensymphony.webwork.dispatcher.DispatcherUtils.serviceAction(DispatcherUtils.java:284) at com.opensymphony.webwork.dispatcher.ServletDispatcher.service(ServletDispatcher.java:111) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) at org.mortbay.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1272) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:66) at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:25) ... Caused by: org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update ... Caused by: java.sql.BatchUpdateException: failed batch ... 2013-03-13 21:26:12,983 ERROR [btpool0-30 ] org.mortbay.log Slf4jLog-warn - /admin/userRename.do 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.engine.ActionQueue.executeActions(ActionQueue.java:262) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:179) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321) ... Caused by: java.sql.BatchUpdateException: failed batch {noformat} # Check the group that belongs to UserA

    Atlassian JIRA | 4 years ago | Kah Loun Foong [Atlassian]
    javax.servlet.ServletException: org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update
  3. 0

    h3.Steps to reproduce # Create users: UserA and UserB # Add UserA to a group 'GroupA' # Delete UserB # Rename UserA to be UserB # It fail with the following errors in {{atlassian-fisheye-<date>.log}}: {noformat} 2013-03-13 21:26:12,605 WARN [btpool0-30 ] org.hibernate.util.JDBCExceptionReporter JDBCExceptionReporter-logExceptions - SQL Error: 0, SQLState: null 2013-03-13 21:26:12,628 ERROR [btpool0-30 ] org.hibernate.util.JDBCExceptionReporter JDBCExceptionReporter-logExceptions - failed batch 2013-03-13 21:26:12,630 ERROR [btpool0-30 ] org.hibernate.event.def.AbstractFlushingEventListener AbstractFlushingEventListener-performExecutions - 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.engine.ActionQueue.executeActions(ActionQueue.java:262) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:179) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321) ... Caused by: java.sql.BatchUpdateException: failed batch ... 2013-03-13 21:26:12,960 ERROR [btpool0-30 ] fisheye TotalityFilter-logExceptionDetails - Exception "org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update" (javax.servlet.ServletException) while processing "/admin/userRename.do" (Referer:"http://localhost:8060/admin/userRename-default.do") javax.servlet.ServletException: org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update at com.opensymphony.webwork.dispatcher.DispatcherUtils.serviceAction(DispatcherUtils.java:284) at com.opensymphony.webwork.dispatcher.ServletDispatcher.service(ServletDispatcher.java:111) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) at org.mortbay.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1272) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:66) at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:25) ... Caused by: org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update ... Caused by: java.sql.BatchUpdateException: failed batch ... 2013-03-13 21:26:12,983 ERROR [btpool0-30 ] org.mortbay.log Slf4jLog-warn - /admin/userRename.do 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.engine.ActionQueue.executeActions(ActionQueue.java:262) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:179) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321) ... Caused by: java.sql.BatchUpdateException: failed batch {noformat} # Check the group that belongs to UserA

    Atlassian JIRA | 4 years ago | Kah Loun Foong [Atlassian]
    javax.servlet.ServletException: org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    {code} 2013-08-22 04:28:16,645 ERROR - Exception "org.hibernate.exception.ConstraintViolationException: could not insert: [com.cenqua.crucible.model.ReviewParticipant]" (javax.servlet.ServletException) while processing "/json/cru/CR-1/postDetails" (Referer:"https://acsfisheye.honeywell.com/cru/CR-1") javax.servlet.ServletException: org.hibernate.exception.ConstraintViolationException: could not insert: [com.cenqua.crucible.model.ReviewParticipant] at com.opensymphony.webwork.dispatcher.DispatcherUtils.serviceAction(DispatcherUtils.java:284) at com.opensymphony.webwork.dispatcher.ServletDispatcher.service(ServletDispatcher.java:111) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) at org.mortbay.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1272) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:66) at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:25) … Caused by: org.hibernate.exception.ConstraintViolationException: could not insert: [com.cenqua.crucible.model.ReviewParticipant] at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:96) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2438) … Caused by: java.sql.SQLException: Violation of UNIQUE KEY constraint 'UQ__cru_revi__5067DE081332DBDC'. Cannot insert duplicate key in object 'dbo.cru_review_participant'. The duplicate key value is (7983, 12). at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:368) at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2820) at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2258) at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:632) {code} Seen from support Likely a similar cause to [CRUC-6577|https://jira.atlassian.com/browse/CRUC-6577] but I have not been able to reproduce it

    Atlassian JIRA | 4 years ago | Richard Stephens [Atlassian]
    javax.servlet.ServletException: org.hibernate.exception.ConstraintViolationException: could not insert: [com.cenqua.crucible.model.ReviewParticipant]
  6. 0

    h3.Steps to reproduce # Edit a review # Change the project to a non-existing project # Click done (there is no changes and error) # Edit the review again # Change the project to a non-existing project # Add a reviewer to the review # Click done and the following error happen: {noformat} 2013-05-03 16:08:44,739 ERROR [btpool0-12 ] fisheye TotalityFilter-logExceptionDetails - Exception "java.lang.NullPointerException" (javax.servlet.ServletException) while processing "/cru/postDetails.do" (Referer:"http://localhost:8060/cru/CR-1") javax.servlet.ServletException: java.lang.NullPointerException at com.opensymphony.webwork.dispatcher.DispatcherUtils.serviceAction(DispatcherUtils.java:284) at com.opensymphony.webwork.dispatcher.ServletDispatcher.service(ServletDispatcher.java:111) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) at org.mortbay.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1272) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:66) at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:25) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:74) ... Caused by: java.lang.NullPointerException at com.atlassian.crucible.actions.create.EditReviewDetailsAction.execute(EditReviewDetailsAction.java:338) 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.opensymphony.xwork.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:358) at com.opensymphony.xwork.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:218) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:192) at com.cenqua.crucible.interceptors.ReviewInterceptor.intercept(ReviewInterceptor.java:51) {noformat}

    Atlassian JIRA | 4 years ago | Kah Loun Foong [Atlassian]
    javax.servlet.ServletException: java.lang.NullPointerException

    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. javax.servlet.ServletException

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

      at com.opensymphony.webwork.dispatcher.DispatcherUtils.serviceAction()
    2. WebWork
      ServletDispatcher.service
      1. com.opensymphony.webwork.dispatcher.DispatcherUtils.serviceAction(DispatcherUtils.java:284)
      2. com.opensymphony.webwork.dispatcher.ServletDispatcher.service(ServletDispatcher.java:111)
      2 frames
    3. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
      1 frame
    4. Jetty Server
      ServletHandler$Chain.doFilter
      1. org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
      2. org.mortbay.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1272)
      2 frames
    5. com.atlassian.plugin
      DelegatingPluginFilter$1.doFilter
      1. com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46)
      2. com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:66)
      2 frames
    6. com.atlassian.applinks
      ContextFilter.doFilter
      1. com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:25)
      1 frame