Scott J Posted October 4 Posted October 4 I'm using JRXmlLoader to load the sample report Flower.jrxml supplied by JR and it fails to recognize the chart element. JasperDesign design = JRXmlLoader.load("Flower.jrxml"); The net.sf.jasperreports.jackson.util.JacksonRuntimeException error says "Could not resolve type id 'chart' as a subtype of `net.sf.jasperreports.engine.JRChild`" The JR library should know that 'chart' is JRChart, which does extend JRElement which extends JRChild. Do I need to manually add "chart" as a known type id? I searched and searched sample code, this forum, and developer resources for this issue and found nothing. Searched for enabling charts in Jasper reports, found nothing. Help please? ERROR: Report handler error net.sf.jasperreports.jackson.util.JacksonRuntimeException: com.fasterxml.jackson.databind.exc.InvalidTypeIdException: Could not resolve type id 'chart' as a subtype of `net.sf.jasperreports.engine.JRChild`: known type ids = [] (for POJO property 'element') at [Source: (ByteArrayInputStream); line: 20, column: 3] (through reference chain: net.sf.jasperreports.engine.design.JasperDesign["background"]->net.sf.jasperreports.engine.design.JRDesignBand["element"]->java.util.ArrayList[0]) <element kind="chart" chartType="pie3D" uuid="3338069c-f360-4f9e-b658-16e8b1fbd392" x="-20" y="357" width="247" height="131" showLegend="false" evaluationTime="Report"> Flower.jrxml
Scott J Posted October 4 Author Posted October 4 I also got the same error when using JasperCompileManager.compileReportToFile
Gerson Samaniego Posted November 25 Posted November 25 Hi, you need to ensure jasperreports-charts-7.x.jar and jfreechart-1.5.4.jar are in your classpath
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now