You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Reda Benzair <re...@smartjog.com> on 2004/02/06 18:49:37 UTC
problem ClassCastException for "addThisListenerTo"
Hi All
I have problem for the classCastException in
my repository file I use collections all my collection-descriptor use
the proxy=true !
error is
protected void addThisListenerTo(Object listenedObject)
{
_listenedCollection = (CollectionProxy) listenedObject;
_listenedCollection.addListener(this);
}
the listenedObject is not CollectionProxy ???
why this error , my repository ? my application ?
I didn't find it !!!!
Caused by: java.lang.ClassCastException
at
org.apache.ojb.broker.core.QueryReferenceBroker$PBCollectionProxyListener.addThisListenerTo(QueryReferenceBroker.java:873)
at
org.apache.ojb.broker.core.QueryReferenceBroker$PBPrefetchingListener.prefetch(QueryReferenceBroker.java:852)
at
org.apache.ojb.broker.core.QueryReferenceBroker$PBCollectionProxyListener.beforeLoading(QueryReferenceBroker.java:893)
at
org.apache.ojb.broker.accesslayer.CollectionProxy.beforeLoading(CollectionProxy.java:175)
at
org.apache.ojb.broker.accesslayer.CollectionProxy.loadData(CollectionProxy.java:142)
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org
Re: problem ClassCastException for "addThisListenerTo"
Posted by Reda Benzair <re...@smartjog.com>.
Hi Martin
thank you for your answer
I will see that solution
thank All !
Martin Kalén wrote:
>
> Reda Benzair wrote:
>
>> Hi All
>> I have problem for the classCastException in
>> my repository file I use collections all my collection-descriptor
>> use the proxy=true !
>
> [...]
>
>> why this error , my repository ? my application ?
>
>
> It's neither - it's actually your OJB version and the
> proxy-prefetching feature that has been playing up a bit at times.
>
> I assume you are using a CVS snapshot from around the 1.0RC5 release?
> Just update from CVS head and a lot of problems using proxies
> (including yours) have been solved.
>
> (If you can't change your OJB version, try turning off proxy
> prefetching by changing the proxy-prefetching-limit to a value <=0 in
> your repository -- typically on the collection-descriptor causing
> problems.)
>
--
*Reda BENZAIR**
*Software Analyst
***
*Phone: +33 (0)1 4996 6324
Fax: +33 (0)1 4996 6405
Mobile: +33 (0)6 6240 6192
reda.benzair@smartjog.com <ma...@smartjog.com>
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org
Re: problem ClassCastException for "addThisListenerTo"
Posted by Martin Kalén <ma...@curalia.se>.
Reda Benzair wrote:
> Hi All
> I have problem for the classCastException in
> my repository file I use collections all my collection-descriptor use
> the proxy=true !
[...]
> why this error , my repository ? my application ?
It's neither - it's actually your OJB version and the proxy-prefetching
feature that has been playing up a bit at times.
I assume you are using a CVS snapshot from around the 1.0RC5 release?
Just update from CVS head and a lot of problems using proxies (including
yours) have been solved.
(If you can't change your OJB version, try turning off proxy prefetching
by changing the proxy-prefetching-limit to a value <=0 in your
repository -- typically on the collection-descriptor causing problems.)
--
Martin Kalén
Curalia AB Web: http://www.curalia.se
Orrspelsvägen 2B Mail: info@curalia.se
SE-182 79 Stocksund Tel: +46-8-410 064 40
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org