Line 97 of your error log states,
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException:
Only one expression can be specified in the select list when the subquery is not introduced with EXISTS.
However, even if you fix this you might still be in trouble. The JDBC driver does not support SQL scripting. See Are comments in Named Queries known to not work correctly? - #11 by pturmel, etc., for more. (There are other posts on the forum. Try searching for "JDBC".)