DataNucleus JIRA is now in read-only mode. Raise any new issues in GitHub against the plugin that it applies to. DataNucleus JIRA will remain for the foreseeable future but will eventually be discontinued
Issue Details (XML | Word | Printable)

Key: NUCRDBMS-204
Type: Bug Bug
Status: Closed Closed
Resolution: Cannot Reproduce
Priority: Major Major
Assignee: Unassigned
Reporter: Yang ZHONG
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
DataNucleus Store RDBMS

DB2 : don't support Boolean mapped to DB2 SmallInt

Created: 21/Jun/09 07:38 AM   Updated: 20/Oct/10 09:30 AM   Resolved: 13/Oct/10 08:28 AM
Component/s: None
Affects Version/s: 1.1.3, 1.1.4
Fix Version/s: 2.1.2, 2.2.0.m2

File Attachments: 1. Zip Archive 204.zip (3 kB)

Environment: Linux, JDK 5, DB2 9.1.0.2

Forum Thread URL: HTTP://WWW.JPOx.org/servlet/forum/viewthread_thread,5222
Datastore: IBM DB2
Severity: Production


 Description  « Hide
javax.jdo.JDODataStoreException: Insert of object "org.datanucleus.test.Bool@73ed73ed" using statement "INSERT INTO BOOL (BOOL_ID,BOOL) VALUES (?,?)" failed : DB2 SQL Error: SQLCODE=-313, SQLSTATE=07001, SQLERRMC=null, DRIVER=3.53.95
        at org.datanucleus.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDOHelper.java:304)
        at org.datanucleus.jdo.JDOPersistenceManager.jdoMakePersistent(JDOPersistenceManager.java:674)
        at org.datanucleus.jdo.JDOPersistenceManager.makePersistent(JDOPersistenceManager.java:694)
        at org.datanucleus.test.Main.main(Main.java:52)
NestedThrowablesStackTrace:
com.ibm.db2.jcc.b.SqlException: DB2 SQL Error: SQLCODE=-313, SQLSTATE=07001, SQLERRMC=null, DRIVER=3.53.95
        at com.ibm.db2.jcc.b.bd.a(bd.java:679)
        at com.ibm.db2.jcc.b.bd.a(bd.java:60)
        at com.ibm.db2.jcc.b.bd.a(bd.java:127)
        at com.ibm.db2.jcc.b.gm.b(gm.java:2142)
        at com.ibm.db2.jcc.b.gm.c(gm.java:2125)
        at com.ibm.db2.jcc.t4.db.k(db.java:353)
        at com.ibm.db2.jcc.t4.db.a(db.java:59)
        at com.ibm.db2.jcc.t4.t.a(t.java:50)
        at com.ibm.db2.jcc.t4.tb.b(tb.java:200)
        at com.ibm.db2.jcc.b.hm.ac(hm.java:2452)
        at com.ibm.db2.jcc.b.hm.e(hm.java:3294)
        at com.ibm.db2.jcc.b.hm.Sb(hm.java:619)
        at com.ibm.db2.jcc.b.hm.executeUpdate(hm.java:602)
        at org.datanucleus.store.rdbms.SQLController.executeStatementUpdate(SQLController.java:391)
        at org.datanucleus.store.rdbms.request.InsertRequest.execute(InsertRequest.java:406)
        at org.datanucleus.store.rdbms.RDBMSPersistenceHandler.insertTable(RDBMSPersistenceHandler.java:141)
        at org.datanucleus.store.rdbms.RDBMSPersistenceHandler.insertObject(RDBMSPersistenceHandler.java:120)
        at org.datanucleus.state.JDOStateManagerImpl.internalMakePersistent(JDOStateManagerImpl.java:3185)
        at org.datanucleus.state.JDOStateManagerImpl.makePersistent(JDOStateManagerImpl.java:3161)
        at org.datanucleus.ObjectManagerImpl.persistObjectInternal(ObjectManagerImpl.java:1298)
        at org.datanucleus.ObjectManagerImpl.persistObject(ObjectManagerImpl.java:1175)
        at org.datanucleus.jdo.JDOPersistenceManager.jdoMakePersistent(JDOPersistenceManager.java:669)
        at org.datanucleus.jdo.JDOPersistenceManager.makePersistent(JDOPersistenceManager.java:694)
        at org.datanucleus.test.Main.main(Main.java:52)

Sort Order: Ascending order - Click to sort in descending order
Yang ZHONG added a comment - 21/Jun/09 07:46 AM
Besides insertion failure, update also fails such as (DataNucleus 1.1.3):

Update of object "my.Jdo@5e805e8" using statement "UPDATE MyJDO SET bool_X=?, ... WHERE PK_X=?" failed : com.ibm.db2.jcc.b.eo: [jcc][10143][10845][3.53.95] Invalid parameter 1: Parameter is not set nor registered. ERRORCODE=-4461, SQLSTATE=42815
    at com.ibm.db2.jcc.b.bd.a(bd.java:676)
    at com.ibm.db2.jcc.b.bd.a(bd.java:60)
    at com.ibm.db2.jcc.b.bd.a(bd.java:103)
    at com.ibm.db2.jcc.b.hm.sc(hm.java:4276)
    at com.ibm.db2.jcc.b.hm.e(hm.java:2989)
    at com.ibm.db2.jcc.b.hm.Sb(hm.java:619)
    at com.ibm.db2.jcc.b.hm.executeUpdate(hm.java:602)
    at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:102)
    at org.datanucleus.store.rdbms.SQLController.executeStatementUpdate(SQLController.java:391)
    at org.datanucleus.store.rdbms.request.UpdateRequest.execute(UpdateRequest.java:351)
    at org.datanucleus.store.rdbms.RDBMSPersistenceHandler.updateTable(RDBMSPersistenceHandler.java:359)
    at org.datanucleus.store.rdbms.RDBMSPersistenceHandler.updateObject(RDBMSPersistenceHandler.java:335)
    at org.datanucleus.state.JDOStateManagerImpl.flush(JDOStateManagerImpl.java:4488)
    at org.datanucleus.ObjectManagerImpl.flushInternal(ObjectManagerImpl.java:2841)
    at org.datanucleus.ObjectManagerImpl.flush(ObjectManagerImpl.java:2781)
    at org.datanucleus.ObjectManagerImpl.preCommit(ObjectManagerImpl.java:2920)
    at org.datanucleus.TransactionImpl.internalPreCommit(TransactionImpl.java:364)
    at org.datanucleus.TransactionImpl.commit(TransactionImpl.java:251)
    at org.datanucleus.jdo.JDOTransaction.commit(JDOTransaction.java:83)

Yang ZHONG added a comment - 29/Jul/09 01:12 AM - edited
The stack trace is the exactly same for DataNucleus 1.1.5, as well as 1.1.6.

Andy Jefferson added a comment - 13/Oct/10 08:28 AM
Works for me with all current versions