java.sql.SQLException: Database operation failed. Update count for SQL statement was -2. Statement: INSERT INTO DB2ADMIN ANIMAL (JDOCLASS, JDOID, JDOVERSION, NAME0, PRICE) VALUES (?, ?, ?, ?, ?)

Oracle Community | 3004 | 1 decade ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    DB2 Batch Update Problem

    Oracle Community | 1 decade ago | 3004
    java.sql.SQLException: Database operation failed. Update count for SQL statement was -2. Statement: INSERT INTO DB2ADMIN ANIMAL (JDOCLASS, JDOID, JDOVERSION, NAME0, PRICE) VALUES (?, ?, ?, ?, ?)
  2. 0

    DB2 Batch Update Problem

    objectmix.com | 1 year ago
    java.sql.SQLException: Database operation failed. Update count for SQL statement was -2. Statement: INSERT INTO DB2ADMIN ANIMAL (JDOCLASS, JDOID, JDOVERSION, NAME0, PRICE) VALUES (?, ?, ?, ?, ?) at kodo.jdbc.sql.SQLExceptions.getFatalDataStore(SQLExceptions.java:42) at kodo.jdbc.sql.SQLExceptions.getFatalDataStore(SQLExceptions.java:24) at kodo.jdbc.runtime.JDBCStoreManager.flush(JDBCStoreManager.java:511) at kodo.runtime.DelegatingStoreManager.flush(DelegatingStoreManager.java:158) at kodo.runtime.PersistenceManagerImpl.flushInternal(PersistenceManagerImpl.ja= va:788) at kodo.runtime.PersistenceManagerImpl.beforeCompletion(PersistenceManagerImpl= ..java:644) at kodo.runtime.LocalManagedRuntime.commit(LocalManagedRuntime.java:69) at kodo.runtime.PersistenceManagerImpl.commit(PersistenceManagerImpl.java:416)

    Root Cause Analysis

    1. java.sql.SQLException

      Database operation failed. Update count for SQL statement was -2. Statement: INSERT IN TO DB2ADMIN.ANIMAL (JDOCLASS, JDOID, JDOVERSION, NAME0, PRICE) VALUES (?, ?, ?, ?, ?)

      at kodo.jdbc.runtime.PreparedStatementManager.checkUpdate()
    2. kodo.jdbc.runtime
      JDBCStoreManager.flush
      1. kodo.jdbc.runtime.PreparedStatementManager.checkUpdate(PreparedStatementManager.java:259)
      2. kodo.jdbc.runtime.PreparedStatementManager.flush(PreparedStatementManager.java:207)
      3. kodo.jdbc.runtime.UpdateManagerImpl.flush(UpdateManagerImpl.java:170)
      4. kodo.jdbc.runtime.UpdateManagerImpl.flush(UpdateManagerImpl.java:71)
      5. kodo.jdbc.runtime.JDBCStoreManager.flush(JDBCStoreManager.java:507)
      5 frames
    3. kodo.runtime
      PersistenceManagerImpl.commit
      1. kodo.runtime.DelegatingStoreManager.flush(DelegatingStoreManager.java:158)
      2. kodo.runtime.PersistenceManagerImpl.flushInternal(PersistenceManagerImpl.java:788)
      3. kodo.runtime.PersistenceManagerImpl.beforeCompletion(PersistenceManagerImpl.java:644)
      4. kodo.runtime.LocalManagedRuntime.commit(LocalManagedRuntime.java:69)
      5. kodo.runtime.PersistenceManagerImpl.commit(PersistenceManagerImpl.java:416)
      5 frames
    4. tutorial
      SeedDatabase.main
      1. tutorial.SeedDatabase.main(SeedDatabase.java:32)
      1 frame