Jump to content
We've recently updated our Privacy Statement, available here ×
  • Fixing issue "Chart theme not found" after upgrade


    prusyn
    • Features: Reports Version: v6.4.3 Product: JasperReports® Server

    Issue:

    [toc on_off::hide=1]

    Customer has problem with some reports execution after upgrade from JRS 6.1 to 6.4. These are reports that has custom chart theme 

    They created the chart theme and upload to the Jasper Server as told in these links: 

    https://community.jaspersoft.com/documentation/tibco-jaspersoft-studio-user-guide/v60/chart-themes 

    https://community.jaspersoft.com/documentation/tibco-jaspersoft-studio-user-guide/v60/creating-and-uploading-chart-themes 

    However, when running these reports, this error occurs: 

    Chart theme "ComplyChartThemeTemplate" not found. (Error UID: fed1208b-a4a4-4806-8865-00f4043233a6)


    Resolution:

    The problem is caused by a bug. Something goes wrong and JR does not load the chart theme extension from the classloader that JRS creates for the jars linked to the report unit. Defect has been logged for it and will be fixed in our future releases.

    Possble workaround would be to place theme.jar file in classpath, specifically in WEB-INF/lib folder. 

     

    Also, you may encountered error net.sf.jasperreports.engine.JRRuntimeException: org.exolab.castor.xml.MarshalException: com.jaspersoft.studio.jasper.CachedImageProvider{File: [not available]; line: 2; column: 438} 

    Caused by: java.lang.ClassNotFoundException: com.jaspersoft.studio.jasper.CachedImageProvider..... 

     

    So, by doing File -> New -> Others -> Chart Themes, JSS creates file named chart_template.jrctx and by default it has <background file ... png .../> specified and point to /net/sf/.../jasperreport.png which doesn't exist. The missing file is why this error happens.  So you have to remove <background ../> part from source editor and re-export to jar and deploy to JRS and it worked. There are 2 entries in default theme jrtctx file: 

    <background-image 
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
        file="net/sf/jasperreports/chartthemes/simple/jasperreports.png" 
        xsi:type="file"
    /> 

     

    Here's screencast that demonstrates this behavior. It should explain everything: https://screencast-o-matic.com/watch/cqVDXu3o7v

    Solution has been tested on JasperReports Server 6.4.3


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