Jump to content
JasperReports Library 7.0 is now available ×

Could not locate .jrsksp (LINUX)


danielsl9.dp
Go to solution Solved by danielsl9.dp,

Recommended Posts

I'm installing Jasperreport Server 7.8.0 in a Oracle Virtual Machine with CentOS 7. I'm not using the bundle, I'm installing everything separate (Tomcat, PostgreSQL... and Jasper). I already installed Tomcat and PostgreSQL, but now is the time of Jasperreport Application and Oh man, I got A BUNCH of problems. Saddly the documentation and the Wiki of this page is not helping much, regarding the issue  of the Keystore files.

First of all, the Keystore was saved in the root folder. According to this page:

https://community.jaspersoft.com/wiki/how-move-tibco-jasperreports-server-750-encryption-keystore-files-shared-linux-folder

I had to made a copy of .jrsks and .jrsksp files and move it to another place (acording to this page) :

There are two files that are generated by a TIBCO JapserReports® Server installation: .jrsks and .jrsksp.

These files should be located in home directory. These do not impact other applications and can be deleted, they will be recreated by JapserReports Server.

Okay, cool, I moved this files to /home/dphillips/keys and updated the keystore.init.properties inside of the WEB-INF of the jasper web aplication and Buildomatic (just in case).

The webpage said something about a property that honestly I didn't see inside of the .jrsksp file. We are talking about ksPath.. . I didn't added any change here, maybe this part is outdated.

Ok, with these change, the Jasperreport application should work, but now I'm facing another issue:

Caused by: org.apache.commons.configuration2.ex.ConfigurationException: Could not locate: org.apache.commons.configuration2.io.FileLocator@7664ab35[fileName=.jrsksp,basePath=/home/dphillips/keys,sourceUrl=,encoding=ISO-8859-1,fileSystem=com.jaspersoft.jasperserver.crypto.utils.Base64SynchronizingFilesSystem@4bfce17c,locationStrategy=com.jasperssoft.jasperserver.crypto.utils.JrsBasePathLocationStrategy@2e7dfb58]

I don't know what to do here, and I need serious help, cause yesterday I didn't sleep well because of this. I tried to execute js-install script to regenerate a new fresh pair of keys (in the specified path this time, no moves) and the problem persist. I don't think that this is a file access issues because in the path where is located is supposed to be accessible (according to the documentation itself).

Can someone give me a hand with this ???????

Link to comment
Share on other sites

  • Replies 12
  • Created
  • Last Reply

Top Posters In This Topic

When you run the script to install JRS do you do something like "sudo jr_install blah blah"? If so, the root user will create the files with permission to itself, even in folder other than /root.

And Tomcat run as tomcat (at least in the end). Because when you do something like 'sudo service tomcat9 start' I think root has a part on it too.

Just in case I gave read permission to both root and tomcat, because I lost much time and sleep trying to make it work.

Link to comment
Share on other sites

"maybe the tomcat application can't reach that Path"

what the file permissions say? who owns it?

"It's weird because it's a directory suggested by TIBCO"

Just forget what TIBCO say. In this particular thing they messed up. Isn't it weird that there are 3 wiki pages on how do you correct what the install script can't do right?

Link to comment
Share on other sites

I executed ls -la to my keys folder  and I saw this:

-rw-r----- 1 root root 6117 Sep 1 18:40 .jrsks

-rw-r----- 1 root root 0       Sep 1 18:40 .jrsksp

Executed the following command

chown tomcat:dphillips /home/dphillips/keys/.jrsks

chown tomcat:dphillips /home/dphillips/keys/.jrsksp

Now if I run ls -la again

-rw-r----- 1 tomcat dphillips 6117 Sep 1 18:40 .jrsks

-rw-r----- 1 tomcat dphillips 0       Sep 1 18:40 .jrsksp

  Restarted the tomcat server but I'm still unable to access, I'm getting same exception

Link to comment
Share on other sites

just tested a fresh installation in my VBox with my own Tomcat and PostgreSql. Just let it install the keystore in /root

Then, move the two .jrsks* to another folder (in my case /var/lib/tomcat9). Change the keystore.init in WEB-INF/classes to reflect new location. Give ownership of the two files to root:tomcat. I'm using Ubuntu. I don't know who executes tomcat in CentOS.

Link to comment
Share on other sites

For some reason, your trick works like a charm, now I'm able to deploy the jasper application in tomcat !

However, unfortunately got another problem when I try to reach the login page  (Servlet.service () for servlet [jsp] threw exception java.lang.NullPointerException at com.jaspersoft.jasperserver.war.themes.MTThemeResolver.resolveThemeName ) but this is another issue, and at least I have gotten the advance

Thank you so much for your help Gustavo, you helped me a lot /sites/all/libraries/ckeditor/plugins/smiley/images/teeth_smile.png

Link to comment
Share on other sites

  • Solution

So basically, the path for overcome this problem (this case) was:

1. Update the keystore.init.properties in both locations (the one that are inside of buildomatic and the other one inside of WEB-INF) and set the ks and ksp path to /var/lib/tomcat (this can vary dependending of the user name that your system uses for tomcat).

2. Move the two ,jrsks files to /var/lib/tomcat from root folder (if you have it in a different folder like me, move those files from that folder and save it in /var/lib/tomcat).

3. Grant permissions to both files for root and tomcat (chown root:tomcat filename).

4. Restart tomcat.

You may keep having issues after following these steps (Keystore was tampered with or password was incorrect for example), if this is the case, then go to buildomatic folder and execute the js-install.sh script for re-generate the pair of keys again. This time you will not have to move any key because in the previous steps you modified the keystore.init.properties. What you will still have to do grant permissions again to the new pair of keys like before.

Hope you find this helpful for the community.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...