[ojb-users] NoSuchElementException and n:m mapping
Brought to you by:
thma
From: Stephane F. <sf...@un...> - 2002-04-25 18:06:18
|
Hi, I am back with this NoSuchElementException.I could not fix this problem.Bu= t=20 I can describe more on what is happening: I have 2 tables and I am doing a m:n association with manual decomposition = so I have 3 tables: einrichtung, personal and personal einrichtung I am trying to create all the einrichtung objects.And heres what happen: 1.Einrichtung objets are created 2.personal_einrichtung objet are also created 3.Error: OJB wants to create the Personal objects (that s ok!) but it cant and the ERROR returned is: [ojb.broker.singlevm.PersistenceBrokerImpl] ERROR: expected type: class = model.Personal normally here the .PersistenceBrokerImpl line ~520 performs this log: logger.error("actual type: " + getReferencedObject(newObj, rds, = mif).getClass()); But it cant perform it. I found what was the actual type of the object and it is personal_einrichtu= ng I thing something may be wrong with my configuration so I put the = repository here (interesting parts). Thanx for helping St=E9phane <ClassDescriptor id=3D"0"> <class.name>com.unilog.iubs.kita.model.Einrichtung</class.name> <table.name>.einrichtung</table.name> =20 <FieldDescriptor id=3D"1"> <field.name>id</field.name> <column.name>id</column.name> <jdbc_type>INTEGER</jdbc_type> <PrimaryKey>true</PrimaryKey> </FieldDescriptor> =20 <FieldDescriptor id=3D"2"> <field.name>name</field.name> <column.name>name</column.name> <jdbc_type>VARCHAR</jdbc_type> </FieldDescriptor> =20 <cdfield.name>personalEinrichtung</cdfield.name> <items.class>com.unilog.iubs.kita.model.Personal_einrichtung</items.cla= ss> <inverse_fk_descriptor_ids>1</inverse_fk_descriptor_ids> </CollectionDescriptor> =20 </ClassDescriptor> <ClassDescriptor id=3D"5"> <class.name>com.unilog.iubs.kita.model.Personal</class.name> <table.name>.personal</table.name> <FieldDescriptor id=3D"0"> <field.name>id</field.name> <column.name>id</column.name> <jdbc_type>INTEGER</jdbc_type> <PrimaryKey>true</PrimaryKey> </FieldDescriptor> <FieldDescriptor id=3D"1"> <field.name>name</field.name> <column.name>name</column.name> <jdbc_type>VARCHAR</jdbc_type> </FieldDescriptor> <FieldDescriptor id=3D"2"> <field.name>vorname</field.name> <column.name>vorname</column.name> <jdbc_type>VARCHAR</jdbc_type> </FieldDescriptor> =20 <CollectionDescriptor id=3D"2"> <cdfield.name>einrichtungen</cdfield.name> <items.class>com.unilog.iubs.kita.model.Personal_einrichtung</items.cla= ss> <inverse_fk_descriptor_ids>0</inverse_fk_descriptor_ids> </CollectionDescriptor> </ClassDescriptor> <ClassDescriptor id=3D"6"> <class.name>com.unilog.iubs.kita.model.Personal_einrichtung</class.name> <table.name>.personal_einrichtung</table.name> <FieldDescriptor id=3D"1"> <field.name>einrichtungId</field.name> <column.name>einrichtungId</column.name> <jdbc_type>INTEGER</jdbc_type> <PrimaryKey>true</PrimaryKey> </FieldDescriptor> <FieldDescriptor id=3D"2"> <field.name>leitung</field.name> <column.name>leitung</column.name> <jdbc_type>TINYINT</jdbc_type> </FieldDescriptor> <FieldDescriptor id=3D"0"> <field.name>personalId</field.name> <column.name>personalId</column.name> <jdbc_type>INTEGER</jdbc_type> <PrimaryKey>true</PrimaryKey> </FieldDescriptor> <ReferenceDescriptor id=3D"1"> <rdfield.name>personal</rdfield.name> <referenced.class>com.unilog.iubs.kita.model.Personal</referenced.class= > <fk_descriptor_ids>0</fk_descriptor_ids> </ReferenceDescriptor> <ReferenceDescriptor id=3D"2"> <rdfield.name>einrichtung</rdfield.name> <referenced.class>com.unilog.iubs.kita.model.Einrichtung</referenced.cl= ass> <fk_descriptor_ids>1</fk_descriptor_ids> </ReferenceDescriptor> </ClassDescriptor> |