File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Cannot create PoolableConnectionFactory (Login failed for 'userName') JTDS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Cannot create PoolableConnectionFactory (Login failed for Watch "Cannot create PoolableConnectionFactory (Login failed for New topic
Author

Cannot create PoolableConnectionFactory (Login failed for 'userName') JTDS

Asif Usman
Greenhorn

Joined: Mar 16, 2009
Posts: 12
Hi All,

Need help to create a connection pooling for J2EE web application with MSSQL Server 2008 using JTDS.

Environment :
OS : Windows XP
Java : java version "1.7.0"
Tomcat : version 7.0

I had used JTDS to create connecction pooling.

Here is my context.xml file contents



and here is my web.xml contents



and here is the Java code to create datasource



I am using Windows authentication mode.
I already put my jtds-1.2.5.jar file in WEB-INT\lib and TOMCAT\lib
and i put ntlmauth.dll in jdk1.7.0/bin and C:\windows\system32 folders.

When i run application its giving following error:




Please help to resolve this error.

Thanks in Advance.
Asif
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19679
    
  18

You can't connect using a domain / Windows account like that. With Microsoft's own driver you need to either use integrated security and use the current user's* credentials to login, or provide a database login. With JTDS it may be different; check http://stackoverflow.com/questions/167464/can-i-connect-to-sql-server-using-windows-authentication-from-java-ee-webapp

* Current user here means the user that's running Tomcat.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Cannot create PoolableConnectionFactory (Login failed for 'userName') JTDS