Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7951289
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T02:30:59+00:00 2026-06-04T02:30:59+00:00

I have 2 java web apps that need to connect to SQL Server Database

  • 0

I have 2 java web apps that need to connect to SQL Server Database using Windows Integrated Authentication.

The first one that is loaded works fine but the second one throws the exception:

Native Library sqljdbc_auth.dll already loaded in another classloader

The error above occurs when I place the sqljdbc_auth.dll in one of the folders:

  • C:\WINDOWS\system32\
  • C:\Program Files\Apache Software Foundation\Tomcat 7.0\bin\

If I place the sqljdbc_auth.dll in one of the folders below:

  • /WEB-INF/lib directory of each web application
  • C:\Program Files\Apache Software Foundation\Tomcat 7.0\lib\

Both apps throw the exception:

Failed to load the sqljdbc_auth.dll cause :- no sqljdbc_auth in java.library.path

I am using this code to load the driver:

Class.forName("jdbc:sqlserver://<HOST>;databaseName=<DBNAME>;integratedSecurity=true;");

How can I solve it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T02:31:01+00:00Added an answer on June 4, 2026 at 2:31 am

    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 your web apps are trying to load the shared lib, hence the error message when the second one attempts to load.

    The JDBC jar you have for sqlserver should be moved from being bundled with your wars, to the tomcat 7.0/lib folder and copy the sqljdbc_auth.dll to tomcat/bin folder – this way it will be in the tomcat parent classloader, and the class will only be loaded once.

    |----------------------------------|
    | sqljdbc*.jar     --> tomcat*/lib |
    |----------------------------------|
    | sqljdbc_auth.dll --> tomcat*/bin |
    |----------------------------------|
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Java based web-application using Java Server Faces and Facelets. I am
I have numerous Corba servers and some other java apps (not web). I wish
I have a Java web-service which currently runs on a local tomcat server. I
We have a Java EE-based web application running on a Glassfish app server cluster.
I have web services written using java which interacts with the android application only
We have a couple of Java Web applications that serve different purposes (one for
So, I'm rolling-my-own Java-based application server (because Glassfish, et al, aren't for non-web-based apps),
I have a Java web application at my work and I'd like simplify how
I have a Java Web Start application. I specify the resource (jars, images, etc)
I have a Java web service and a Java web client making use of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.