Hi Marian,

The problem can be detected from the output:
Your class sk.euromove.goldeneye.projectmanagement.bos.Project
has an attribute allSubsystems of type java.util.Vector

If you are using prox="true" OJB builds a CollectionProxy instance and tries
to set the attribute 
allSubsystems to this value.

But a CollectionProxy can't be downcasted to java.util.Vector!

Please try to declare allSubsystems as java.util.Collection or
java.util.List. 

cheers,
Thomas

> -----Ursprüngliche Nachricht-----
> Von: Marian Skalsky [mailto:[EMAIL PROTECTED]]
> Gesendet: Dienstag, 5. November 2002 15:35
> An: OJB Users List
> Betreff: collection-descriptor + collection proxy
> 
> 
> Hi there!
> Can somebody please explain some things I'm not completely sure of ?
> I'm having problem when set proxy="true" with 1:n collection 
> descriptor. I
> got "argument mismatch exception".. and I have no idea why. 
> Here is the
> output:
> [DEFAULT] ERROR: Error in operation [set] of object
> [PersistentFieldPropertyImpl], java.lang.IllegalArgumentException
> [DEFAULT] ERROR: Declaring class
> [sk.euromove.goldeneye.projectmanagement.bos.Project]
> [DEFAULT] ERROR: Property Name [allSubsystems]
> [DEFAULT] ERROR: Property Type [java.util.Vector]
> [DEFAULT] ERROR: anObject was class
> [sk.euromove.goldeneye.projectmanagement.bos.Project]
> [DEFAULT] ERROR: aValue was class
> [org.apache.ojb.broker.accesslayer.CollectionProxy]
> java.lang.IllegalArgumentException: argument type mismatch
> rethrown as org.apache.ojb.broker.PersistenceBrokerException: 
> argument type
> mismatch
> Caused by: java.lang.IllegalArgumentException: argument type mismatch
> 
> Everithing works fine, till I put proxy="true".
> 1) Don't you know what may cause this ?

answered above

> 2) proxy="true" means that when OBJECT is loaded using e.g.
> getObjectByQuery, asociated elements are not 
> loaded/materialized imidiately,
> but only at request or call of .size() ?

correct.

> 3) The class participating in this relationship do not need 
> to implement
> anything to be used in a collection proxy ?

Must implement Collection, List or ManageableCollection.


cheers,
Thomas

> 
> Thank you a lot.
> $kala.
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>
> 
> 


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

Reply via email to