You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Avni, Itamar" <It...@verint.com> on 2011/04/13 14:59:20 UTC

Tomcat Windows Integrated Authentication fails with More than 1 Web Application

Hi all,

I'm using Tomcat 5.5.23 on a Windows server 2003 (64 bit).
Tomcat runs as a window service, using an Active Directory account.
DB is configured to Windows Authentication mode alone.

Tomcat contains 2 web applications.
The DLL's (sqljdbc_auth.dll) location is the value of Tomcat's -Djava.library.path parameter.

Result:
The container loads, the first web application loads and successfully establishes a connection to the DB,
But the second web application fails to connect to DB, prompting:
com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication.

Ahhh,
When loading tomcat with only a single web application (either one), the web application successfully connect to the DB.
This is why I don't think the reason is at web.xml.

Any idea?

Thanks,
Itamar


This electronic message may contain proprietary and confidential information of Verint Systems Inc., its affiliates and/or subsidiaries.
The information is intended to be for the use of the individual(s) or
entity(ies) named above.  If you are not the intended recipient (or authorized to receive this e-mail for the intended recipient), you may not use, copy, disclose or distribute to anyone this message or any information contained in this message.  If you have received this electronic message in error, please notify us by replying to this e-mail.


Re: Tomcat Windows Integrated Authentication fails with More than 1 Web Application

Posted by Mark Eggers <it...@yahoo.com>.
----- Original Message ----
From: André Warnier <aw...@ice-sa.com>
To: Tomcat Users List <us...@tomcat.apache.org>
Sent: Thu, April 14, 2011 12:31:41 AM
Subject: Re: Tomcat Windows Integrated Authentication fails with More than 1 Web 
Application

Avni, Itamar wrote:
> OK.
> 
> 
> 
> You can follow at 
>http://social.msdn.microsoft.com/Forums/en-US/sqldataaccess/thread/c66d9782-f3e7-4317-b6e4-22e0446a63e0/.
>
> 
Right.

So I gather that the solution was :

quote
The solution was to copy sqljdbc.jar to apache’s common\lib, deleting it from 
both web applications’ WEB-INF\lib.
unquote

Now maybe someone smarter than me can hasard a guess as to /why/ this would be, 
for the benefit of all ?

Such as : Windows not liking when one establishes two separate connections to 
the same DB host, using the same Windows credentials ? And giving a misleading 
error message when one tries that ?


----- Original Message ----

My guess is that a component of the sqljdbc.jar file loads a DLL via JNI. 
Putting the jar file in WEB-INF/lib means that you would get multiple copies of 
the DLL in memory (oops).

So either the code in sqljdbc.jar needs to be changed to check if the DLL is 
already loaded (might be a bit tricky with multiple classsloaders), or you can 
put sqljdbc.jar where it's only loaded once ($CATALINA_HOME/common/lib in this 
case).

At least that's my guess . . .

. . . just my two cents.

/mde/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat Windows Integrated Authentication fails with More than 1 Web Application

Posted by André Warnier <aw...@ice-sa.com>.
Avni, Itamar wrote:
> OK.
> 
> 
> 
> You can follow at http://social.msdn.microsoft.com/Forums/en-US/sqldataaccess/thread/c66d9782-f3e7-4317-b6e4-22e0446a63e0/.
> 
Right.

So I gather that the solution was :

quote
The solution was to copy sqljdbc.jar to apache’s common\lib, deleting it from both web 
applications’ WEB-INF\lib.
unquote

Now maybe someone smarter than me can hasard a guess as to /why/ this would be, for the 
benefit of all ?

Such as : Windows not liking when one establishes two separate connections to the same DB 
host, using the same Windows credentials ? And giving a misleading error message when one 
tries that ?



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Tomcat Windows Integrated Authentication fails with More than 1 Web Application

Posted by "Avni, Itamar" <It...@verint.com>.
OK.



You can follow at http://social.msdn.microsoft.com/Forums/en-US/sqldataaccess/thread/c66d9782-f3e7-4317-b6e4-22e0446a63e0/.



Itamar



-----Original Message-----
From: André Warnier [mailto:aw@ice-sa.com]
Sent: Wednesday, April 13, 2011 4:13 PM
To: Tomcat Users List
Subject: Re: Tomcat Windows Integrated Authentication fails with More than 1 Web Application



Avni, Itamar wrote:

> Hi all,

>

> I'm using Tomcat 5.5.23 on a Windows server 2003 (64 bit).

> Tomcat runs as a window service, using an Active Directory account.

> DB is configured to Windows Authentication mode alone.

>

> Tomcat contains 2 web applications.

> The DLL's (sqljdbc_auth.dll) location is the value of Tomcat's -Djava.library.path parameter.

>

> Result:

> The container loads, the first web application loads and successfully establishes a connection to the DB,

> But the second web application fails to connect to DB, prompting:

> com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication.

>

> Ahhh,

> When loading tomcat with only a single web application (either one), the web application successfully connect to the DB.

> This is why I don't think the reason is at web.xml.

>

> Any idea?

>

Yes : you should probably ask this question on the appropriate Microsoft help forum, about

how to setup this driver properly for WIA with multiple webapps.

Not that nobody here may not /want/ to help, but the knowledge of how the Microsoft

drivers work, under Windows, with WIA, is probably not something many people here know about.



---------------------------------------------------------------------

To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org

For additional commands, e-mail: users-help@tomcat.apache.org



This electronic message may contain proprietary and confidential information of Verint Systems Inc., its affiliates and/or subsidiaries.
The information is intended to be for the use of the individual(s) or
entity(ies) named above.  If you are not the intended recipient (or authorized to receive this e-mail for the intended recipient), you may not use, copy, disclose or distribute to anyone this message or any information contained in this message.  If you have received this electronic message in error, please notify us by replying to this e-mail.


Re: Tomcat Windows Integrated Authentication fails with More than 1 Web Application

Posted by André Warnier <aw...@ice-sa.com>.
Avni, Itamar wrote:
> Hi all,
> 
> I'm using Tomcat 5.5.23 on a Windows server 2003 (64 bit).
> Tomcat runs as a window service, using an Active Directory account.
> DB is configured to Windows Authentication mode alone.
> 
> Tomcat contains 2 web applications.
> The DLL's (sqljdbc_auth.dll) location is the value of Tomcat's -Djava.library.path parameter.
> 
> Result:
> The container loads, the first web application loads and successfully establishes a connection to the DB,
> But the second web application fails to connect to DB, prompting:
> com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication.
> 
> Ahhh,
> When loading tomcat with only a single web application (either one), the web application successfully connect to the DB.
> This is why I don't think the reason is at web.xml.
> 
> Any idea?
> 
Yes : you should probably ask this question on the appropriate Microsoft help forum, about 
how to setup this driver properly for WIA with multiple webapps.
Not that nobody here may not /want/ to help, but the knowledge of how the Microsoft 
drivers work, under Windows, with WIA, is probably not something many people here know about.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org