Re: Error generating pk

From: emre.yilma..tr.com.tr
Date: Mon Apr 03 2006 - 06:32:13 EDT

  • Next message: Andrus Adamchik: "Re: Error generating pk"

    I find the reason of error. When I use the org.objectstyle.cayenne.dba.JdbcAdapter generating the pk not throw exception
    but in this case getting the blob datas in the database throws exception like:
    java.io.InvalidClassException: java.util.ArrayList; local class incompatible: stream classdesc serialVersionUID = 8664875232659988799, local class serialVersionUID
    = 8683452581122892189
            at java.io.ObjectStreamClass.initNonProxy(Unknown Source)
            at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
            at java.io.ObjectInputStream.readClassDesc(Unknown Source)
            at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
            at java.io.ObjectInputStream.readObject0(Unknown Source)
            at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
            at java.io.ObjectInputStream.readSerialData(Unknown Source)
            at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
            at java.io.ObjectInputStream.readObject0(Unknown Source)
            at java.io.ObjectInputStream.readObject(Unknown Source)
            at tr.com.htr.hgys.format.authority.BlobFormat.getObject(BlobFormat.java:34)
            
    when I use the org.objectstyle.cayenne.dba.sqlserver.SQLServerAdapter, blob fields gets the data correctly but
    pk generation fails. How can I solve blob and pk generation problems at the same time.

    ----- Orjinal Mesaj -----
    Kimden: Andrus Adamchik <andru..bjectstyle.org>
    Tarih: Monday, April 3, 2006 12:15
    Konu: Re: Error generating pk
    Kime: cayenne-use..ncubator.apache.org

    > Sorry, you mentioned that in your other message. Unfortunately I
    > don't have test environment right now to try it with c-jdbc driver
    >
    > (maybe someone else does??) Still, can you provide more information.
    >
    > You've used Cayenne before and it worked in your environment,
    > right?
    > If so, when did it start to happen. Is this something that started
    > to
    > happen after switching to a specific version of Cayenne?
    >
    > Andrus
    >
    >
    > On Apr 3, 2006, at 1:04 PM, emre.yilma..tr.com.tr wrote:
    >
    > > Hi,
    > >
    > > I use MsSql server.
    > >
    > > ----- Orjinal Mesaj -----
    > > Kimden: Andrus Adamchik <andru..bjectstyle.org>
    > > Tarih: Monday, April 3, 2006 11:29
    > > Konu: Re: Error generating pk
    > > Kime: cayenne-use..ncubator.apache.org
    > >
    > >> What database are you using? Is this Sybase? What version?
    > >>
    > >> Andrus
    > >>
    > >>
    > >> On Apr 3, 2006, at 11:11 AM, emre.yilma..tr.com.tr wrote:
    > >>
    > >>> Hi,
    > >>>
    > >>> I get the below exeption for rich client database table row
    > >>> generating.
    > >>> How can I store result set from stored procedure.
    > >>>
    > >>> org.objectstyle.cayenne.CayenneRuntimeException: [v.1.2-
    > >>> dev-2006-2-23 February 23 2006] Error generating pk for DbEntity
    > >>
    > >>> Title, no result set from stored
    > >>> procedure.
    > >>> at
    > >>>
    > >> org.objectstyle.cayenne.dba.sybase.SybasePkGenerator.pkFromDatabase
    > >>> (SybasePkGenerator.java:197)
    > >>> at
    > >>>
    > >> org.objectstyle.cayenne.dba.JdbcPkGenerator.generatePkForDbEntity
    > >>> (JdbcPkGenerator.java:326)
    > >>> at
    > >>>
    > >>
    > org.objectstyle.cayenne.access.PrimaryKeyHelper.createPermIdsForObjEn
    > >> t
    > >>> ity(PrimaryKeyHelper.java:188)
    > >>> at
    > >>>
    > >>
    > org.objectstyle.cayenne.access.DataDomainPrecommitAction.createPrimar
    > >> y
    > >>> Key(DataDomainPrecommitAction.java:132)
    > >>> at
    > >>>
    > >> org.objectstyle.cayenne.access.DataDomainPrecommitAction.precommit
    > >>> (DataDomainPrecommitAction.java:108)
    > >>> at
    > >> org.objectstyle.cayenne.access.DataDomain.onSyncFlushInternal
    > >>> (DataDomain.java:799)
    > >>> at org.objectstyle.cayenne.access.DataDomain$2.transform
    > >>> (DataDomain.java:767)
    > >>> at org.objectstyle.cayenne.access.DataDomain.runInTransaction
    > >>> (DataDomain.java:827)
    > >>> at org.objectstyle.cayenne.access.DataDomain.onSync
    > >>> (DataDomain.java:764)
    > >>> at org.objectstyle.cayenne.access.DataContext.flushToParent
    > >>> (DataContext.java:1227)
    > >>> at org.objectstyle.cayenne.access.DataContext.commitChanges
    > >>> (DataContext.java:1085)
    > >>> at tr.com.htr.hgys.db.Title.setTitle(Title.java:101)
    > >>>
    > >>
    > >>
    > >>
    > >
    >
    >
    >



    This archive was generated by hypermail 2.0.0 : Mon Apr 03 2006 - 06:32:18 EDT