cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC sender - logon error

Former Member
0 Kudos

Hi all,

I am working on a scenario in PI 7.1 where a JDBC sender channel needs to fetch data from an Oracle database residing on another WAS. When the channel is started, following error is thrown -

Error during database connection to the database URL 'jdbc:oracle:thin:@<host>:<port>:<SID>' using the JDBC driver 'oracle.jdbc.driver.OracleDriver': 'com.sap.aii.adapter.jdbc.sql.DriverManagerException: Can not establish connection:: SQLException: ORA-01017: invalid username/password; logon denied '

I verified that the username and password are correct and they work fine when I connect to the database by using a client tool installed locally on WAS.

I came across SAP Note 400241 which talks about various Oracle related errors, but it has too many details and I am bit confused as to what things I should check. Would appreciate your help to resolve this seemingly simple error. Thanks!

-Shankar

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hello there!

First of all, check your Oracle DB data access (user ID and password), specially the password.

After, you can consult: #867176 - FAQ: Oracle JDBC

and #562863 - FAQ: Logon mechanisms, questions 6 and 7.

And if you're facing issues with the drivers between JDBC and Oracle:

#509719 - How to install Oracle JDBC Drivers

Hope it helps.

Regards,

Caio Cagnani

Answers (4)

Answers (4)

Former Member
0 Kudos

try using the ip address of the database system instead of host name , just to make sure that you are connecting to the desired box.

Former Member
0 Kudos

Sorry for replying late.

I found that the user was "locked" in database. After unlocking it, the connection worked fine. Thanks for your help. Points awarded.

-Shankar

madhusudana_reddy2
Contributor
0 Kudos

As the error is clearly telling either user or password wrong. To make sure this once again write small java program like below and connect through the java program(for this get download ojdbc14.jar to execute this program) if it will give the same error then you can confirm username and password wrong.

/*

  • Created on May 25, 2010

*

  • To change the template for this generated file go to

  • Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments

*/

//ODBC14.jar required to connect Oracle database

package com.sap.prgs;

import java.sql.Connection;

import java.sql.DriverManager;

import java.sql.ResultSet;

import java.sql.SQLException;

import java.sql.Statement;

/**

  • @author madhur

*

  • To change the template for this generated type comment go to

  • Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments

*/

public class JDBCConnection {

public static void main(String[] args) throws ClassNotFoundException, SQLException {

Connection conn = null;

Statement stmt = null;

try{

System.out.println("hello");

Class.forName("oracle.jdbc.driver.OracleDriver");

String url ="jdbc:oracle:thin:@xxx.x.xxx.xxx:port:somehost";

conn = DriverManager.getConnection(url,"username","password");

System.out.println("connection success"+conn.getClass());

stmt = conn.createStatement();

ResultSet rset =

stmt.executeQuery("SELECT column1 FROM tablename");

while (rset.next()) {

System.out.println (rset.getString(1));

}

}

catch(Exception e){

System.out.println("exception is"+e);

}

finally{

System.out.println("closing connection");

conn.close();

stmt.close();

}

}

}

thanks,

madhu

0 Kudos

Hello there!

First of all, check your Oracle DB data access (user ID and password), specially the password.

After, you can consult: #867176 - FAQ: Oracle JDBC

and #562863 - FAQ: Logon mechanisms, questions 6 and 7.

And if you're facing issues with the drivers between JDBC and Oracle:

#509719 - How to install Oracle JDBC Drivers

Hope it helps.

Regards,

Caio Cagnani

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

hi,

see this