Modify the Tomcat context XML file
Database connection and network information for your Pentaho Repository database are stored in the context.xml file.
Perform the following steps to modify the context.xml file to reflect encryption password changes for your database connection and network information.
If you had any previous customizations to the
context.xmlfile before upgrading and you have not already applied these customizations to the 10.2 version of the file, merge your customizations into thecontext.xmlfile. See Apply customizations for instructions.Note: Password encryption requires the 9.1 or later version of the
context.xmlfile.Stop the Pentaho Server.
For instructions on stopping the server, see Stop and start the Pentaho Server and repository.
Navigate to the
pentaho/server/pentaho-server/tomcat/webapps/pentaho/META-INFdirectory and open thecontext.xmlfile with any file editor.Locate all occurrences of the following
factorysetting:factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"Replace every occurrence of the
factorysetting with the following value:factory="org.pentaho.di.core.database.util.DecryptingDataSourceFactory"Locate the type of database you are using as the Pentaho Repository and add the following lines of code to the end of the
Resourceblock to include Jackrabbit, which handles password encryption:Postgres
<Resource name="jdbc/jackrabbit" auth="Container" type="javax.sql.DataSource" factory="org.pentaho.di.core.database.util.DecryptingDataSourceFactory" maxActive="20" minIdle="0" maxIdle="5" initialSize="0" maxWait="10000" username="jcr_user" password="password" driverClassName="org.postgresql.Driver" url="jdbc:postgresql://localhost:5432/jackrabbit" validationQuery="select 1"/>MySQL
<Resource name="jdbc/jackrabbit" auth="Container" type="javax.sql.DataSource" factory="org.pentaho.di.core.database.util.DecryptingDataSourceFactory" maxActive="20" minIdle="0" maxIdle="5" initialSize="0" maxWait="10000" username="jcr_user" password="password" driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/jackrabbit" validationQuery="select 1"/>Oracle
Be sure to also replace
XEin the URL setting to reflect the name of your schema:<Resource name="jdbc/jackrabbit" auth="Container" type="javax.sql.DataSource" factory="org.pentaho.di.core.database.util.DecryptingDataSourceFactory" maxActive="20" minIdle="0" maxIdle="5" initialSize="0" maxWait="10000" username="jcr_user" password="password" driverClassName="oracle.jdbc.OracleDriver" url="jdbc:oracle:thin:@localhost:1521/XE" validationQuery="select 1 from dual"/>MS SQL Server
<Resource name="jdbc/jackrabbit" auth="Container" type="javax.sql.DataSource" factory="org.pentaho.di.core.database.util.DecryptingDataSourceFactory" maxActive="20" minIdle="0" maxIdle="5" initialSize="0" maxWait="10000" username="jcr_user" password="password" driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver" url="jdbc:sqlserver://localhost:1433;DatabaseName=jackrabbit" validationQuery="select 1"/>
Save and close the
context.xmlfile.Restart the server and confirm no errors occurred.
For instructions on starting the server, see Stop and start the Pentaho Server and repository.
Depending on the error, you may need to contact your customer support representative for help.
The context.xml is now modified to reflect encryption password changes for your database connection and network information.
Last updated
Was this helpful?

