Hello
we also had issues with using sublist and now I do not remember now
where/how I associated it to apache common lib versions. it could be
common-collections and *not* common-lang.
I see this
//result = isNextPage() ? results.subList(0, pageSize) : results;
// some problem with sublist , need to fix later
in old code and the new code is working with sublist w/o explicit casts.
results = query.setFirstResult(pageNum * pageSize)
.setMaxResults(pageSize + 1)
.getResultList();
result = getHasNextPage() ? results.subList(0, pageSize) : results;
we are using
commons-lang-2.1
commons-collections-3.2
commons-chain-1.1
commons-beanutils-1.7.0
may be worth a try if everything else fails.
Thanks
- rajeev.
On Fri, Mar 21, 2008 at 6:46 AM, francisco treacy
<[EMAIL PROTECTED]> wrote:
> jacques,
>
> imho no relation to commons-lang.
>
> given openjpaList and the start/end indexes, you should try grabbing
> the list provided by openjpa, and doing this:
>
> List sublist = new ArrayList(openjpaList).subList(fromIndex, toIndex);
>
> hth,
>
> francisco
>
>
>
> On Thu, Mar 20, 2008 at 1:37 PM, Jacques Belissent <[EMAIL PROTECTED]> wrote:
> > Hi Rajeev,
> >
> > I get the same behavior with both 2.3 and 2.4.
> >
> > Jacques
> >
> >
> >
> >
> >
> > On Thu, Mar 20, 2008 at 12:46 AM, Rajeev Jha <[EMAIL PROTECTED]> wrote:
> >
> > > can you try with latest version of apache common-lang? what is your
> > > current version of comman-lang?
> > >
> > > On Thu, Mar 20, 2008 at 11:52 AM, Jacques Belissent <[EMAIL PROTECTED]>
> > > wrote:
> > > > Hi,
> > > >
> > > > I am getting the following exception when using OpenJPA 1.0.2.
> > > >
> > > > Looks like subList is not implemented. Is this expected? Is there a
> > > > workaround?
> > > >
> > > > java.lang.UnsupportedOperationException
> > > > at org.apache.openjpa.lib.rop.AbstractResultList.subList(
> > > > AbstractResultList.java:84)
> > > > at org.apache.openjpa.kernel.DelegatingResultList.subList(
> > > > DelegatingResultList.java:308)
> > > > ...
> > > >
> > > > Thanks.
> > > > Jacques
> > > >
> > >
> >
>