If you would prefer to use a JNDI connection to your database instead of the standard
Pentaho method, follow the instructions below:
-
Consult the list of
JDBC class names to determine the class name and connection string
for your database.
-
Stop the Tomcat server by running the stop-pentaho script.
-
Edit the /pentaho/server/biserver-ee/tomcat/conf/server.xml with a text editor.
-
Anywhere inside of the <host> element, add the XML snippet shown
below:
<Context path="/pentaho" docbase="webapps/pentaho/">
<Resource name="jdbc/myDataSource" auth="Container" type="javax.sql.DataSource"
factory="org.apache.commons.dbcp.BasicDataSourceFactory" maxActive="20" maxIdle="5"
maxWait="10000" username="dbuser" password="password" driverClassName="org.postgresql.Driver"
url="jdbc:postgresql://127.0.0.1:5432/myDataSource" />
</Context>
The above example shows a simple PostgreSQL configuration. Replace the Resource name, username, password, driverClassName, and url parameters (or any relevant connection
settings) to match your connection information.
-
Save and close the server.xml file.
-
Start the Tomcat server by running the start-pentaho script.
Tomcat can now properly connect to your database.