Hi Hiran,

We tried using Vector instead of a class extending Vector and it works OK now.
Thank you

Veena

At 02:33 PM 3/12/2003 +0100, you wrote:
Hi, Veena Rajaraman.

You did not send your complete interface description. More important might
be the source for the class ABC, as there you have the get/set methods that
issue the problems, and being myself a Castor newbie, I'm not sure whether I
can help you at all.

I get the feeling that with your object model Castor tries to persistently
store an object that extends Vector. And maybe there it fails..
Or your class ABC is cleanly persistable, but does not implement the bean
patterns Castor expects.

Hiran


----- Original Message ----- From: "Veena Rajaraman" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, March 12, 2003 2:12 PM Subject: [castor-dev] JDO: collection="vector" for a field throws exception when the collection type is a derived class of Vector


> sorry looks like my message got truncated. sending again. > auditTrail is of type AuditTrail_list which is declared within an > interface like so. > public > interface HasAuditTrail{ > > public class AuditTrail_list extends Vector{}......} > I have another class ABC which implements this interface > and has an attribute auditTrail with get( returns an AuditTrail_list) and > set methods > in my mapping file for class ABC > <class name="ABC" identity="id" key-generator=MAX"> > <map-to table="ABC" /> > ......some fields > <field name="auditTrail" type="org.biomage.AuditAndSecurity.Audit" > collection="vector"> > <sql many-key="at_id"> > </field> > </class> > i get the following exception when i try to run my code. it doesnt get past > trying to read mapping.xml > > org.exolab.castor.jdo.DatabaseNotFoundException: > Nested error: org.exolab.castor.mapping.MappingException: > The return type for method public > org.biomage.Interface.HasAuditTrail$AuditTrail_list > org.biomage.Common.Describable.getAuditTrail() does not match the declared > field type java.util.Vector > any help would be appreciated. > Thanks. > Sincerely, > Veena Rajaraman > > ----------------------------------------------------------- > If you wish to unsubscribe from this mailing, send mail to > [EMAIL PROTECTED] with a subject of: > unsubscribe castor-dev >

-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev




Reply via email to