Application Servers Information - Apache Tomcat - When attempting to connect to a sql server instance with Tomcat and the jtds driver you are unable to connect
Purpose
This page provides a solution to the issue of you are unable to connect to a sql server instance with Tomcat and the jtds driver
Details
When attempting to connect to a sql server instance with Tomcat and the jtds driver, you are unable to connect
The error you may notice is something like:
Unable to establish connection to: jdbc:jtds:sqlserver://
The issue relates to the locking mechanism for JTDS regarding it’s proprietary natively compiled DLL ’ntlmauth.dll’ utilized by the individual jars. CAST default dashboard deployments include JTDS as a part of an individual webapp’s deployment library, but the inclusion of single-sign on authentication requires that the JTDS driver be shared by deploying it as a shared resource across the entire Tomcat instance (common lib). Failure to do this means that individually loaded libraries referencing a deployed ntlmauth.dll may encounter that the dll is not available as it is being referenced by another webapp’s JTDS driver.
So deployment should be in this case:
jtds DDLs placed in Tomcat library space : Tomcat\lib
jtds SSO native library (ntlmauth.dll) placed in Tomcat bin space : Tomcat\bin
Removal of jtds DDLs from webapp level lib
Notes / Comments
Related Pages