tsvetozar ---- <[email protected]> writes: > sorry for the late reply, but I wanted to test it some more. here is the stack > trace I am getting: > > java.sql.SQLException: Java exception: ': java.lang.NullPointerException'. [...] > the query is a simple SELECT * from ... with an order by on an index. there > are 2 clob, 2 blob, 1 long varchar and a few more varchar(with-limit) fields > in table.
Thanks, I'm able to reproduce this problem and have filed a bug report: https://issues.apache.org/jira/browse/DERBY-4245 By the way, you mentioned that the ORDER BY was on an index, but the stack trace indicates that the index is not used (the NPE is thrown while sorting the result, but no sorting should be performed if the index is used for ordering). You may want to check that you actually have an index on the ORDER BY column and that the index has the same ordering as specified by the ORDER BY clause. For instance, an ascending index on column X cannot be used to order the result descending by column X. -- Knut Anders
