Jump to content
Changes to the Jaspersoft community edition download ×
  • How to resolve: Could not initialize class com.jaspersoft.jasperserver.crypto.KeystoreManager


    kkumlien
    • Features: JasperReports Server Version: v7, v7.9, v7.9.0, v7.8, v7.8.1, v7.8.0, v7.5, v7.5.1, v7.5.0 Product: JasperReports® Server

    Problem

    While running one of the manual installation steps of JasperReports Server (https://community.jaspersoft.com/documentation/tibco-jasperreports-server-installation-guide/v790/installing-war-file-manually), for example:

    ./js-ant import-minimal-pro
    

    you get this nested error / exception (towards the bottoms of the stack trace):

    Error creating bean with name 'keystoreManager': 
    Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: 
    Could not initialize class com.jaspersoft.jasperserver.crypto.KeystoreManager$InstanceHolder

    Solution

    Even though the JAR file containing the KeystoreManager class is available in the classpath – for example buildomatic/lib/js-crypto-3.1.0.jar – and the ks and ksp variables are set correctly in buildomatic/keystore.init.properties, you might still need to add the directory path(s) of the Keystore files as environmental variables in the command itself per the example below.

    Please REPLACE the path /opt/tomcat with the actual path(s) where your keystore files .jrsks and .jrsksp are located. If they were not present already, they would have been generated in one of the previous installation steps.

    ks=/opt/tomcat ksp=/opt/tomcat ./js-ant import-minimal-pro
    

    When running JasperReports Server in Tomcat or other app server, it might also work to pass those as JVM properties, for example:

    -Dks=/opt/tomcat -Dksp=/opt/tomcat
    

    Further investigation is required on why in some cases they might not be read correctly from the properties files, but the above approach should help for now.


    User Feedback

    Recommended Comments

    There are no comments to display.



    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...