Failed to connect to Oracle Database 12c.

Does anyone have luck getting KNIME to work with Oracle DB 12c? I need some help in here.

I installed an Oracle DB 12.1.0.1 and downloaded ojdbc7.jar from the following location:

http://www.oracle.com/technetwork/database/features/jdbc/jdbc-drivers-12c-download-1958347.html

I added the driver to Knime under Preferences->KNIME->Databases

I added a Database Reader node and configured it with the following information:

Database Driver: oracle.jdbc.driver.OracleDriver

Database URL: jdbc:oracle:thin:@localhost:1521:orl

User Name: scott

Password: tiger

SQL Statement: select banner from v$version

I clicked on "Fetch Metadata" and got the following error:

Error during fetching metadata from database, reason: IO Error: The Network Adapter could not establish the connection

I executed the note and got a similar error:

Execute failed: java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection

I suspected it was the format of the connect string. But then I tried it in a standalone java program using the same ojdbc7.jar in the classpath and it worked.

The java program:

import java.sql.*;
class OracleCon{
public static void main(String args[]){
  try{
    Class.forName("oracle.jdbc.driver.OracleDriver");

    Connection con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:orcl","scott","tiger");

    Statement stmt=con.createStatement();

    ResultSet rs=stmt.executeQuery("select banner from v$version");
    while(rs.next())
      System.out.println(rs.getString(1));

         con.close();

      }catch(Exception e){ System.out.println(e);}

   }
}

The output:

$ java -cp ".;./ojdbc7.jar" OracleCon
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
PL/SQL Release 12.1.0.1.0 - Production
CORE    12.1.0.1.0      Production
TNS for Linux: Version 12.1.0.1.0 - Production
NLSRTL Version 12.1.0.1.0 - Production


I wonder why this is not working in KNIME with the same connect string. Please kindly suggest how I can debug this further. Thanks in advance.

 

 

 

 

 

 

Double post, please see here: https://tech.knime.org/forum/knime-general/failed-to-connect-to-oracle-database-12c-0