Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Asif Usman
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 20527
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic