Skip to main content
Pentaho Documentation

Define JNDI Connections for Report Designer and Metadata Editor

Once you have chosen to use the JNDI access protocol, here are configuration tasks you can perform.

Add Drivers

The driver enables design tools to connect to the Pentaho Server and verify that the model is correct. Your database administrator, Chief Intelligence Officer, or IT manager should be able to provide the appropriate driver. If not, you can download drivers from your database vendor's website. Check the Components Reference to ensure that your database and its driver is supported.

When you have the correct driver, copy it to these directories on all machines that run the design tools you chose to install. Design tools should not be running when you do this. Once the driver is in place, you can start the design tools:

  • Aggregation Designer: /pentaho/design-tools/agg-designer/drivers/
  • Metadata Editor: /pentaho/design-tools/metadata-editor/libext/JDBC/
  • Report Designer: /pentaho/design-tools/report-designer/lib/jdbc/
  • Schema Workbench: /pentaho/design-tools/schema-workbench/drivers/

There should be only one driver for your database in this directory. Ensure that there are no other versions of the same vendor's driver in this directory. If there are, back up the old driver files and remove them to avoid version conflicts. If you have any concerns about how to proceed, contact Pentaho Support.

Driver for Microsoft SQL Server

If you are using a Microsoft SQL Server (MSSQL), you might need to use an alternative, non-vendor-supported driver called jTDS. Contact Pentaho Support to ensure that you are adding the correct driver.

For Microsoft Windows, most JDBC drivers support Type 2 integrated authentication through the integratedSecurity connection string property. To use integrated authentication, copy the sqljdbc_auth.dll file to all machines and directories to which you copied the JDBC driver. You can find this file in this location.

<installation directory>\sqljdbc_<version>\<language>\auth\
  • Use the sqljdbc_auth.dll file in the x64 folder, if you are running a 64-bit JVM on a x64 processor.
  • Use the sqljdbc_auth.dll file in the IA64 folder, you are running a 64-bit JVM on an Itanium processor.

Edit the Properties File for Report Designer

  1. On the workstation where you want to run Report Designer, stop Report Designer and the Pentaho Server if it is running on the same workstation.
  2. Navigate to the .pentaho directory in the user directory. For example, if the user name is username for Microsoft Windows, the Pentaho directory is C:\Users\username\.pentaho\, and for Linux or Solaris the directory is /home/username/.pentaho/.
  3. Switch to the ~/.pentaho/simple-jndi/ subdirectory. If it does not exist, create it.
  4. Edit the default.properties file found there. If it does not exist, create it according to this example.
    SampleData/type=javax.sql.DataSource
    SampleData/driver=org.hsqldb.jdbcDriver
    SampleData/user=pentaho_user
    SampleData/password=password
    SampleData/url=jdbc:hsqldb:mem:SampleData
    
    In the example, SampleData is the name of the JNDI connection. Each line must begin with the JNDI connection name and a forward slash (/), followed by these required parameters.
    Parameter Description
    type javax.sql.DataSource defines the JNDI data source type.
    driver The driver class name provided by your database vendor.
    user A user account that can connect to this database.
    password The password for the previously declared user.
    url The database connection string provided by your database vendor.
  5. Save and close the file.
  6. In order for this change to take effect, restart the design tools and the server if the server and design tools are running on the same workstation.

You now have a properties file that defines a JNDI connection for Report Designer. Remember, if you run this tool on more than one workstation, repeat this process on all of the other workstations.

Edit the Properties File for Metadata Editor

  1. On the workstation where you want to run Metadata Editor, stop Metadata Editor and the server if it is running on the same workstation.
  2. Navigate to the metadata-editor/simple_jndi directory where you installed the Metadata Editor.
  3. Edit the JDBC.properties file found there. If it does not exist, create it according to this example.
    SampleData/type=javax.sql.DataSource
    SampleData/driver=org.hsqldb.jdbcDriver
    SampleData/user=pentaho_user
    SampleData/password=password
    SampleData/url=jdbc:hsqldb:mem:SampleData
    In the example, SampleData is the name of the JNDI connection. Each line must begin with the JNDI connection name and a forward slash (/), followed by these required parameters.
    Parameter Description
    type javax.sql.DataSource defines the JNDI data source type.
    driver The driver class name provided by your database vendor.
    user A user account that can connect to this database.
    password The password for the previously declared user.
    url The database connection string provided by your database vendor.
  4. Save and close the file.
  5. For these changes to take effect, restart the Metadata Editor and the Pentaho Server if it is running on the same workstation.

You now have a properties file that defines a JNDI connection for Report Designer. Remember, if you run this tool on more than one workstation, repeat this process on all the other workstations.