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 kishore talagadadeevi <kt...@hotmail.com> on 2004/11/04 00:12:13 UTC
RemovalAwareCollection- limitation
Hi ,
I am using RemovalAwareCollection for 1:n mapping for part - subparts
relation.
But if the part has more than 51 subparts, I am getting the
ClassCastException :
I am using OJB V1.0 ODMG API ...
I want to know whether any limitation on collection size ...
thanks
Exception is :
Caused by: org.apache.ojb.broker.PersistenceBrokerException:
java.lang.ClassCastException: part.ojb.PartImpl
at
org.apache.ojb.broker.accesslayer.CollectionProxy.loadData(CollectionProxy.java:160)
at org.apache.ojb.broker.accesslayer.ListProxy.loadData(ListProxy.java:187)
at
org.apache.ojb.broker.accesslayer.CollectionProxy.getData(CollectionProxy.java(Compiled
Code))
at
org.apache.ojb.broker.accesslayer.CollectionProxy.toArray(CollectionProxy.java:248)
at part.ojb.PartImpl.getChildren(PartImpl.java(Inlined Compiled Code))
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org
Re: RemovalAwareCollection- limitation
Posted by Jakob Braeuchi <jb...@gmx.ch>.
hi kishore,
there's no limitation of the size in collection-proxy. you're using a rather old
version of ojb and the proxy-stuff has been moved to a new package, but from
what i know i think the error is coming from:
..
else if (m_size != 0)
{
result = (Collection)
getBroker().getCollectionByQuery(getCollectionClass(), getQuery());
}
else
{
result = (Collection) getCollectionClass().newInstance();
}
..
your class part.ojb.PartImpl cannot be casted to a Collection. have you checked
your repository ?
hth
jakob
kishore talagadadeevi schrieb:
> Hi ,
>
> I am using RemovalAwareCollection for 1:n mapping for part - subparts
> relation.
> But if the part has more than 51 subparts, I am getting the
> ClassCastException :
> I am using OJB V1.0 ODMG API ...
>
> I want to know whether any limitation on collection size ...
>
> thanks
>
> Exception is :
>
> Caused by: org.apache.ojb.broker.PersistenceBrokerException:
> java.lang.ClassCastException: part.ojb.PartImpl
> at
> org.apache.ojb.broker.accesslayer.CollectionProxy.loadData(CollectionProxy.java:160)
>
> at
> org.apache.ojb.broker.accesslayer.ListProxy.loadData(ListProxy.java:187)
> at
> org.apache.ojb.broker.accesslayer.CollectionProxy.getData(CollectionProxy.java(Compiled
> Code))
> at
> org.apache.ojb.broker.accesslayer.CollectionProxy.toArray(CollectionProxy.java:248)
>
> at part.ojb.PartImpl.getChildren(PartImpl.java(Inlined Compiled Code))
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org