tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: [OT] ms sql integrated auth woes
Date Tue, 06 Apr 2010 19:48:35 GMT
Hash: SHA1


I've marked this thread OT because it's about JDBC driver configuration,
not Tomcat configuration. If you're getting a SQLServerException then
your Tomcat configuration is correct, as far as getting your JDBC driver
installed, connection pool configured, etc. At this point, it's about
configuring the driver properly.

On 4/3/2010 10:45 PM, Michael Dockery wrote:
> I get this error when my webapp on tomcat6 connects to ms sql via 1.2
> jdbc driver using integrated auth.
> This driver is not
> configured for integrated authentication.

Sounds pretty straightforward.

> i have the sqljdbc_auth.dll in win\sys32 and other places

I would put sqljdbc_auth.dll into Tomcat's lib directory and make sure
that java.library.path includes %CATALINA_HOME%\lib, rather than putting
this .dll file into the OS's lib dirs.

By the way, I've never seen "win\sys32" as a meaningful path. Is this
just shorthand for "%HOMEDRIVE%\Windows\System32"?

> the it all works when i restart tomcat

Can you be a bit more clear?

> but when i redeploy the webapp, it get the error.

Where is your mssql.jar file located?

> i saw a thread dealing with native libs or dll's can only be loaded
> once or such

Correct, native libraries can only be loaded once. If you have a Java
library that loads a native library, you just need to make sure that the
Java library is only initialized once. If you are using Tomcat in the
typical way, you should have a JNDI <Resource> configured for a JDBC
connection pool, and your mssql.jar file will be in %CATALINA_HOME%\lib.
In this setup, your JDBC driver should only be initialized once, and
therefore the native library should only be loaded once.

Can you stop Tomcat, delete all log files, start it up, use a
connection, redeploy your webapp, try to use a connection again, then
shut down Tomcat, then post the catalina.out file that gets produced
from having done all that? It should include good information such as
the full stack trace for the exception shown above, as well as
potentially other exception information that you also haven't yet posted.

- -chris
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla -


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message