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

JDBC-DB2 connectivity issue

 
Sandesh Jadhav
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am working on a java web service which I have deployed on Tomcat 5.5. I am using the following driver to connect to the DB2 v8.1 database

Class.forName("com.ibm.db2.jcc.DB2Driver");

I have also included required jars in '%CATALINA_HOME%/common/lib/' Still I am getting the following error:

<faultcode>soapenv:Server.userException</faultcode>
<faultstring>com.ibm.db2.jcc.c.SqlException: Connection authorization failure occurred. Reason: User ID or password invalid.</faultstring>


I googled on this then I found out that this is a jdbc driver related issue. Is it or may be I should use the different driver?


Thanks,
Sandesh




 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

User ID or password invalid.

Looks like your user id or password is invalid. DB2 uses kerberos to authenticate users I think, can you connect to DB2 using any client?
 
Sandesh Jadhav
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually I am passing my machine id and password along with the connection string as the database is on my machine only and it's works fine when I run it as a standalone java application. But when I try to run it on a tomcat, it gives me that error.
 
Sandesh Jadhav
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sandesh Jadhav wrote: I am passing valid user id and password to connect to the database along with the connection string. It works fine when I run it as a standalone java application. But when I try to run it on a tomcat, it gives me that error.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic