dernier réponse :::: upgrade to RC5, ClassCastException on getCollectionByQuery

2004-02-06 Thread Reda Benzair
Armin Waibel wrote: Hi Raymond, Jakob has checked in a fix. Will be included in the upcoming 1.0 version. regards, Armin Armin Waibel wrote: Hi, [EMAIL PROTECTED] wrote: Hi Armin, Ah, right yes, that would make sense. Those 2 classes are not instances of Collection. They descend from

il faut voir au niveau upgrade to RC5, ClassCastException on getCollectionByQuery

2004-02-06 Thread Reda Benzair
Raymond Barlow wrote: Hi Armin, I found Jacob's fixes and incorporated them into my local source branch, rebuilt jars etc, and now it all works!! Thanks Armin. Thanks Jacob. -Raymond Armin Waibel wrote: Hi Raymond, Jakob has checked in a fix. Will be included in the upcoming 1.0 version.

Re: upgrade to RC5, ClassCastException on getCollectionByQuery

2004-01-13 Thread Raymond Barlow
Hi Armin, I found Jacob's fixes and incorporated them into my local source branch, rebuilt jars etc, and now it all works!! Thanks Armin. Thanks Jacob. -Raymond Armin Waibel wrote: Hi Raymond, Jakob has checked in a fix. Will be included in the upcoming 1.0 version. regards, Armin Armin

Re: upgrade to RC5, ClassCastException on getCollectionByQuery

2004-01-12 Thread Armin Waibel
Hi Raymond, the error occured in method prefetchRelationship(Collection owners) line 149 when a cast for the 1:n references is done. The cast is if (collectionClass != null) { newChildren = (Collection) broker.getCollectionByQuery(collectionClass, queries[i]); //Line 149 } Thus I think OJB

Re: upgrade to RC5, ClassCastException on getCollectionByQuery

2004-01-12 Thread rbarlow
Hi Armin, Ah, right yes, that would make sense. Those 2 classes are not instances of Collection. They descend from java.lang.Object (ie. does not extend anything). The implement ManagableCollection. This worked for rc3, I guess there's been changes around that since. Does this mean that I now

Re: upgrade to RC5, ClassCastException on getCollectionByQuery

2004-01-12 Thread Armin Waibel
Hi, [EMAIL PROTECTED] wrote: Hi Armin, Ah, right yes, that would make sense. Those 2 classes are not instances of Collection. They descend from java.lang.Object (ie. does not extend anything). The implement ManagableCollection. This worked for rc3, I guess there's been changes around that

Re: upgrade to RC5, ClassCastException on getCollectionByQuery

2004-01-12 Thread Armin Waibel
Hi Raymond, Jakob has checked in a fix. Will be included in the upcoming 1.0 version. regards, Armin Armin Waibel wrote: Hi, [EMAIL PROTECTED] wrote: Hi Armin, Ah, right yes, that would make sense. Those 2 classes are not instances of Collection. They descend from java.lang.Object (ie. does

upgrade to RC5, ClassCastException on getCollectionByQuery

2004-01-11 Thread Raymond Barlow
Hi all, I've been chasing this all day, and have gotten no further *sigh*. Why does the following code give me a ClassCastException on the getCollectionByQuery?? PersistenceBroker broker = null; Criteria criteria = new Criteria(); criteria.addEqualTo(userName, test);

Re: upgrade to RC5, ClassCastException on getCollectionByQuery

2004-01-11 Thread Armin Waibel
Hi Raymond, I suspect it is something still hanging around from rc3 in my paths. I've updated all the relevant jars (that I can think of), the OJB.properties, the repository xml files etc. ok, that's all you can do. hmm, your code works with rc3 and don't work with rc5 - right? If so, sounds

Re: upgrade to RC5, ClassCastException on getCollectionByQuery

2004-01-11 Thread Raymond Barlow
Hi Armin, Since my my lsat post, I've found that this is something to do with polymorphic classes/extents. I've basically got a base User class, and descendingt from that are 2 classes Supplier and Employee. User is an abstract class, and the only Supplier and Employee are concrete classes.

Re: upgrade to RC5, ClassCastException on getCollectionByQuery

2004-01-11 Thread Raymond Barlow
And here's the stack trace with line numbers: org.apache.ojb.broker.PersistenceBrokerException: java.lang.ClassCastException at org.apache.ojb.broker.core.QueryReferenceBroker.getCollectionByQuery(QueryReferenceBroker.java:251) at