0

I have a windows integrated connection to the MSSQL database with kerberos authentication.Additionally, i am using the waffle filter for SSO.

This connection uses jtds1.3.1.jar file. The SSO need the ntlmauth.dll. I am using tomcat as my application server.

However, I noticed that this works for only one webapp deployed at a time. if i have same setting for multiple webapps, all fail but one. This is quite a strange behavior. any idea what's happening here

TylerH
  • 20,799
  • 66
  • 75
  • 101
shirjai
  • 243
  • 2
  • 5
  • 20

1 Answers1

0

sorry guys . i found the solution in another post below is the link

https://stackoverflow.com/a/10645025/3890202

Each web application has its own Classloader (isolating them). When you call the Class.forName() method, there is a static block which is trying to load the shared library (dll file) - so both the web apps are trying to load the shared lib, hence the error message when the second one attempts to load.

The JDBC jar i.e. jtds1.3.1.jar should be moved from being bundled with your wars, to the tomcat 7.0/lib folder and copy the ntlmauth.dll to tomcat/bin folder - this way it will be in the tomcat parent classloader, and the class will only be loaded once.

Community
  • 1
  • 1
shirjai
  • 243
  • 2
  • 5
  • 20