Error running report on Jaspersoft : java.lang.ClassNotFoundException: com.jaspersoft.jasperserver.remote.ServiceException

0

Hello,

I did a fresh install of Jaspersoft server 6.1.0 on a

  • RHEL 6.6
  • remote Oracle Database 12.1.0.2
  • Java : jdk-8u40-linux-x64
  • Tomcat :  apache-tomcat-7.0.55

JAVA_HOME, JRE_HOME, PATH set

I didn't see any error in install log but when I try to run a report on Jaspersoft server I got an error:

HTML response error code: 500, error

Une erreur de serveur interne s'est produite. Veuillez contacter votre administrateur système.

Détails: Handler processing failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class java.awt.Color

 

I checked the logs on apache tomcat : catalina.out file and I saw this  first error

 

Jul 27, 2016 1:29:45 PM org.apache.catalina.core.StandardContext reload
SEVERE: Exception starting Context with name [/reportservice]
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/reportservice]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.core.StandardContext.reload(StandardContext.java:4007)
at org.apache.catalina.startup.HostConfig.reload(HostConfig.java:1482)
at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1465)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1649)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:328)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1374)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1546)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1556)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1524)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoClassDefFoundError: com/jaspersoft/jasperserver/remote/ServiceException
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Class.java:2583)
at java.lang.Class.getDeclaredFields(Class.java:1916)
at org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:106)
at org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:270)
at org.apache.catalina.startup.WebAnnotationSet.loadApplicationServletAnnotations(WebAnnotationSet.java:139)
at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:65)
at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:403)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:879)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:374)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5378)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 12 more
Caused by: java.lang.ClassNotFoundException: com.jaspersoft.jasperserver.remote.ServiceException
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1720)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
... 26 more
 
Did someone ever had this problem ? If anyone I can help I would appreciate it
julien.mao's picture
Joined: Jun 13 2016 - 9:01am
Last seen: 2 years 3 months ago

4 Answers:

0

Confirm your Java memory setting for Tomcat. I experience installation before where the default java memory set was an issue and I could not start up tomcat. Got a lot of class errors as there was not enought memory to upload classed. So I had to manual change memory setting to reslove this.

joseng62's picture
701
Joined: Dec 5 2014 - 2:43am
Last seen: 1 week 14 hours ago
-1

Thank you for your help, I didn't have to change the JVM memory size, I added the option -Djava.awt.headless=true to the JVM and it solved my problem

Many thanks for your help

 

julien.mao's picture
Joined: Jun 13 2016 - 9:01am
Last seen: 2 years 3 months ago
0

Please on wish file did you apply this modification, thanks 

jaberfi96's picture
Joined: Jul 12 2017 - 2:46am
Last seen: 1 year 6 months ago
0

you need to set a file in tomcat/bin/setenv.sh and add as CATALINA_OPTS=-Djava.awt.headless=true

setenv.sh doesnt come by default. you need to create one manually.

our set env looks like this

 

bash-3.2# cat setenv.sh
JAVA_HOME=/opt/jdk1.8.0_172/
JRE_HOME=/opt/jdk1.8.0_172/jre


CATALINA_PID="$CATALINA_BASE/tomcat.pid"

CATALINA_OPTS="-server -Xms1024m -XX:+UseParallelGC -Xmx2024m -XX:MaxPermSize=512m -XX:PermSize=1024m -Djava.awt.headless=true"

export JRE_HOME
export JAVA_HOME
export CATALINA_OPTS
 

SETTURGOPI's picture
Joined: Jul 12 2018 - 2:44am
Last seen: 10 months 4 days ago
Feedback
randomness