Issue Details (XML | Word | Printable)

Key: JDO-106
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Michelle Caisse
Reporter: Michelle Caisse
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
JDO

An attempt was made to put a data value of type 'byte[]' into a data value of type 'BIGINT'.

Created: 29/Jul/05 03:04 AM   Updated: 23/Apr/06 02:46 AM
Return to search
Component/s: tck2
Affects Version/s: None
Fix Version/s: JDO 2 beta

Time Tracking:
Not Specified

Resolution Date: 23/Apr/06 02:46 AM


 Description  « Hide
SQL Exception: An attempt was made to put a data value of type 'byte[]' into a data value of type 'BIGINT'.
Affected tests:
org.apache.jdo.tck.models.fieldtypes.TestArrayListCollections
org.apache.jdo.tck.models.fieldtypes.TestLinkedListCollections
org.apache.jdo.tck.models.fieldtypes.TestListCollections
org.apache.jdo.tck.models.fieldtypes.TestVectorCollections


test(org.apache.jdo.tck.models.fieldtypes.TestArrayListCollections)javax.jdo.JDODataStoreException: Cannot set Object parameter: value = org.apache.jdo.tck.pc.fieldtypes.SimpleClass@cc969a85
at org.jpox.store.rdbms.mapping.LongVarBinaryRDBMSMapping.setObject(LongVarBinaryRDBMSMapping.java:194)
at org.jpox.store.mapping.SingleFieldMapping.setObject(SingleFieldMapping.java:235)
at org.jpox.store.rdbms.scostore.AbstractCollectionStore.populateElementInStatement(AbstractCollectionStore.java:333)
at org.jpox.store.rdbms.scostore.AbstractListStore.internalAdd(AbstractListStore.java:1615)
at org.jpox.store.rdbms.scostore.AbstractListStore.addAll(AbstractListStore.java:333)
at org.jpox.store.mapping.ListMapping.postUpdate(ListMapping.java:269)
at org.jpox.store.rdbms.request.UpdateRequest.execute(UpdateRequest.java:266)
at org.jpox.store.rdbms.table.ClassTable.update(ClassTable.java:1810)
at org.jpox.store.StoreManager.update(StoreManager.java:710)
at org.jpox.state.StateManagerImpl.flush(StateManagerImpl.java:4069)
at org.jpox.AbstractPersistenceManager.flush(AbstractPersistenceManager.java:2917)
at org.jpox.NonmanagedTransaction.commit(NonmanagedTransaction.java:431)
at org.apache.jdo.tck.models.fieldtypes.TestArrayListCollections.runTest(TestArrayListCollections.java:105)
at org.apache.jdo.tck.models.fieldtypes.TestArrayListCollections.test(TestArrayListCollections.java:69)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at org.apache.jdo.tck.JDO_Test.runBare(JDO_Test.java:197)
at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:128)
at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:106)
NestedThrowablesStackTrace:
ERROR XCL12: An attempt was made to put a data value of type 'byte[]' into a data value of type 'BIGINT'.
at org.apache.derby.iapi.error.StandardException.newException(StandardException.java)
at org.apache.derby.iapi.types.DataType.throwLangSetMismatch(DataType.java)
at org.apache.derby.iapi.types.DataType.setValue(DataType.java)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement.setBytes(EmbedPreparedStatement.java)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.setBytes(NewProxyPreparedStatement.java:599)
at org.jpox.store.rdbms.mapping.LongVarBinaryRDBMSMapping.setObject(LongVarBinaryRDBMSMapping.java:189)
at org.jpox.store.mapping.SingleFieldMapping.setObject(SingleFieldMapping.java:235)
at org.jpox.store.rdbms.scostore.AbstractCollectionStore.populateElementInStatement(AbstractCollectionStore.java:333)
at org.jpox.store.rdbms.scostore.AbstractListStore.internalAdd(AbstractListStore.java:1615)
at org.jpox.store.rdbms.scostore.AbstractListStore.addAll(AbstractListStore.java:333)
at org.jpox.store.mapping.ListMapping.postUpdate(ListMapping.java:269)
at org.jpox.store.rdbms.request.UpdateRequest.execute(UpdateRequest.java:266)
at org.jpox.store.rdbms.table.ClassTable.update(ClassTable.java:1810)
at org.jpox.store.StoreManager.update(StoreManager.java:710)
at org.jpox.state.StateManagerImpl.flush(StateManagerImpl.java:4069)
at org.jpox.AbstractPersistenceManager.flush(AbstractPersistenceManager.java:2917)
at org.jpox.NonmanagedTransaction.commit(NonmanagedTransaction.java:431)
at org.apache.jdo.tck.models.fieldtypes.TestArrayListCollections.runTest(TestArrayListCollections.java:105)
at org.apache.jdo.tck.models.fieldtypes.TestArrayListCollections.test(TestArrayListCollections.java:69)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at org.apache.jdo.tck.JDO_Test.runBare(JDO_Test.java:197)
at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:128)
at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:106)

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Craig Russell made changes - 30/Jul/05 08:17 AM
Field Original Value New Value
Assignee Michelle Caisse [ mcaisse ]
Craig Russell added a comment - 30/Jul/05 08:17 AM
This is likely to be a mapping or schema issue.

Andy Jefferson added a comment - 11/Aug/05 11:06 PM
Looking at TestArrayListCollections, the message is now
test(org.apache.jdo.tck.models.fieldtypes.TestArrayListCollections)javax.jdo.JDODataStoreException: Cannot set Object parameter: value = org.apache.jdo.tck.pc.fieldtypes.SimpleClass@cc969a85 for column "applicationidentity0.ARRAYLIST_OF_OBJECT0.OBJREF" : An attempt was made to put a data value of type 'byte[]' into a data value of type 'BIGINT'.

Looking at field ArrayListOfObject0, it is ArrayList<Object> with a <join>, so hence we go to the join table "ARRAYLIST_OF_OBJECT0", and have a field to contain the Object called OBJREF. Since the element is an Object, and not a PersistenceCapable it is stored as serialised (by JPOX certainly, and I can't see why we should do different - the user can specify an ArrayList of "SimpleClass" if they want to store those). Hence the conclusion is that the schema is incorrect ARRAYLIST_OF_OBJECT0.OBJREF is a BIGINT, yet should be a LONG VARCHAR FOR BIT DATA

Michelle Caisse added a comment - 19/Aug/05 06:25 AM
We have agreed in principle on how to map Object types. Some issues remain, but I am entering new JIRAs for them.

Michelle Caisse made changes - 19/Aug/05 06:25 AM
Status Open [ 1 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]
Michelle Caisse made changes - 01/Nov/05 06:43 AM
Status Resolved [ 5 ] Closed [ 6 ]
Michael Bouschen added a comment - 23/Apr/06 02:43 AM
Reopened to set the Fix Version/s field to JDO 2 beta.

Michael Bouschen made changes - 23/Apr/06 02:43 AM
Resolution Fixed [ 1 ]
Status Closed [ 6 ] Reopened [ 4 ]
Michael Bouschen made changes - 23/Apr/06 02:46 AM
Fix Version/s JDO 2 beta [ 12310683 ]
Status Reopened [ 4 ] Closed [ 6 ]
Resolution Fixed [ 1 ]