Ahh...I see...updated the Product Entity's shortDescription to a String
(instead of byte[]). Is this the correct type for a CLOB?
The database column is TEXT.
In the model, if I set the shortDescription in db entity to
VARCHAR(1000) and Object entity to String
everything works just fine...weird that a varchar can be put into a
text field w/o any complaints.
However, if I set the db entity to CLOG instead of VARCHAR(), I get an
error similar to the BLOB:
The root seems to be:
[java] Caused by: org.postgresql.util.PSQLException: Bad Integer
p/n 1 -- model 1
Which should is the shortDescription data.
The stack....
[java] cayenne INFO [main 12-10 17:15:51] QueryLogger: SELECT
t0.name, t0.id FROM public.measurement t0 - prepared in 35 ms.
[java] cayenne INFO [main 12-10 17:15:51] QueryLogger: ===
returned 1 row. - took 64 ms.
[java] cayenne INFO [main 12-10 17:15:51] QueryLogger: --- will
run 1 query.
[java] cayenne INFO [main 12-10 17:15:51] QueryLogger: SELECT
t0.extension, t0.mime_info, t0.name, t0.id FROM public.documen
t_type t0
[java] cayenne INFO [main 12-10 17:15:51] 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] shortDescription => p/n 1 -- model 1
[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] cayenne INFO [main 12-10 17:15:51] QueryLogger: --- will
run 1 query.
[java] **** P <<==> M !{[ products =>
(org.objectstyle.cayenne.access.ToManyList)
[java] name => lbs
[java] ]<oid: com.dci.blickman.blickmanDB.catalog.Measurement:
<id: 1>; state: committed>}
[java] cayenne INFO [main 12-10 17:15:51] 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] - prepared in 11 ms.
[java] cayenne WARN [main 12-10 17:15:51] DefaultResultIterator:
Error
[java] org.postgresql.util.PSQLException: Bad Integer p/n 1 --
model 1
[java] at
org.postgresql.jdbc1.AbstractJdbc1ResultSet.toInt(AbstractJdbc1ResultSet
.java:857)
[java] at
org.postgresql.jdbc1.AbstractJdbc1ResultSet.getInt(AbstractJdbc1ResultSe
t.java:282)
[java] at
org.postgresql.jdbc3.Jdbc3ResultSet.getClob(Jdbc3ResultSet.java:33)
[java] at
org.objectstyle.cayenne.access.types.CharType.materializeObject(CharType
.java:100)
[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.DataNode.performQueries(DataNode.java:349
)
[java] at
org.objectstyle.cayenne.access.DefaultResultIterator.nextDataRow(Default
ResultIterator.java:197)
[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.DataContext.performQuery(DataContext.java
:915)
[java] at
org.objectstyle.cayenne.access.DataContext.performQuery(DataContext.java
:793)
[java] at
org.objectstyle.cayenne.access.DataNode.performQueries(DataNode.java:281
)
[java] at
org.objectstyle.cayenne.access.util.RelationshipDataSource.updateListDat
a(RelationshipDataSource.java:97)
[java] at
org.objectstyle.cayenne.access.DataDomain.performQueries(DataDomain.java
:466)
[java] at
org.objectstyle.cayenne.access.ToManyList.getObjectList(ToManyList.java:
120)
[java] at
org.objectstyle.cayenne.access.DataContext.performQueries(DataContext.ja
va:863)
[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.DataContext.performQuery(DataContext.java
:915)
[java] at
org.objectstyle.cayenne.access.DataContext.performQuery(DataContext.java
:793)
[java] at
org.objectstyle.cayenne.CayenneDataObject.setReverseRelationship(Cayenne
DataObject.java:378)
[java] at
org.objectstyle.cayenne.access.util.RelationshipDataSource.updateListDat
a(RelationshipDataSource.java:97)
[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.access.ToManyList.getObjectList(ToManyList.java:
120)
[java] at
org.objectstyle.cayenne.access.ToManyList.add(ToManyList.java:128)
[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.addToManyTarget(CayenneDataObj
ect.java:309)
[java] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
[java] at
org.objectstyle.cayenne.CayenneDataObject.setReverseRelationship(Cayenne
DataObject.java:378)
[java] at
org.objectstyle.cayenne.CayenneDataObject.setReverseRelationship(Cayenne
DataObject.java:378)
[java] at
org.objectstyle.cayenne.CayenneDataObject.setToOneTarget(CayenneDataObje
ct.java:349)
[java] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
[java] at java.lang.reflect.Method.invoke(Method.java:324)
[java] at
com.dci.blickman.blickmanDB.catalog.auto._Product.setToMeasurement(Unkno
wn Source)
[java] at junit.framework.TestCase.runTest(TestCase.java:154)
[java] at junit.framework.TestCase.runBare(TestCase.java:127)
[java] at
com.dci.blickman.blickmanDB.test.PandMTest.testNewProduct(Unknown
Source)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
[java] at
junit.framework.TestResult$1.protect(TestResult.java:106)
[java] at
junit.framework.TestResult.runProtected(TestResult.java:124)
[java] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
[java] at junit.framework.TestResult.run(TestResult.java:109)
[java] at junit.framework.TestCase.run(TestCase.java:118)
[java] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
[java] at junit.framework.TestSuite.runTest(TestSuite.java:208)
[java] at java.lang.reflect.Method.invoke(Method.java:324)
[java] at junit.framework.TestCase.runTest(TestCase.java:154)
[java] at junit.framework.TestSuite.run(TestSuite.java:203)
[java] at junit.textui.TestRunner.doRun(TestRunner.java:116)
[java] at junit.framework.TestCase.runBare(TestCase.java:127)
[java] at
junit.framework.TestResult$1.protect(TestResult.java:106)
[java] at junit.textui.TestRunner.doRun(TestRunner.java:109)
[java] at junit.textui.TestRunner.run(TestRunner.java:72)
[java] at
junit.framework.TestResult.runProtected(TestResult.java:124)
[java] at junit.framework.TestResult.run(TestResult.java:109)
[java] at
com.dci.blickman.blickmanDB.test.PandMTest.main(Unknown Source)
[java] Caused by: org.postgresql.util.PSQLException: Bad Integer
p/n 1 -- model 1
[java] at junit.framework.TestCase.run(TestCase.java:118)
[java] at junit.framework.TestSuite.runTest(TestSuite.java:208)
[java] at
org.postgresql.jdbc1.AbstractJdbc1ResultSet.toInt(AbstractJdbc1ResultSet
.java:857)
[java] at junit.framework.TestSuite.run(TestSuite.java:203)
[java] at junit.textui.TestRunner.doRun(TestRunner.java:116)
[java] at junit.textui.TestRunner.doRun(TestRunner.java:109)
[java] at
org.postgresql.jdbc1.AbstractJdbc1ResultSet.getInt(AbstractJdbc1ResultSe
t.java:282)
[java] at
org.postgresql.jdbc3.Jdbc3ResultSet.getClob(Jdbc3ResultSet.java:33)
[java] at junit.textui.TestRunner.run(TestRunner.java:72)
[java] at
com.dci.blickman.blickmanDB.test.PandMTest.main(Unknown Source)
[java] at
org.objectstyle.cayenne.access.types.CharType.materializeObject(CharType
.java:100)
[java] cayenne INFO [main 12-10 17:15:51] QueryLogger: *** error.
[java] at
org.objectstyle.cayenne.access.DefaultResultIterator.readDataRow(Default
ResultIterator.java:242)
[java] org.postgresql.util.PSQLException: Bad Integer p/n 1 --
model 1
[java] at
org.objectstyle.cayenne.access.DefaultResultIterator.nextDataRow(Default
ResultIterator.java:197)
[java] at
org.postgresql.jdbc1.AbstractJdbc1ResultSet.toInt(AbstractJdbc1ResultSet
.java:857)
[java] at
org.objectstyle.cayenne.access.DefaultResultIterator.dataRows(DefaultRes
ultIterator.java:217)
[java] at
org.postgresql.jdbc1.AbstractJdbc1ResultSet.getInt(AbstractJdbc1ResultSe
t.java:282)
[java] at
org.objectstyle.cayenne.access.DataNode.runSelect(DataNode.java:395)
[java] at
org.postgresql.jdbc3.Jdbc3ResultSet.getClob(Jdbc3ResultSet.java:33)
[java] at
org.objectstyle.cayenne.access.DataNode.performQueries(DataNode.java:281
)
[java] ... 28 more
[java] at
org.objectstyle.cayenne.access.types.CharType.materializeObject(CharType
.java:100)
[java] **** tearDown ****
On Wednesday, December 10, 2003, at 04:07 PM, Andrus Adamchik wrote:
> Mike,
>
> the line below still makes me believe that you are using binary values
> somewhere ("< 70 2F 6E 20 31 20 2D 2D 20 6D 6F 64 65 6C 20 31 >" is a
> sign
> that a byte[] is used in the object). Probably a Java class was not
> regenerated.
>
> Andrus
>
>
> [java] cayenne INFO [main 12-10 15:07:25] QueryLogger: INSERT
> INTO public.product (dimension, id, image, list_price_abs, lis
> t_price_ppd, measeurement_id, model_number, modified_date, part_number,
> short_description, weight) VALUES (?, ?, ?, ?, ?, ?, ?, ?,
> ?, ?, ?)
> [java] cayenne INFO [main 12-10 15:07:25] QueryLogger: [bind:
> NULL, 540, NULL, 29.949999999999999289457264239899814128875732
> 421875, 39.9500000000000028421709430404007434844970703125, 1, 'model
> 1', NULL, 'p/n 1', < 70 2F 6E 20 31 20 2D 2D 20 6D 6F 64 65 6
> C 20 31 >, NULL]
>
>
>
-[]
Digital Color Image
Phone: 856-662-5532
This archive was generated by hypermail 2.0.0 : Wed Dec 10 2003 - 17:30:49 EST