-
1. Re: findall is not sorting
sundaram Nov 14, 2001 2:23 PM (in response to sundaram)FYI,
> There's a bug in versions from about 2.4 to 2.4.3 that causes this to
> not work. The workaround is simply to call the finder something other
> than findAll. Fix is in for version 2.4.4
>
So I have changed like this.
findByUserid
userid like {0}
userid, last_update
<read-ahead>true</read-ahead>
from my client program I will call like this
s.findByUserid( "%");
it returns all records order by userid and last_update field. -
2. Re: findall is not sorting
zx44093 Nov 18, 2001 4:46 PM (in response to sundaram)I have a very strange problem with findAll. It always missing the last two elements in the collection. I convert it to an array like this:
Cd[] = (Cd[])((cdHome.findAll()).toArray(new Cd[0]));
If I reference the last two element in the array, I will get the following error:
[CdBean] TRANSACTION ROLLBACK EXCEPTION:Load failed; nested exception is:
java.lang.NullPointerException; nested exception is:
java.rmi.ServerException: Load failed; nested exception is:
java.lang.NullPointerException
[CdBean] java.rmi.ServerException: Load failed; nested exception is:
[CdBean] java.lang.NullPointerException
[CdBean] java.lang.NullPointerException
[CdBean] at java.lang.reflect.Field.set(Native Method)
[CdBean] at org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.setCMPFie
ldValue(JDBCCommand.java:655)
[CdBean] at org.jboss.ejb.plugins.jaws.jdbc.JDBCLoadEntityCommand
.loadOneEntity(JDBCLoadEntityCommand.java:217)
[CdBean] at
....... -
3. Re: findall is not sorting
zx44093 Nov 19, 2001 8:24 PM (in response to sundaram)I finally found the problem. It was caused by some null value in the database.