Currently I am really short on time so that I cannot get the next release of the JasperReportsIntegration out of the door ... but some people are struggling with the encrypt_passwords.sh / encrypt_passwords.cmd functionality.

Thus I might just explain the workaround.

It seems like the libraries have changed over time, initially the functionality has worked.

When trying to use the functionality you will get the following error message:

bin]$ ./encryptPasswords.sh /opt/oracle/JasperReportsIntegration2.4/conf/application.properties

Exception in thread “main” java.lang.NoClassDefFoundError: org/apache/commons/lang/exception/NestableException
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)

The library commons-lang-2.6.jar needs to be included manually. Thus, in order to fix it:

###########################################################
# set the environment for JasperReportsIntegration first
###########################################################
CP="../lib/JasperReportsIntegration-2.4.0.0.jar:../lib/log4j-1.2.15.jar:../lib/commons-configuration-1.8.jar:../lib/velocity-1.7-dep.jar:../lib/jasperreports-6.4.3.jar:../lib/commons-logging-1.1.1.jar:../lib/commons-codec-1.5.jar:../lib/commons-lang-2.6.jar"

# pass ALL parameters to the class
java -cp $CP main/CommandLine encryptPasswords "$@"
  • Change the contents of encryptPasswords.cmd
@echo off

REM ###########################################################
REM # set the environment for JasperReportsIntegration first
REM ###########################################################

set DIR=%~dp0
pushd %DIR%\..
set OC_JASPER_CONFIG_HOME=%CD%
popd

set CP="%OC_JASPER_CONFIG_HOME%/lib/JasperReportsIntegration-2.4.0.0.jar;%OC_JASPER_CONFIG_HOME%/lib/log4j-1.2.15.jar;%OC_JASPER_CONFIG_HOME%/lib/commons-configuration-1.8.jar;%OC_JASPER_CONFIG_HOME%/lib/velocity-1.7-dep.jar;%OC_JASPER_CONFIG_HOME%/lib/jasperreports-6.4.3.jar;%OC_JASPER_CONFIG_HOME%/lib/commons-logging-1.1.1.jar;%OC_JASPER_CONFIG_HOME%/lib/commons-codec-1.5.jar"

REM pass ALL parameters to the class
java -cp %CP% main/CommandLine encryptPasswords %*

Does that work for you?

Cheers,
~Dietmar.