Updating JasperReports Server on AIX/DB2/Tomcat

0

Our company will soon need to update several of our clients from JasperReports Server 3.7 to 5.5, so this weekend we attempted it on a test server in our office.  After several false starts trying to back up, then export using buildomatic, then update/import using 5.5 buildomatic, I finally got the scripts to run successfully, but I am unable to bring up webapp jasperserver-pro in Tomcat.  The error logged in catalina.out is:

May 18, 2014 2:47:27 PM org.apache.catalina.core.StandardContext listenerStart

SEVERE: Exception sending context initialized event to listener instance of class org.owasp.csrfguard.CsrfGuardServletContextListener

Throwable occurred: java.lang.RuntimeException: java.security.NoSuchProviderException: Provider SUN is not available

        at org.owasp.csrfguard.CsrfGuardServletContextListener.contextInitialized(CsrfGuardServletContextListener.java:40)

        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3972)

        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4467)

        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)

        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)

        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)

        at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637)

        at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563)

        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498)

        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)

        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)

        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)

        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)

        at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)

        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)

        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)

        at org.apache.catalina.core.StandardService.start(StandardService.java:519)

        at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)

        at org.apache.catalina.startup.Catalina.start(Catalina.java:581)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)

        at java.lang.reflect.Method.invoke(Method.java:611)

        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)

        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)

Caused by: java.security.NoSuchProviderException: Provider SUN is not available

        at java.security.SecureRandom.getInstance(SecureRandom.java:212)

        at org.owasp.csrfguard.CsrfGuard.load(CsrfGuard.java:101)

        at org.owasp.csrfguard.CsrfGuardServletContextListener.contextInitialized(CsrfGuardServletContextListener.java:38)

        ... 24 more

It looks like JasperReports Server is depending on OpenJDK, which is only for Linux, Windows, and Mac, not for AIX.  The JasperReports Server install/update instructions state that the product is still supported/compatible with AIX, so does anyone know how to get around this issue?  This must be a dependency that was added some time after version 3.7.  Any help would be appreciated.  Thanks.

Carl Barlow

cbarlow3's picture
1398
Joined: Mar 4 2010 - 8:59am
Last seen: 1 month 2 weeks ago

1 Answer:

0

Carl,

What Java version (JRE/JDK) are you using? And AIX?

In JRS 5.5 the supported Java versions are: Oracle/Sun Java 1.6 and 1.7, OpenJDK 1.6.20 or  IBM Java JDK / JRE 1.6 only with Websphere and it looks like you are using Tomcat on AIX.

See: https://www.jaspersoft.com/sites/default/files/Jaspersoft%20Platform%20S...

Thinking out of the box here (try at your own risk :) and after looking at this: http://stackoverflow.com/questions/19076059/crypto-provider-in-jdk
You may try to add to add "sun.security.provider.Sun" the java.policy file (for the IBM KDK it shoudl be in /usr/java/jre/lib/ext/) and copy the necesary JARs in the tomcat-lib. As I said not sure if this is the way to go or if it will work.

 

marianol's picture
4427
Joined: Sep 13 2011 - 8:04am
Last seen: 9 months 2 weeks ago

Thanks. I've formally opened case #49524. I'll look over the platform information. We're using Tomcat 6, DB2 10.5, IBM Java 6, 64-bit, AIX version 7.1.3, and various versions of Firefox (I'm personally on 29.0.1). If JasperReports Server with IBM JDK (which other than attempted workarounds means JRServer on AIX) only runs on WebSphere now, not on Tomcat, that is a big change. Our options would be to try a workaround that may or may not work and almost certainly wouldn't be fully supported or to introduce Websphere onto all 20+ of our credit union systems. Our own software uses Tomcat currently, so it would be a pretty big change to try to run them both or to switch OUR software over to Websphere just so we can continue embedding JasperReports server. I guess our third option is to just try running 3.7.1 forever, but that would be a huge disappointment. I'll look through the document you linked to and see what comes out of our formal support ticket. Thanks.

cbarlow3 - 5 years 1 month ago

While Jaspersoft hasn't tested the combination of AIX and Tomcat, we know that it worked in the past, and Jaspersoft came back with a change to <js-install>/webapps/jasperserver-pro/WEB-INF/esapi/Owasp.CsrfGuard.properties. Specifically, they advised us to add the line:
org.owasp.csrfguard.PRNG.Provider=IBMSecureRandom
After doing some research, we realized that IBMSecureRandom is a replacement for the standard IBM random number generator. We instead added the following line:
org.owasp.csrfguard.PRNG.Provider=IBMJCE
If you don't add this line, the org.owasp.csrfguard software tries to use the SUN version. We also upgraded to Tomcat 7.0.54, and I ended up loading JasperReports Server 5.6 instead of 5.5. We are running into a few issues, which I'll look for on this board or post separate from this.

cbarlow3 - 4 years 11 months ago
Feedback
randomness