What error do you get when you try to depploy it? Maybe the order by needs to go at the end of the query...
Here's an example from one of my
JBOSS xml
I know this works because the data is then used by a graphics routine...if the ORDER BY wasn't working it would be joining dots randomly instead of forming lines from them...which it was doing for a while before I realised my colleague had left the ORDER BY out and just used EJB-QL :roll:
If you can't get it to work for you you could sort the results in
Java, but I believe I read that is a slower way of doing it, and will also involve you writing extra code.
[ August 23, 2004: Message edited by: Ben Wood ]