Hi

I recently had to switch over two of my webapps hosted on Tomcat 6.0.16 from
sql server authentication to windows authentication. I'm using the latest
v1.2 sqljdbc driver, copies the authentication lib to the system32
directory, configured tomcat to run under the local administrator account
(yeah I know.. but it's just a functionality test at this point) and then
tested if the app still worked on my development box.

It did. Then I tested the second application and it worked as well. Then I
deployed both application on my test server and tested again. And now, one
of the two couldn't access the database anymore. I copied the authentication
lib (sqljdbc_auth.dll) for the appropriate architecture not only to
system32, but also the tomcat lib directory and even the lib directory of
each of my webapps but to no avail. Booted the box, started, stopped and
redeployed the two apps multiple times but it always boils down to this:
The first application to make a connection to the database succeeds in doing
so and it will have access to the DB until I stop it (or stop tomcat). The
second app to try and access the database can never connect and gets the
error you get when sqljdbc_auth.dll is not in the path.

I even went as far as to specify the lib path in the Tomcat startup options
(-Djava.library.path=path of sqljdbc_auth.dll) but to no avail.

Seeing that standalone applications making use of the same jdbc driver have
no trouble accessing the db (with the authentication lib stored only in the
system32 directory) this seems to be some weird interop issue between the
driver itself and Tomcat but I'm at a loss how to track down what is really
going wrong.

Regards
Stephan

Reply via email to