Clarity

Expand all | Collapse all

Jaspersoft error : java.lang.NoClassDefFoundError: Could not initialize class net.sf.jasperreports.engine.util.JRStyledTextParser

  • 1.  Jaspersoft error : java.lang.NoClassDefFoundError: Could not initialize class net.sf.jasperreports.engine.util.JRStyledTextParser

    Posted Dec 23, 2015 08:40 AM

    Hello,

     

    If getting into the following issue when lauching a report :

     

    java.lang.NoClassDefFoundError: Could not initialize class net.sf.jasperreports.engine.util.JRStyledTextParser

     

    Then you need to modify the following file :

     

    /app/apache_tomcat_jasper/bin/setclasspath.sh

     

    Add the following line at the end of the file, in the JAVA_OPTS block :

     

    export JAVA_OPTS="$JAVA_OPTS -Djava.awt.headless=true"

     

    -->

     

    export JAVA_OPTS="$JAVA_OPTS -Xms1024m -Xmx2048m -XX:PermSize=32m"

    export JAVA_OPTS="$JAVA_OPTS -XX:MaxPermSize=512m -Xss2m"

    export JAVA_OPTS="$JAVA_OPTS -XX:+UseConcMarkSweepGC"

    export JAVA_OPTS="$JAVA_OPTS -XX:+CMSClassUnloadingEnabled"

    export JAVA_OPTS="$JAVA_OPTS -Doracle.jdbc.defaultNChar=true"

    export JAVA_OPTS="$JAVA_OPTS -Djava.awt.headless=true"

     

    Then restart Jasper server.

     

    I encountered this problem on a Red Hat server, installing CA Clarity 14.3 / Jasper 6.1

     

    Julien Demailly

    CoPrime



  • 2.  Re: Jaspersoft error : java.lang.NoClassDefFoundError: Could not initialize class net.sf.jasperreports.engine.util.JRStyledTextParser

     
    Posted Jan 08, 2016 05:31 PM

    Thanks for sharing this with the community Julien!

    Julien Demailly wrote:

     

    Hello,

     

    If getting into the following issue when lauching a report :

     

    java.lang.NoClassDefFoundError: Could not initialize class net.sf.jasperreports.engine.util.JRStyledTextParser

     

    Then you need to modify the following file :

     

    /app/apache_tomcat_jasper/bin/setclasspath.sh

     

    Add the following line at the end of the file, in the JAVA_OPTS block :

     

    export JAVA_OPTS="$JAVA_OPTS -Djava.awt.headless=true"

     

    -->

     

    export JAVA_OPTS="$JAVA_OPTS -Xms1024m -Xmx2048m -XX:PermSize=32m"

    export JAVA_OPTS="$JAVA_OPTS -XX:MaxPermSize=512m -Xss2m"

    export JAVA_OPTS="$JAVA_OPTS -XX:+UseConcMarkSweepGC"

    export JAVA_OPTS="$JAVA_OPTS -XX:+CMSClassUnloadingEnabled"

    export JAVA_OPTS="$JAVA_OPTS -Doracle.jdbc.defaultNChar=true"

    export JAVA_OPTS="$JAVA_OPTS -Djava.awt.headless=true"

     

    Then restart Jasper server.

     

    I encountered this problem on a Red Hat server, installing CA Clarity 14.3 / Jasper 6.1

     

    Julien Demailly

    CoPrime