Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unable to connect to SQL server using JTDS

 
Ananth Chellathurai
Ranch Hand
Posts: 349
Eclipse IDE Hibernate Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranchers,

I am struggling to connect to SQLServer using jtds-1.2. I am able to connect to the server using Enterprise Manager, but when I tried through my application it throws exceptions. This is how I try,


This is my exception



Any help could be appreciated.

Ananth Chellathurai
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
java.sql.SQLException: Login failed for user 'ananth_chellathurai'.


Are you sure, you are passing the correct password? Where does the username and password come from, in your code?
[ September 04, 2008: Message edited by: Jaikiran Pai ]
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'll move this to our JDBC forum, where you might get more response.
 
Ananth Chellathurai
Ranch Hand
Posts: 349
Eclipse IDE Hibernate Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The user name and password are same while I try to access it through jtds and enterprise manager. User name is ananth_chellathurai is my windows user name. I am sure I am providing the right password too.

Ananth Chellathurai
 
Ananth Chellathurai
Ranch Hand
Posts: 349
Eclipse IDE Hibernate Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried to connect using a database user name and I have succeeded to get a connection. But the problem is when I tried using my windows user id and password.

Any guess on what I miss here?

Ananth Chellathurai
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are using NTLM, have you tried including the domain (see the jTDS FAQs for more about connection oprions)?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic