This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
A spring based application is running on "SERVER A" and tries to connect to a MS SQL 2000 database instance on "SERVER B". The SQL server running on "SERVER B" is set to allow mixed mode authentication (SQL as well as Windows Authentication).
When connecting using SQL authentication I get the following
"java.sql.SQLException: Login failed for user 'MYUSERNAME'. Reason: Not associated with a trusted SQL Server connection."
I researched a bit and found the cause to be associated with NTLM support. Since both the servers are windows based I thought i'll connect using Windows Authentication. I downloaded the required file (ntlmauth.dll) and placed it in the appropriate path. If I don't specify the username and password in the database connection properties jTDS assumes the authentication type to be Windows based (Please correct me if I am wrong).
Now when the application connects I get the following exception
"org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.)"
It doesn't seem to be getting the associated windows username. How do I enable support for NTLM in Tomcat 6? Is there anything that I am missing?
It would be really great if someone could shed some light on this.
P.S : The application connects perfectly to a database on the same server. We started having this problem since moving the database to a different server (SERVER B).