The column does not allow null and I double-checked that none of the
rows contained nulls.
The code that the stackTrace points to is this (line 1219 to be
precise). What's interesting is that if I replicate the relevant code
in my program, I can't find anything that would cause the
nullPointerException.
1210 if (column.getType() instanceof String)
1211 {
1212 if (spacePos == -1)
1213 {
1214 orderByClause.add(
1215
db.ignoreCaseInOrderBy(orderByColumn));
1216 }
1217 else
1218 {
1219 orderByClause.add(
1220 db.ignoreCaseInOrderBy(
1221 orderByColumn.substring(0,
spacePos))
1222 +
orderByColumn.substring(spacePos));
1223 }
1224 selectClause.add(
1225 db.ignoreCaseInOrderBy(table + '.' +
columnName));
1226 }
1227 else
1228 {
1229 orderByClause.add(orderByColumn);
1230 }
> I ran into a problem with adding an order by when the database column
> allowed null values. Just for the sake of testing, make sure that there
> are no nulls in the column that you are ordering by. If this solves
> your problem then we have another instance of a bug that I reported
> under TRQS91.
>
> I have not tested this for numeric columns. However, if your javaType
> for the table in question is set to primative, number columns will
> return 0 instead of null anyway.
>
> BTW - my database is Oracle.
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>