aspose file tools*
The moose likes JDBC and the fly likes JDBC-DB2 connectivity issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "JDBC-DB2 connectivity issue" Watch "JDBC-DB2 connectivity issue" New topic
Author

JDBC-DB2 connectivity issue

Sandesh Jadhav
Greenhorn

Joined: Nov 01, 2008
Posts: 14
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

Joined: Apr 14, 2004
Posts: 10336


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?


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Sandesh Jadhav
Greenhorn

Joined: Nov 01, 2008
Posts: 14
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

Joined: Nov 01, 2008
Posts: 14
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JDBC-DB2 connectivity issue