How to change your Jaspersoft Database password integrated with Clarity

book

Article ID: 33318

calendar_today

Updated On:

Products

Clarity PPM On Premise

Issue/Introduction

This provides the steps on how to change your Jaspersoft Database password which is required in the below scenarios:

1. You get errors similar to the below: 

  • Unable to Login to Jaspersoft Console after changing the database password.
  • Also all the reports are failing from Clarity with below
    • Cannot open connection; uncategorized SQLException for SQL [???]; SQL state [99999]; error code [28000]; ORA-28000: the account is locked 
 
Or
 
2. You want to change the Jaspersoft database password 
 
Or
 
3. You want to change the database hostname or any other connection detail

Environment

Clarity Integrated with Jaspersoft 

All supported Releases

Resolution

To recreate the password either in plain text or encrypted as per organizational security policy using below steps

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
  3. Enter the password in non-encrypted way for database
  4. save and restart Jaspersoft


Recreate the password in encrypted way in Jaspersoft 5.6.1, 6.1, 6.4.2 and higher:

  1. Go to your Jaspersoft Install files: $jasper_install\jasperreports-server-5.6.1-bin\buildomatic\default_master.properties
  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


Recreate the password in encrypted way in Jaspersoft 7.1:

  1. Go to your Jaspersoft Install files: $jasper_install\jasperreports-server-7.1-bin\buildomatic\default_master.properties
  2. Add the below parameters to the $jasper_install\jasperreports-server-7.1-bin\buildomatic\default_master.properties
    • dbPassword=<Enter your Database Password>
    • propsToEncrypt=dbPassword
    • appServerType=tomcat
    • dbType=<Enter your Database Type> (Example oracle or sql
    • appServerDir==<Enter your Jaspersoft Installed Path> (Example C:\\App\\Jasper)
    • encrypt=true
    • Enter the correct value for dbPassword, dbType, appServerDir in plain text
       
  3. Save the file.
  4. Navigate to $jasper_install\jasperreports-server-7.1-bin\buildomatic
  5. Run the command: js-ant refresh-config and you should see the Build Success once the execution is completed.
  6. Now again go to your Jaspersoft Install files: $jasper_install\jasperreports-server-7.1-bin\buildomatic\default_master.properties
  7. You will see the dbPassword encrypted (Example: dbPassword=ENC-5024da1014088fdf4dc15a8f797f98f6d976ffd98e692173674e090778296f-)
  8. Stop the Jaspersoft services
  9. Open the following file with a text editor: $JSTomcat \webapps\reportservice\META-INF\context.xml
  10. Copy the encrypted database password generated in Step 9 and update the password in $JSTomcat \webapps\reportservice\META-INF\context.xml 
    • <Resource name="jdbc/jasperserver" auth="Container" type="javax.sql.DataSource"maxActive="100" maxIdle="30" maxWait="10000"username="JASPER" password="ENC-b16918c25f30f1cc643a40d7fefb0918c592a5ccccb6043cd6712ca64c088c28-" driverClassName="oracle.jdbc.OracleDriver" accessToUnderlyingConnectionAllowed = "true" validationQuery="SELECT 1 FROM DUAL"testOnBorrow="true"url="jdbc:oracle:thin:@Oracle:1521/jspdb"factory="com.jaspersoft.jasperserver.tomcat.jndi.JSCommonsBasicDataSourceFactory"/>
  11. Restart the Jaspersoft Services

 Note: In order to encrypt the password you will need to have the Jaspersoft Installation on the Jaspersoft server.

  • After the Jaspersoft Database password is corrected you should be able to login to Jaspersoft console. 
  • However, running reports from Clarity --> Advance Reporting will continue to fail. In order to correct the same you will need to perform the below steps
  1. Log in to Jaspersoft as Superuser  
  2. Search for user jasperadmin under your organization you created for integrating with Clarity and edit the user
  3. Look for tab Attributes on the right-hand panel
  4. Delete all the attributes except domainWhitelist as that is read only
  5. Now log in to Clarity application server
  6. Navigate to CLARITY_HOME\bin and execute admin update jasperParameters

Additional Information

To get more information or join the discussion about this command, please check out this post in the Communities: CA PPM Tech Tip: How to replace your Jaspersoft Database password so it remains encrypted