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

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Oracle Community by 3004, 1 year ago
Database operation failed. Update count for SQL statement was -2. Statement: INSERT INTO DB2ADMIN ANIMAL (JDOCLASS, JDOID, JDOVERSION, NAME0, PRICE) VALUES (?, ?, ?, ?, ?)
via Oracle Community by 3004, 1 year ago
ORA-01400: cannot insert NULL into ("VFTEST"."AAA_DOCUMENT"."FLD_RSN")
via Oracle Community by 3004, 1 year ago
ORA-01407: cannot update ("CS2"."OBLIGATION"."CONTRACT_ID") to NULL
via Oracle Community by 3004, 6 months ago
Cannot insert duplicate key row in object 'CHILDREN' with unique index 'CHILD_UNQ'.
via Oracle Community by 666705, 1 year ago
Column not found: SEQ_CHANNEL_PLANS.NEXTVAL in statement [select seq_channel_plans.NEXTVAL from DUAL]
via Oracle Community by 3004, 1 year ago
Missing IN or OUT parameter at index:: 2
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)
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)

Users with the same issue

You are the first who have seen this exception.

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.