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]

Reply via email to