[OS-JIRA] Created: (CAY-57) [C|B]LOB problem on Postgres

From: jir..bjectstyle.org
Date: Wed Dec 10 2003 - 17:40:17 EST

  • Next message: Andriy Shapochka: "Rowan announcement"

    Message:

      A new issue has been created in JIRA.

    ---------------------------------------------------------------------
    View the issue:

      http://objectstyle.org/jira/secure/ViewIssue.jspa?key=CAY-57

    Here is an overview of the issue:
    ---------------------------------------------------------------------
            Key: CAY-57
        Summary: [C|B]LOB problem on Postgres
           Type: Bug

         Status: Assigned
       Priority: Major

        Project: Cayenne
     Components:
                 Cayenne Core Library
       Fix Fors:
                 1.0 [STABLE]
       Versions:
                 1.0 [STABLE]

       Assignee: Andrus Adamchik
       Reporter: Andrus Adamchik

        Created: Wed, 10 Dec 2003 5:40 PM
        Updated: Wed, 10 Dec 2003 5:40 PM
    Environment: Cayenne 1.0.3, PostgreSQL 7.3, JDBC driver: pg73jdbc3.jar AND pg73jdbc2.jar

    Description:
    Reported by Mike Block - http://objectstyle.org/cayenne/lists/cayenne-user/2003/12/0016.html

    Mapping CLOB -> "text" and BLOB -> "bytea" on postgres generates the following error:
      

    [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(AbstractJdbc1ResultSet.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(SelectObserver.java:156)
         [java] at org.objectstyle.cayenne.access.DefaultResultIterator.readDataRow(DefaultResultIterator.java:242)
         [java] at org.objectstyle.cayenne.access.DataNode.performQueries(DataNode.java:349)
         [java] at org.objectstyle.cayenne.access.DefaultResultIterator.nextDataRow(DefaultResultIterator.java:197)
         [java] at org.objectstyle.cayenne.access.DefaultResultIterator.dataRows(DefaultResultIterator.java:217)
         [java] at org.objectstyle.cayenne.access.DataDomain.performQueries(DataDomain.java:466)
         [java] at org.objectstyle.cayenne.access.DataContext.performQueries(DataContext.java: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.updateListData(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.java:863)
         [java] at org.objectstyle.cayenne.access.ToManyList.add(ToManyList.java:128)
         [java] at org.objectstyle.cayenne.CayenneDataObject.addToManyTarget(CayenneDataObject.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(CayenneDataObject.java:378)
         [java] at org.objectstyle.cayenne.access.util.RelationshipDataSource.updateListData(RelationshipDataSource.java:97)
         [java] at org.objectstyle.cayenne.CayenneDataObject.setToOneTarget(CayenneDataObject.java:349)
         [java] at com.dci.blickman.blickmanDB.catalog.auto._Product.setToMeasurement(Unknown 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(CayenneDataObject.java:309)
         [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         [java] at org.objectstyle.cayenne.CayenneDataObject.setReverseRelationship(CayenneDataObject.java:378)
         [java] at org.objectstyle.cayenne.CayenneDataObject.setReverseRelationship(CayenneDataObject.java:378)
         [java] at org.objectstyle.cayenne.CayenneDataObject.setToOneTarget(CayenneDataObject.java:349)
         [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         [java] at java.lang.reflect.Method.invoke(Method.java:324)
         [java] at com.dci.blickman.blickmanDB.catalog.auto._Product.setToMeasurement(Unknown 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.java: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(DelegatingMethodAccessorImpl.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(AbstractJdbc1ResultSet.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(DefaultResultIterator.java:242)
         [java] org.postgresql.util.PSQLException: Bad Integer p/n 1 -- model 1
         [java] at org.objectstyle.cayenne.access.DefaultResultIterator.nextDataRow(DefaultResultIterator.java:197)
         [java] at org.postgresql.jdbc1.AbstractJdbc1ResultSet.toInt(AbstractJdbc1ResultSet.java:857)
         [java] at org.objectstyle.cayenne.access.DefaultResultIterator.dataRows(DefaultResultIterator.java:217)
         [java] at org.postgresql.jdbc1.AbstractJdbc1ResultSet.getInt(AbstractJdbc1ResultSet.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 ****

    ---------------------------------------------------------------------
    JIRA INFORMATION:
    This message is automatically generated by JIRA.

    If you think it was sent incorrectly contact one of the administrators:
       http://objectstyle.org/jira/secure/Administrators.jspa

    If you want more information on JIRA, or have a bug to report see:
       http://www.atlassian.com/software/jira



    This archive was generated by hypermail 2.0.0 : Wed Dec 10 2003 - 17:40:18 EST