Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JDBC-DB2 connectivity issue

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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




 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.

 
Grow a forest with seedballs and this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/t/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic