title: Tomcat JDBC realm login issue with SQLServer
body: <p>I'm developing a Java based REST web application that uses Jersey, Tomcat 8.0 as servlet and SQLServer 2008 as database. Some areas of the application needs authentication (the user must fill a login form with username/password in order to proceed), so I'm using Tomcat JDBC Realm to take care of that. The security restrictions and user roles seems to be working fine and the login form is being displayed correctly.</p>
  
  <p>The problem is in the user authentication in my SQLServer users table. When I call <code>HttpServletRequest.login(username, password)</code>, my SQLServer JDBC driver performs the connection to the database correctly but throws a SQLServerException complaining about an error in the query syntax. Does anyone knows what might be the issue, or at least how can I see the query that the driver is trying to send to the SQLServer? (The access to the database using the SQLServer driver for java works perfectly fine on all other areas of the application.)</p>