Pentaho

 View Only

 I have the following problem when trying to connect to an Oracle database:

  • Pentaho
  • Kettle
  • Pentaho
  • Pentaho Data Integration PDI
Giovani Stefani's profile image
Giovani Stefani posted 09-11-2018 19:02

I have the following problem when trying to connect to an Oracle database:

Error connecting to database [DWH] :org.pentaho.di.core.exception.KettleDatabaseException:

Error occurred while trying to connect to the database

Error connecting to database: (using class oracle.jdbc.driver.OracleDriver)

no dbjodbc16 in java.library.path

org.pentaho.di.core.exception.KettleDatabaseException:

Error occurred while trying to connect to the database

Error connecting to database: (using class oracle.jdbc.driver.OracleDriver)

no dbjodbc16 in java.library.path

Has anyone ever experienced this?


#PentahoDataIntegrationPDI
#Pentaho
#Kettle
Ricardo Miguel Díaz Razo's profile image
Ricardo Miguel Díaz Razo

Hi Giovany,

I supposed that you are trying to connect to Oracle 10g?

What version of Pentaho are using?

Try make a copy of:

C:\oracle\product\10.2.0\client_1\jdbc\lib\ojdbc14.jar

C:\oracle\product\10.2.0\client_1\jdbc\lib\classes12.jar

C:\oracle\product\10.2.0\client_1\jdbc\lib\classes12.zip

C:\oracle\product\10.2.0\client_1\BIN\ocijdbc10.dll

to (If you are using Windows)

C:\Pentaho\data-integration\libswt\win64

C:\Pentaho\data-integration\libswt\win32

Giovani Stefani's profile image
Giovani Stefani

I'm trying to connect to Oracle 12 with PDI 8.1, but I'll try to use your solution

zozo alio's profile image
zozo alio

am trying to connect but nothing

Alain Debecker's profile image
Alain Debecker

If I already experienced this? Yes, every time I install PDI on a new machine since 2007.

For license reasons, Pentaho is not allowed to ship you all the JDBC drivers. Except for a few databases, you have to install them.

This means:

  • google for the appropriate driver which depends on your machine (linux/WIndows, 32/64b,...) and your database version (on oracle.com you'll find Oracle18 but you need Oracle10).
  • download and find a file whose name looks like dbjodbc16.jar. The file name is usually different but it must for sure be a jar fil.
  • copy that jar in the lib directory of your PDI installation.
  • restart your spoon.
  • install this jar file on any other machine on which you want to run PDI.
Giovani Stefani's profile image
Giovani Stefani

Hi Alain, I have the JDBC drivers for the databases I want to access. They are all in the folder C:\PDI\data-integration\lib.

But I could not find the file dbjodbc16.jar to download.

Ana Gonzalez's profile image
Ana Gonzalez

Well, the exact name of the driver is ojdbc8.jar, Alain was giving you the general steps to retrieve the driver, probably write it from memory. Do you have the ojdbc8.jar library in your lib directory and are you still having issues?

Regards

Alain Debecker's profile image
Alain Debecker

You'll find what you need on Oracle download page : *:

Download, unzip, copy to C:\PDI\data-integration\lib, restart PDI.

If the problem persists, please specify your OS (Windows, linux, Mac) and

post the full log (the bub may come from elsewhere).

Thanks to Ana for pointing at the typo.

AlainD

On Mon, Nov 19, 2018 at 10:43 AM Giovani Stefani <

Giovani Stefani's profile image
Giovani Stefani

I have the drive in the lib folder and the problem is still occurring.

Giovani Stefani's profile image
Giovani Stefani

Thanks Alain, the log is attached.

Alain Debecker's profile image
Alain Debecker

Hi Giovanni,

The issue is in a step named *estabelecimento_endereco *which (tries to)

open a connection

with a ODBC protocol rather that with a JDBC protocol.

In the Connection definition window, on the Access panel (middle down),

select Native (JDBC) rather than ODBC.

Regards,

AlainD

On Mon, Nov 19, 2018 at 2:10 PM Giovani Stefani <

Giovani Stefani's profile image
Giovani Stefani

I'm using JNDI connection...conn

Alain Debecker's profile image
Alain Debecker

And I guess that by Murphy's law you do not have the credentials of the

Orcale connection so that you can switch to ordinary plain JDBC.

The facts is that even findjar.com does not find a jar named or containing

dbjodbc16. So I do not see where the import can come from except from a

recompile of PDI or Jini.

On Mon, Nov 19, 2018 at 3:19 PM Giovani Stefani <

Giovani Stefani's profile image
Giovani Stefani

Can be a bug

Ana Gonzalez's profile image
Ana Gonzalez

In the pdi.log file there's a line saying:

Unable to find datasource by JNDI name: dwp

It previously says that it can't find the library dbjodbc16, but maybe there's something wrong with the configuration of JNDI connection first.

What do you have in your ~/data-integration/simple-jndi/jdbc.properties file? That is where the JNDI connection dwp should be configured, you should have something like:

dwp/type=javax.sql.DataSource

dwp/driver=oracle.jdbc.OracleDriver

dwp/user=youruser

dwp/password=yourpassword

dwp/url=jdbc:oracle:thin:@yourhost:yourport/yoursid

Alain Debecker's profile image
Alain Debecker

That's exactly what you need to have.

Up to one point. The documentation mention :

 

*Note: It is important that the information stored in jdbc.properties

mirrors the content of your application server data sources. *

 

This is security measure to prevent unwanted geek to access sensible

production databases.

 

What happens if you put the exact same parameters in a native jdbc

connection ?

 

On Tue, Nov 20, 2018 at 12:29 PM Ana Gonzalez <

Data Conversion's profile image
Data Conversion
Attachment  View in library
Data Conversion's profile image
Data Conversion
Attachment  View in library
Data Conversion's profile image
Data Conversion
Attachment  View in library
erro.PNG 47 KB
Data Conversion's profile image
Data Conversion
Attachment  View in library
drive.PNG 20 KB