java.sql.SQLException

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

Samebug tips0

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web1

  • via Unknown by 3004,
  • Stack trace

    • 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.java: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) at tutorial.SeedDatabase.main(SeedDatabase.java:32) Caused by: 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(PreparedStatementManager.java:259) at kodo.jdbc.runtime.PreparedStatementManager.flush(PreparedStatementManager.java:207) at kodo.jdbc.runtime.UpdateManagerImpl.flush(UpdateManagerImpl.java:170) at kodo.jdbc.runtime.UpdateManagerImpl.flush(UpdateManagerImpl.java:71) at kodo.jdbc.runtime.JDBCStoreManager.flush(JDBCStoreManager.java:507) ... 6 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    We couldn't find other users who have seen this exception.