java.sql.BatchUpdateException: failed batch

JIRA | Peter Adams | 4 months ago
  1. 0

    To try and avoid dropping history rather than deleting a plan and recreating I was trying to leave the the plan in place but remove and recreate the internals. This appears to trigger bad behaviour when a job is recreated. Completely deleting the plan and recreating resets to good. To see the problem run the following.. --action createPlan --plan TEST-T1 --name TestName --project TestProject --action addStage --plan TEST-T1 --stage "Test Stage" --action addJob --plan TEST-T1 --stage "@stage@" --job "Default Job" --action removeStage --plan TEST-T1 --id -1 --action addStage --plan TEST-T1 --stage "Test Stage" --action addJob --plan TEST-T1 --stage "@stage@" --job "Default Job" This gives the result Run: --action createPlan --plan TEST-T1 --name TestName --project TestProject Plan TEST-T1 created with name 'TestName'. Run: --action addStage --plan TEST-T1 --stage "Test Stage" Stage 'Test Stage' added to plan TEST-T1. Run: --action addJob --plan TEST-T1 --stage "Test Stage" --job "Default Job" Job DEFAULTJOB added to stage 'Test Stage' in plan TEST-T1. Run: --action removeStage --plan TEST-T1 --id -1 Stage 'Test Stage' removed from plan TEST-T1. 1 stages removed. # Remake stage and job. Run: --action addStage --plan TEST-T1 --stage "Test Stage" Stage 'Test Stage' added to plan TEST-T1. Run: --action addJob --plan TEST-T1 --stage "Test Stage" --job "Default Job" Remote error: Hibernate flushing: Could not execute JDBC batch update; uncategorized SQLException for SQL [insert into BUILD (CREATED_DATE, UPDATED_DA TE, FULL_KEY, BUILDKEY, TITLE, DESCRIPTION, SUSPENDED_FROM_BUILDING, MARKED_FOR_DELETION, OID, PROJECT_ID, MASTER_ID, REQUIREMENT_SET, STAGE_ID, BUILD _TYPE, BUILD_ID) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 'JOB', ?)]; SQL state [null]; error code [0]; failed batch; nested exception is java.s ql.BatchUpdateException: failed batch Client error: 1 actions failed, 5 actions were successful from file: E:\CLI\ppaTestFail.txt Is it possible that removing the stage does not correctly remove the contained jobs? I could be wrong but it feels like it should. My original use case also gave the exception as below. I'm not sure why my canned example above didn't Remote error: Hibernate flushing: Could not execute JDBC batch update; uncategorized SQLException for SQL [insert into BUILD (CREATED_DATE, UPDATED_D TE, FULL_KEY, BUILDKEY, TITLE, DESCRIPTION, SUSPENDED_FROM_BUILDING, MARKED_FOR_DELETION, OID, PROJECT_ID, MASTER_ID, REQUIREMENT_SET, STAGE_ID, BUIL _TYPE, BUILD_ID) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 'JOB', ?)]; SQL state [null]; error code [0]; failed batch; nested exception is java. ql.BatchUpdateException: failed batch org.swift.common.cli.AbstractRemoteClient$RemoteRestException: Hibernate flushing: Could not execute JDBC batch update; uncategorized SQLException fo SQL [insert into BUILD (CREATED_DATE, UPDATED_DATE, FULL_KEY, BUILDKEY, TITLE, DESCRIPTION, SUSPENDED_FROM_BUILDING, MARKED_FOR_DELETION, OID, PROJE T_ID, MASTER_ID, REQUIREMENT_SET, STAGE_ID, BUILD_TYPE, BUILD_ID) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 'JOB', ?)]; SQL state [null]; error ode [0]; failed batch; nested exception is java.sql.BatchUpdateException: failed batch at org.swift.common.cli.AbstractRestClient.printErrorMessages(AbstractRestClient.java:293) at org.swift.common.cli.AbstractRestClient.restRequestWithUrlConnection(AbstractRestClient.java:719) at org.swift.common.cli.AbstractRestClient.restRequestWithFullUrl(AbstractRestClient.java:573) at org.swift.common.cli.AbstractRestClient.restRequestWithFullUrl(AbstractRestClient.java:544) at org.swift.common.cli.AbstractRestClient.restRequest(AbstractRestClient.java:519) at org.swift.common.cli.AbstractRestClient.restRequest(AbstractRestClient.java:507) at org.swift.common.cli.AbstractRestClient.restRequest(AbstractRestClient.java:491) at org.swift.bamboo.cli.AppfireClientForBamboo.addJob(AppfireClientForBamboo.java:141) at org.swift.bamboo.cli.helpers.PlanHelper.addJob(PlanHelper.java:862) at org.swift.bamboo.cli.BambooClient.handleRequest(BambooClient.java:711) at org.swift.common.cli.AbstractRemoteClient.process(AbstractRemoteClient.java:448) at org.swift.common.cli.CliClient.doWork(CliClient.java:454) at org.swift.common.cli.CliClient.doWork(CliClient.java:521) at org.swift.common.cli.CliClient.doWork(CliClient.java:517) at org.swift.common.cli.CliClient.processRunLine(CliClient.java:1253) at org.swift.common.cli.AbstractRemoteClient.processRunLine(AbstractRemoteClient.java:777) at org.swift.common.cli.CliClient.doSingleRunLine(CliClient.java:1225) at org.swift.common.cli.CliClient.run(CliClient.java:1086) at org.swift.bamboo.cli.BambooClient.handleRequest(BambooClient.java:528) at org.swift.common.cli.AbstractRemoteClient.process(AbstractRemoteClient.java:448) at org.swift.common.cli.CliClient.doWork(CliClient.java:454) at org.swift.bamboo.cli.BambooClient.main(BambooClient.java:252) Client error: 1 actions failed, 8 actions were successful from file: E:\CLI\ppaTestScript.txt org.swift.common.cli.CliClient$ClientException: 1 actions failed, 8 actions were successful from file: E:\CLI\ppaTestScript.txt at org.swift.common.cli.CliClient.run(CliClient.java:1159) at org.swift.bamboo.cli.BambooClient.handleRequest(BambooClient.java:528) at org.swift.common.cli.AbstractRemoteClient.process(AbstractRemoteClient.java:448) at org.swift.common.cli.CliClient.doWork(CliClient.java:454) at org.swift.bamboo.cli.BambooClient.main(BambooClient.java:252)

    JIRA | 4 months ago | Peter Adams
    java.sql.BatchUpdateException: failed batch
  2. 0

    how to get a complete stack trace in android?

    Stack Overflow | 4 years ago | Sakthimuthiah
    java.sql.BatchUpdateException: failed batch
  3. 0

    Error in job template 'Copy employees to customer table.analysis.xml'

    GitHub | 1 year ago | ClaudiaPHI
    org.apache.metamodel.MetaModelException: Could not execute batch: org.hsqldb.jdbc.jdbcPreparedStatement@c13e4ec[sql=[INSERT INTO PUBLIC."CUSTOMERS" (CUSTOMERNUMBER,CUSTOMERNAME,CONTACTLASTNAME,CONTACTFIRSTNAME,PHONE,ADDRESSLINE1,CITY,COUNTRY,SALESREPEMPLOYEENUMBER) VALUES (?,?,?,?,?,?,?,?,?)], parameters=[[5023], [My company], [Gerard], [Martin], [My phone no], [My address], [My city], [My country], [1702]]]: failed batch
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

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

    hivmr.com | 4 months ago
    org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update
  6. 0

    Java crumbs » Blog Archive » Flushing Hibernate

    krecan.net | 3 months ago
    org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update

    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

      failed batch

      at org.swift.common.cli.AbstractRestClient.printErrorMessages()
    2. org.swift.common
      AbstractRestClient.restRequest
      1. org.swift.common.cli.AbstractRestClient.printErrorMessages(AbstractRestClient.java:293)
      2. org.swift.common.cli.AbstractRestClient.restRequestWithUrlConnection(AbstractRestClient.java:719)
      3. org.swift.common.cli.AbstractRestClient.restRequestWithFullUrl(AbstractRestClient.java:573)
      4. org.swift.common.cli.AbstractRestClient.restRequestWithFullUrl(AbstractRestClient.java:544)
      5. org.swift.common.cli.AbstractRestClient.restRequest(AbstractRestClient.java:519)
      6. org.swift.common.cli.AbstractRestClient.restRequest(AbstractRestClient.java:507)
      7. org.swift.common.cli.AbstractRestClient.restRequest(AbstractRestClient.java:491)
      7 frames
    3. org.swift.bamboo
      BambooClient.handleRequest
      1. org.swift.bamboo.cli.AppfireClientForBamboo.addJob(AppfireClientForBamboo.java:141)
      2. org.swift.bamboo.cli.helpers.PlanHelper.addJob(PlanHelper.java:862)
      3. org.swift.bamboo.cli.BambooClient.handleRequest(BambooClient.java:711)
      3 frames
    4. org.swift.common
      CliClient.run
      1. org.swift.common.cli.AbstractRemoteClient.process(AbstractRemoteClient.java:448)
      2. org.swift.common.cli.CliClient.doWork(CliClient.java:454)
      3. org.swift.common.cli.CliClient.doWork(CliClient.java:521)
      4. org.swift.common.cli.CliClient.doWork(CliClient.java:517)
      5. org.swift.common.cli.CliClient.processRunLine(CliClient.java:1253)
      6. org.swift.common.cli.AbstractRemoteClient.processRunLine(AbstractRemoteClient.java:777)
      7. org.swift.common.cli.CliClient.doSingleRunLine(CliClient.java:1225)
      8. org.swift.common.cli.CliClient.run(CliClient.java:1086)
      8 frames
    5. org.swift.bamboo
      BambooClient.handleRequest
      1. org.swift.bamboo.cli.BambooClient.handleRequest(BambooClient.java:528)
      1 frame
    6. org.swift.common
      CliClient.doWork
      1. org.swift.common.cli.AbstractRemoteClient.process(AbstractRemoteClient.java:448)
      2. org.swift.common.cli.CliClient.doWork(CliClient.java:454)
      2 frames
    7. org.swift.bamboo
      BambooClient.main
      1. org.swift.bamboo.cli.BambooClient.main(BambooClient.java:252)
      1 frame