Latest Entries »

Monday, June 23, 2014

JNDI Connection - Pentaho Report Designer

As a major design principle, we have always encouraged developers to move away from using hardcoded hostnames and use JNDI instead. Major reason for that being that the code remains loosely coupled with the configuration files. You would not need to rebuild your code if there are changes and it acts like a macro which can be used anywhere throughout the code driven by configuration.

Follow the below steps for configuring Pentaho Report Designer to use the JNDI connection. For this example, I will take the MySQL Connection as an example.

Step - 1: JDBC Driver

The JDBC Driver should reside in the location - lib/jdbc at the path where your report designer is installed or extracted. Thus, to provide a mysql connectivity to your report designer, download the mysql-connector and place it in that path.

Step - 2: Configuring JDBC Connection and Setting JNDI Properties

When installing Pentaho, it always creates a hidden directory inside the User Home where it keeps it's configuration files.

Windows - c:/Users//.pentaho
Linux/Mac - $HOME/.pentaho

Inside this directory, you should be able to find the file ".pentaho/simple-jndi/default.properties". Open this file and edit it as follows. Your JNDI is not SampleData



Step - 3: Report Designer Configuration

Watch the below video for Report Designed Configuration