CA PPM Tech Tip: How to replace your Jaspersoft Database password so it remains encrypted

Discussion created by Nika_Hadzhikidi Employee on Oct 6, 2015
Latest reply on Sep 1, 2017 by navigat0

Hello everybody,


In our work, it's frequent to see the DB password changed after the Jaspersoft installation. Of course this doesn't mean you have to do the reinstall again. Here is what you can do:

Recreate the password in plain text:
1. Open the following file with a text editor: 

$JSTomcat \webapps\reportservice\META-INF\context.xml

2. Replace the details on the connection, enter the pwd in non-encrypted way for Oracle, save and restart Jaspersoft.

Recreate the password in encrypted way:
1. Go to your Jaspersoft Install files: $jasper_install\jasperreports-server-5.6.1-bin\buildomatic\
2. Enter the correct value for Jasper DB Password in plain text
3. Ensure all other values are still valid, such as Tomcat directory etc.
4. Change the encrypt.done=true to encrypt=true
5. Save the file.
6. Now navigate to $jasper_install\jasperreports-server-5.6.1-bin\buildomatic
7. Run the command:
js-ant refresh-config
This will remove and recreate all the configuration files without deploying them to the application server.
8. Once done, get the context file from: $jasper_install\jasperreports-server-5.6.1-bin\buildomatic\build_conf\default\webapp\META-INF\context.xml and replace the one in $JSTomcat\webapps\reportservice\META-INF\context.xml
9. Restart Jaspersoft Tomcat


Note that the password you entered in plain text in will now also be encrypted. This will work for other passwords too.

Same will also be helpful in case you change your Jaspersoft connection detail to regenerate the context.xml file (for example to use another database server).

Kind Regards


Nika Hadzhikidi
CA Technologies
Principal Support Engineer