Hi again,

can you post the whole stack trace?
OJB version, used sequence manager?

regards,
Armin

----- Original Message -----
From: "Michael Gysi-Gander" <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>
Sent: Thursday, July 24, 2003 1:54 PM
Subject: AW: Problem with a ClassNotPersistenceCapableException


> Hi
>
> yes it is declared. Sorry for not posting the whole config. here it
is:
>
> <class-descriptor
>   class="ch.mypackage.Person"
>   table="PERSON"
> >
>   <field-descriptor id="101"
>     name="mnId"
>     column="PERSON_ID"
>     jdbc-type="INTEGER"
>     primarykey="true"
>     autoincrement="true"
>   />
>   <field-descriptor id="102"
>     name="mFirstName"
>     column="FIRST_NAME"
>     jdbc-type="VARCHAR"
>   />
>   <field-descriptor id="103"
>     name="mLastName"
>     column="LAST_NAME"
>     jdbc-type="VARCHAR"
>   />
>   <field-descriptor id="104"
>     name="mEmail"
>     column="EMAIL"
>     jdbc-type="VARCHAR"
>   />
>   <field-descriptor id="105"
>     name="mPkiIdentity"
>     column="PKI_IDENTITY"
>     jdbc-type="VARCHAR"
>   />
> </class-descriptor>
> <!-- ================================= -->
> <class-descriptor
>   class="ch.mypackage.Role"
>   table="ROLE"
> >
>   <field-descriptor id="201"
>     name="mnId"
>     column="ROLE_ID"
>     jdbc-type="INTEGER"
>     primarykey="true"
>     autoincrement="true"
>   />
>   <field-descriptor id="202"
>     name="mName"
>     column="NAME"
>     jdbc-type="VARCHAR"
>   />
>   <field-descriptor id="203"
>     name="mDescription"
>     column="DESCRIPTION"
>     jdbc-type="VARCHAR"
>   />
> </class-descriptor>
> <!-- ================================= -->
> <class-descriptor
>   class="ch.mypackage.Dossier"
>   table="DOSSIER"
> >
>   <field-descriptor id="301"
>     name="mnId"
>     column="DOSSIER_ID"
>     jdbc-type="INTEGER"
>     primarykey="true"
>     autoincrement="false"
>   />
>   <field-descriptor id="302"
>     name="mName"
>     column="NAME"
>     jdbc-type="VARCHAR"
>   />
>   <field-descriptor id="303"
>     name="mDescription"
>     column="DESCRIPTION"
>     jdbc-type="VARCHAR"
>   />
>   <collection-descriptor
>     name="mAddresses"
>     element-class-ref="ch.mypackage.Address"
>     proxy="true"
>   >
>     <inverse-foreignkey field-ref="mnDossierId"/>
>   </collection-descriptor>
>
>   <collection-descriptor
>     name="mPersonRoles"
>     element-class-ref="ch.mypackage.PersonRole"
>     proxy="true"
>   >
>     <inverse-foreignkey field-ref="mnDossierId"/>
>   </collection-descriptor>
>
>   <collection-descriptor
>     name="mFormSpecs"
>     element-class-ref="ch.mypackage.FormSpec"
>     proxy="true"
>   >
>     <inverse-foreignkey field-ref="mnDossierId"/>
>   </collection-descriptor>
>
> </class-descriptor>
> <!-- ================================= -->
> <class-descriptor
>   class="ch.mypackage.Address"
>   table="ADDRESS"
> >
>   <field-descriptor id="401"
>     name="mnId"
>     column="ADDRESS_ID"
>     jdbc-type="INTEGER"
>     primarykey="true"
>     autoincrement="false"
>   />
>   <field-descriptor id="402"
>     name="mName"
>     column="NAME"
>     jdbc-type="VARCHAR"
>   />
>   <field-descriptor id="403"
>     name="mName2"
>     column="NAME_2"
>     jdbc-type="VARCHAR"
>   />
>   <field-descriptor id="404"
>     name="mName3"
>     column="NAME_3"
>     jdbc-type="VARCHAR"
>   />
>   <field-descriptor id="405"
>     name="mZIP"
>     column="ZIP"
>     jdbc-type="VARCHAR"
>   />
>   <field-descriptor id="406"
>     name="mCity"
>     column="CITY"
>     jdbc-type="VARCHAR"
>   />
>   <field-descriptor id="407"
>     name="mnDossierId"
>     column="DOSSIER_ID"
>     jdbc-type="INTEGER"
>   />
>
>
> </class-descriptor>
> <!-- ================================= -->
> <class-descriptor
>   class="ch.mypackage.Property"
>   table="PROPERTY"
> >
>   <field-descriptor id="501"
>     name="mKey"
>     column="PROP_KEY"
>     jdbc-type="VARCHAR"
>     primarykey="true"
>     autoincrement="false"
>   />
>   <field-descriptor id="502"
>     name="mValue"
>     column="PROP_VALUE"
>     jdbc-type="VARCHAR"
>   />
> </class-descriptor>
> <!-- ================================= -->
> <class-descriptor
>   class="ch.mypackage.FormNine"
>   table="FORM_NINE"
> >
>   <field-descriptor id="601"
>     name="mnId"
>     column="FORM_NINE_ID"
>     jdbc-type="INTEGER"
>     primarykey="true"
>     autoincrement="false"
>   />
>   <!--
>   <field-descriptor id="602"
>    name="mnFormSpecId"
>    column="FORM_SPEC_ID"
>    jdbc-type="INTEGER"
>   />
>   -->
>   <field-descriptor id="603"
>     name="mDueDate"
>     column="DUE_DATE"
>     jdbc-type="DATE"
>   />
>   <field-descriptor id="604"
>     name="mAmountOne"
>     column="AMOUNT_ONE"
>     jdbc-type="DECIMAL"
>   />
>   <field-descriptor id="605"
>     name="mAmountTwo"
>     column="AMOUNT_TWO"
>     jdbc-type="DECIMAL"
>   />
>   <field-descriptor id="606"
>     name="mCity"
>     column="CITY"
>     jdbc-type="VARCHAR"
>   />
>   <field-descriptor id="607"
>     name="mPhone"
>     column="PHONE"
>     jdbc-type="VARCHAR"
>   />
>   <field-descriptor id="607"
>     name="mEmail"
>     column="EMAIL"
>     jdbc-type="VARCHAR"
>   />
>   <field-descriptor id="608"
>     name="mStatus"
>     column="STATUS"
>     jdbc-type="VARCHAR"
>   />
>   <field-descriptor id="609"
>     name="mnFormSpecId"
>     column="FORM_SPEC_ID"
>     jdbc-type="INTEGER"
>   />
> </class-descriptor>
> <!-- ================================= -->
> <class-descriptor
>   class="ch.mypackage.PersonRole"
>   table="PERSON_ROLE"
> >
>   <field-descriptor id="701"
>     name="mnId"
>     column="PERSON_ID"
>     jdbc-type="INTEGER"
>   />
>   <field-descriptor id="702"
>     name="mnRoleId"
>     column="ROLE_ID"
>     jdbc-type="INTEGER"
>   />
>   <field-descriptor id="703"
>     name="mnDossierId"
>     column="DOSSIER_ID"
>     jdbc-type="INTEGER"
>   />
> </class-descriptor>
> <!-- ================================= -->
> <class-descriptor
>   class="ch.mypackage.FormSpec"
>   table="FORM_SPEC"
> >
>   <field-descriptor id="801"
>     name="mnId"
>     column="FORM_SPEC_ID"
>     jdbc-type="INTEGER"
>     primarykey="true"
>     autoincrement="false"
>   />
>   <field-descriptor id="802"
>     name="mMinSigCnt"
>     column="MIN_SIG_CNT"
>     jdbc-type="INTEGER"
>   />
>   <field-descriptor id="803"
>     name="mnDossierId"
>     column="DOSSIER_ID"
>     jdbc-type="INTEGER"
>   />
> </class-descriptor>
>
> -----Ursprüngliche Nachricht-----
> Von: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
> Gesendet: Do 24.07.2003 13:23
> An: [EMAIL PROTECTED]
> Cc:
> Betreff: AW: Problem with a ClassNotPersistenceCapableException
>
>
>
> Hi,
>
> but where ist ch.mypackage.PersonRole of your collection descriptor
declared
> in your repository?
>
> <collection-descriptor
>     name="mPersonRoles"
>     element-class-ref="ch.mypackage.PersonRole"
>                        ^^^^^^^^^^^^^^^^^^^^^^^^
>     proxy="true"
>   >
>
> Julia.
>
> -----Ursprüngliche Nachricht-----
> Von: Michael Gysi-Gander [mailto:[EMAIL PROTECTED]
> Gesendet: Donnerstag, 24. Juli 2003 13:19
> An: OJB Users List
> Betreff: AW: Problem with a ClassNotPersistenceCapableException
>
>
> Hi
>
> both is declared (see below). Read operation work, but insert and
update
> don't
>
> thanks for any help
> cheers
> Mike
>
> <class-descriptor
>   class="ch.mypackage.Person"
>   table="PERSON"
> >
>   <field-descriptor id="101"
>     name="mnId"
>     column="PERSON_ID"
>     jdbc-type="INTEGER"
>     primarykey="true"
>     autoincrement="true"
>   />
>   <field-descriptor id="102"
>     name="mFirstName"
>     column="FIRST_NAME"
>     jdbc-type="VARCHAR"
>   />
>   <field-descriptor id="103"
>     name="mLastName"
>     column="LAST_NAME"
>     jdbc-type="VARCHAR"
>   />
>   <field-descriptor id="104"
>     name="mEmail"
>     column="EMAIL"
>     jdbc-type="VARCHAR"
>   />
>   <field-descriptor id="105"
>     name="mPkiIdentity"
>     column="PKI_IDENTITY"
>     jdbc-type="VARCHAR"
>   />
>   <collection-descriptor
>     name="mPersonRoles"
>     element-class-ref="ch.mypackage.PersonRole"
>     proxy="true"
>   >
>     <inverse-foreignkey field-ref="mnPersonId"/>
>   </collection-descriptor>
> </class-descriptor>
>
>
> repository.xml:
> <!DOCTYPE descriptor-repository
>
> SYSTEM "repository.dtd" [
>
> <!ENTITY internal SYSTEM "repository_internal.xml">
>
> <!ENTITY jdbc SYSTEM "repository_jdbc.xml">
>
> <!ENTITY user SYSTEM "repository_user.xml">
>
> ]
>
> >
>
> <descriptor-repository version="1.0"
isolation-level="read-uncommitted">
>
> &jdbc; <!-- include jdbc settings here -->
>
> &user; <!-- include user defined mappings here -->
>
> &internal; <!-- include ojb internal mappings here -->
>
> </descriptor-repository>
>
>         -----Ursprüngliche Nachricht-----
>         Von: Armin Waibel [mailto:[EMAIL PROTECTED]
>         Gesendet: Do 24.07.2003 12:18
>         An: OJB Users List
>         Cc:
>         Betreff: Re: Problem with a
ClassNotPersistenceCapableException
>
>
>
>         Hi,
>
>         seems ch.mypackage.Person is not declared in the repository
>         file, or the sub-file (e.g. repository_user.xml) is not
included
>         in repository.xml file.
>
>         regards,
>         Armin
>
>         ----- Original Message -----
>         From: "Michael Gysi-Gander" <[EMAIL PROTECTED]>
>         To: <[EMAIL PROTECTED]>
>         Sent: Thursday, July 24, 2003 12:01 PM
>         Subject: Problem with a ClassNotPersistenceCapableException
>
>
>         > Hi
>         >
>         > We have a problem when attempting write to the db - what we
get is
>         >
>         >
> org.apache.ojb.broker.metadata.ClassNotPersistenceCapableException:
>         Could not init Identity for given object class
ch.mypackage.Person:
>         Object has been modified by someone else]
>         >
>         > What is happening here? I get the same error when I attempt
to
> insert
>         a new "Person" record
>         >
>         > thanks for any help
>         > cheers
>         > Mike
>         >
>
>
>
>
> ---------------------------------------------------------------------
>         To unsubscribe, e-mail: [EMAIL PROTECTED]
>         For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>


------------------------------------------------------------------------
--------


> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to