Make sure you have a set method that accepts "Collection" as a
parameter....reason being that
RelationCollection implements Collection but does extend and collection
types....i had the same problem
once upon a time....

sudhir

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 27, 2001 4:22 AM
To: [EMAIL PROTECTED]
Subject: Re: [castor-dev] lazy loading error



After getting latest cvs version, lazy"true" still results in error:

org.exolab.castor.jdo.DataObjectAccessException: Type conversion error:
could not set value of FieldMolder of
nl.niwi.box.thesaurus.Thesaurus.setnames(nl.niwi.box.thesaurus.ThesaurusName
names) with value of type org.exolab.castor.persist.RelationCollection

        at
org.exolab.castor.persist.FieldMolder.setValue(FieldMolder.java:318)

        at org.exolab.castor.persist.ClassMolder.load(ClassMolder.java:782)

        at org.exolab.castor.persist.LockEngine.load(LockEngine.java:359)

        at
org.exolab.castor.persist.TransactionContext.load(TransactionContext.java:57
5)

        at
org.exolab.castor.persist.QueryResults.fetch(QueryResults.java:229)

        at
org.exolab.castor.jdo.engine.OQLQueryImpl$OQLEnumeration.hasMore(OQLQueryImp
l.java:573)

        at
org.exolab.castor.jdo.engine.OQLQueryImpl$OQLEnumeration.hasMore(OQLQueryImp
l.java:556)

        at
nl.niwi.box.database.PersistenceBox2.getThesauri(PersistenceBox2.java:144)

        at nl.niwi.box.test.CastorTest.run(CastorTest.java:37)

        at nl.niwi.box.test.CastorTest.main(CastorTest.java:28)







[EMAIL PROTECTED] writes:

> 
> A 1:many relation with lazy="true" results in error message (without
> lazy="true" I do not get error messages, but wrong results, see previous
> post "1:many relations: bug??"):
> 
> org.exolab.castor.jdo.DataObjectAccessException: Type conversion error:
> could not set value of
> FieldMolder(names,nl.niwi.box.thesaurus.ThesaurusName)null inside
> nl.niwi.box.thesaurus.Thesaurus with value of type
> org.exolab.castor.persist.RelationCollection
> 
>       at
org.exolab.castor.persist.FieldMolder.setValue(FieldMolder.java:319)
> 
>       at org.exolab.castor.persist.ClassMolder.load(ClassMolder.java:755)
> 
>       at org.exolab.castor.persist.LockEngine.load(LockEngine.java:361)
> 
>       at
>
org.exolab.castor.persist.TransactionContext.load(TransactionContext.java:54
5)
> 
>       at
org.exolab.castor.persist.QueryResults.fetch(QueryResults.java:229)
> 
>       at
>
org.exolab.castor.jdo.engine.OQLQueryImpl$OQLEnumeration.hasMore(OQLQueryImp
l.java:573)
> 
>       at
>
org.exolab.castor.jdo.engine.OQLQueryImpl$OQLEnumeration.hasMore(OQLQueryImp
l.java:556)
> 
>       at
> nl.niwi.box.database.PersistenceBox2.getThesauri(PersistenceBox2.java:144)
> 
>       at nl.niwi.box.test.CastorTest.run(CastorTest.java:37)
> 
>       at nl.niwi.box.test.CastorTest.main(CastorTest.java:28)
> 
> 
> 
> Lukas Koster
> 
> ----------------------------------------------------------- 
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
>       unsubscribe castor-dev
> 


Lukas Koster

----------------------------------------------------------- 
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