File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases 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
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Cannot create PoolableConnectionFactory (Login failed for Watch "Cannot create PoolableConnectionFactory (Login failed for New topic

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

Asif Usman

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.
Rob Spoor

Joined: Oct 27, 2005
Posts: 20275

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

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

How To Ask Questions How To Answer Questions
I agree. Here's the link:
subject: Cannot create PoolableConnectionFactory (Login failed for 'userName') JTDS
jQuery in Action, 3rd edition