Hey all,
I have two tables [entities] Product <<-----> Measurement.
Measurement is a lookup table.
I create and register a new product and then call it's
setToMeasurement() method. It looks as if setting the reverse
relationship is failing.
This used to work w/o any problems, but broke recently...I have not
changed the model aside from adding some methods to the subclasses of
the entities [none of which are called explicitly or implicitly].
Using Cayenne v1.03 and postgresql 7.3.
Any ideas?
Upon calling product.setToMeasurement(measurement) I get the following
exception:
[java] cayenne INFO [main 12-10 12:21:26] QueryLogger: Created
connection pool: jdbc:postgresql://xxxxx
[java] Driver class: org.postgresql.Driver
[java] Min. connections in the pool: 1
[java] Max. connections in the pool: 5
[java] Login: xxxxx
[java] Password: *******
[java] cayenne DEBUG [main 12-10 12:21:26] RuntimeLoadDelegate:
loaded datasource.
[java] cayenne DEBUG [main 12-10 12:21:26] RuntimeLoadDelegate:
loaded map-ref: contactMap.
[java] cayenne DEBUG [main 12-10 12:21:26] RuntimeLoadDelegate:
loaded map-ref: catalogMap.
[java] cayenne DEBUG [main 12-10 12:21:26] RuntimeLoadDelegate:
loaded map-ref: sharedMap.
[java] cayenne DEBUG [main 12-10 12:21:26] RuntimeLoadDelegate:
loaded map-ref: adminMap.
[java] cayenne DEBUG [main 12-10 12:21:26] Configuration: added
domain: dev
[java] cayenne DEBUG [main 12-10 12:21:26] RuntimeLoadDelegate:
finished configuration loading in 703 ms.
[java] cayenne DEBUG [main 12-10 12:21:26] DefaultConfiguration:
initialize finished.
[java] cayenne DEBUG [main 12-10 12:21:26] DefaultConfiguration:
didInitialize finished.
[java] cayenne INFO [main 12-10 12:21:26] QueryLogger: --- will
run 1 query.
[java] cayenne INFO [main 12-10 12:21:26] QueryLogger: Opening
connection: jdbc:postgresql://gump.visualtech.com/blickman-de
v
[java] Login: xxxxxx
[java] Password: *******
[java] cayenne INFO [main 12-10 12:21:26] QueryLogger: +++
Connecting: SUCCESS.
[java] cayenne INFO [main 12-10 12:21:26] QueryLogger: SELECT
t0.name, t0.id FROM public.measurement t0 - prepared in 34 ms.
[java] cayenne INFO [main 12-10 12:21:26] QueryLogger: ===
returned 1 row. - took 116 ms.
[java] cayenne INFO [main 12-10 12:21:26] QueryLogger: --- will
run 1 query.
[java] cayenne INFO [main 12-10 12:21:26] QueryLogger: SELECT
t0.extension, t0.mime_info, t0.name, t0.id FROM public.documen
t_type t0
[java] cayenne INFO [main 12-10 12:21:26] QueryLogger: ===
returned 3 rows. - took 5 ms.
[java] **** testNewProduct ****
[java] **** Making a new Product
[java] **** P: {[ modelNumber => model 1
[java] partNumber => p/n 1
[java] externDocs =>
(org.objectstyle.cayenne.access.ToManyList)
[java] listPricePpd =>
39.9500000000000028421709430404007434844970703125
[java] listPriceAbs =>
29.949999999999999289457264239899814128875732421875
[java] toProductFamilies =>
(org.objectstyle.cayenne.access.ToManyList)
[java] prod_to_PPF =>
(org.objectstyle.cayenne.access.ToManyList)
[java] ]<oid: com.dci.blickman.blickmanDB.catalog.Product (temp):
; state: new>}
[java] **** Done!
[java] **** P <<==> M !
[java] cayenne INFO [main 12-10 12:21:26] QueryLogger: --- will
run 1 query.
[java] cayenne INFO [main 12-10 12:21:26] QueryLogger: SELECT
t0.dimension, t0.image, t0.list_price_abs, t0.list_price_ppd,
t0.model_number, t0.modified_date, t0.part_number,
t0.short_description, t0.weight, t0.id, t0.measeurement_id FROM
public.product
t0 WHERE t0.measeurement_id = ? [bind: 1]
[java] cayenne WARN [main 12-10 12:21:26] DefaultResultIterator:
Error
[java] Bad Integer Dude?
[java] at
org.postgresql.jdbc1.AbstractJdbc1ResultSet.toInt(AbstractJdbc1ResultSet
.java:700)
[java] at
org.postgresql.jdbc1.AbstractJdbc1ResultSet.getInt(AbstractJdbc1ResultSe
t.java:144)
[java] at
org.postgresql.jdbc3.Jdbc3ResultSet.getBlob(Jdbc3ResultSet.java:41)
[java] at
org.objectstyle.cayenne.access.types.ByteArrayType.materializeObject(Byt
eArrayType.java:119)
[java] org.objectstyle.cayenne.CayenneRuntimeException: [v.1.0.3
November 16 2003] Global exception.
[java] at
org.objectstyle.cayenne.access.util.SelectObserver.nextGlobalException(S
electObserver.java:156)
[java] at
org.objectstyle.cayenne.access.DefaultResultIterator.readDataRow(Default
ResultIterator.java:242)
[java] at
org.objectstyle.cayenne.access.DefaultResultIterator.nextDataRow(Default
ResultIterator.java:197)
[java] at
org.objectstyle.cayenne.access.DataNode.performQueries(DataNode.java:349
)
[java] at
org.objectstyle.cayenne.access.DefaultResultIterator.dataRows(DefaultRes
ultIterator.java:217)
[java] at
org.objectstyle.cayenne.access.DataDomain.performQueries(DataDomain.java
:466)
[java] at
org.objectstyle.cayenne.access.DataContext.performQueries(DataContext.ja
va:863)
[java] at
org.objectstyle.cayenne.access.DataNode.runSelect(DataNode.java:395)
[java] at
org.objectstyle.cayenne.access.DataNode.performQueries(DataNode.java:281
)
[java] at
org.objectstyle.cayenne.access.DataContext.performQuery(DataContext.java
:915)
[java] at
org.objectstyle.cayenne.access.DataContext.performQuery(DataContext.java
:793)
[java] at
org.objectstyle.cayenne.access.DataDomain.performQueries(DataDomain.java
:466)
[java] at
org.objectstyle.cayenne.access.util.RelationshipDataSource.updateListDat
a(RelationshipDataSource.java:97)
[java] at
org.objectstyle.cayenne.access.DataContext.performQueries(DataContext.ja
va:863)
[java] at
org.objectstyle.cayenne.access.DataContext.performQuery(DataContext.java
:915)
[java] at
org.objectstyle.cayenne.access.ToManyList.getObjectList(ToManyList.java:
120)
[java] at
org.objectstyle.cayenne.access.DataContext.performQuery(DataContext.java
:793)
[java] at
org.objectstyle.cayenne.access.ToManyList.add(ToManyList.java:128)
[java] at
org.objectstyle.cayenne.CayenneDataObject.addToManyTarget(CayenneDataObj
ect.java:309)
[java] at
org.objectstyle.cayenne.access.util.RelationshipDataSource.updateListDat
a(RelationshipDataSource.java:97)
[java] at
org.objectstyle.cayenne.access.ToManyList.getObjectList(ToManyList.java:
120)
[java] at
org.objectstyle.cayenne.CayenneDataObject.setReverseRelationship(Cayenne
DataObject.java:378)
[java] at
org.objectstyle.cayenne.access.ToManyList.add(ToManyList.java:128)
[java] at
org.objectstyle.cayenne.CayenneDataObject.setToOneTarget(CayenneDataObje
ct.java:349)
[java] at
com.dci.blickman.blickmanDB.catalog.auto._Product.setToMeasurement(Unkno
wn Source)
[java] at
org.objectstyle.cayenne.CayenneDataObject.addToManyTarget(CayenneDataObj
ect.java:309)
[java] at
org.objectstyle.cayenne.CayenneDataObject.setReverseRelationship(Cayenne
DataObject.java:378)
[java] at
com.dci.blickman.blickmanDB.test.PandMTest.testNewProduct(Unknown
Source)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
[java] at
org.objectstyle.cayenne.CayenneDataObject.setToOneTarget(CayenneDataObje
ct.java:349)
[java] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
[java] at
com.dci.blickman.blickmanDB.catalog.auto._Product.setToMeasurement(Unkno
wn Source)
[java] at
com.dci.blickman.blickmanDB.test.PandMTest.testNewProduct(Unknown
Source)
[java] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
[java] at java.lang.reflect.Method.invoke(Method.java:324)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
[java] at junit.framework.TestCase.runTest(TestCase.java:154)
[java] at junit.framework.TestCase.runBare(TestCase.java:127)
-[]
Digital Color Image
Phone: 856-662-5532
This archive was generated by hypermail 2.0.0 : Wed Dec 10 2003 - 12:40:55 EST