Issue Details (XML | Word | Printable)

Key: JDO-104
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

Value is outside the range for the data type DOUBLE

Created: 27/Jul/05 07:55 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
value = 4.9E-324

Seven tests affected:
org.apache.jdo.tck.models.fieldtypes.TestArrayListCollections
org.apache.jdo.tck.models.fieldtypes.TestCollectionCollections
org.apache.jdo.tck.models.fieldtypes.TestHashSetCollections
org.apache.jdo.tck.models.fieldtypes.TestLinkedListCollections
org.apache.jdo.tck.models.fieldtypes.TestListCollections
org.apache.jdo.tck.models.fieldtypes.TestSetCollections
org.apache.jdo.tck.models.fieldtypes.TestVectorCollections

test(org.apache.jdo.tck.models.fieldtypes.TestArrayListCollections)javax.jdo.JDODataStoreException: Cannot set Object parameter: value = 4.9E-324
at org.jpox.store.rdbms.mapping.DoubleRDBMSMapping.setObject(DoubleRDBMSMapping.java:233)
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 22003: The resulting value is outside the range for the data type DOUBLE.
at org.apache.derby.iapi.error.StandardException.newException(StandardException.java)
at org.apache.derby.iapi.types.NumberDataType.normalizeDOUBLE(NumberDataType.java)
at org.apache.derby.iapi.types.SQLDouble.setValue(SQLDouble.java)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement.setDouble(EmbedPreparedStatement.java)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.setDouble(NewProxyPreparedStatement.java:206)
at org.jpox.store.rdbms.mapping.DoubleRDBMSMapping.setObject(DoubleRDBMSMapping.java:228)
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
Repository Revision Date User Message
ASF #225831 Thu Jul 28 17:43:52 UTC 2005 mcaisse JDO-104: Value is outside the range for the data type DOUBLE
Files Changed
MODIFY /incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/SecondSetOfTestValuesForCollection.java
MODIFY /incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/FirstSetOfTestValuesForCollection.java
MODIFY /incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestFieldsOfFloat.java

Michelle Caisse made changes - 29/Jul/05 01:16 AM
Field Original Value New Value
Assignee Michelle Caisse [ mcaisse ]
Michelle Caisse added a comment - 29/Jul/05 01:18 AM
ANDY: The test is trying to use a Collection of doubles, and insert Java values of Double.MAX_SIZE into a Derby DOUBLE column, which will always be touch and go with rounding issues etc (and whether the RDBMS in question complains when the value is just outside its range, which Derby does, but MySQL doesn't).

 I look at the TestFieldsOfDouble and see that the largest value used in that test for a Double is AllTypes.DOUBLE_LARGEST = 9999999999999.9 Should we not be using the same values (whatever they are) in the collection/list/set tests, so we have consistency ?

CRAIG: Yes, this was an oversight. We intended that DOUBLE_LARGEST would be used instead of the Double.MAX_SIZE.

Michelle Caisse added a comment - 29/Jul/05 02:45 AM
Replaced all occurences of Double.MAX_VALUE, Double.MIN_VALUE, Float.MAX_VALUE, and Float.MIN_VALUE with AllTypes.DOUBLE_LARGEST, AllTypes.DOUBLE_SMALLEST, AllTypes.FLOAT_LARGEST, AllTypes.FLOAT_SMALLEST, respectively.

Michelle Caisse made changes - 29/Jul/05 02:45 AM
Resolution Fixed [ 1 ]
Status Open [ 1 ] Resolved [ 5 ]
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
Status Reopened [ 4 ] Closed [ 6 ]
Fix Version/s JDO 2 beta [ 12310683 ]
Resolution Fixed [ 1 ]