To be honest I'm not sure where is the problem but try the following:
Perhaps the characters ' before and after the ?1 are missing, it'd be like this ...
[CDATA[SELECT OBJECT(a) FROM StatusEntity AS a WHERE a.name= '?1']]
In SQL you can't compare with a String without those '
If it still doesn't work try redefining the query in jboss-ql. I know it's not the best solution but if it works you can go on working and don't wasting more time in this silly problems.
Good luck and you'll tell me if it works! I hope so!
The single ? should be correct because whatever you entered is converted to a Preparedstatement, so all the "IN" variables and "OUT" variables will be converted to ?. There is something else thats causing the issue. Can you post the stack tracE?