I have a report which works with a XML datasource. When creating my report with ireport locally, I set the XML_DATA_DOCUMENT variable to my subreport as:
<subreportParameter name="XML_DATA_DOCUMENT">
<subreportParameterExpression><![CDATA[$P{XML_DATA_DOCUMENT}]]></subreportParameterExpression></subreportParameter>
This works when executing my report locally, but does not work when run on JAsperServer 5.0.0. On the server I get a ClassCastException:
java.lang.ClassCastException: java.lang.Integer cannot be cast to org.w3c.dom.Document
java.lang.ClassCastException: java.lang.Integer cannot be cast to org.w3c.dom.Document at net.sf.jasperreports.engine.query.JRXPathQueryExecuter.createDatasource(JRXPathQueryExecuter.java:111) at net.sf.jasperreports.engine.fill.JRFillDataset.createQueryDatasource(JRFillDataset.java:1086) at net.sf.jasperreports.engine.fill.JRFillDataset.initDatasource(JRFillDataset.java:667) at net.sf.jasperreports.engine.fill.JRBaseFiller.setParameters(JRBaseFiller.java:1258) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:877) at net.sf.jasperreports.engine.fill.JRFillSubreport.fillSubreport(JRFillSubreport.java:663) at net.sf.jasperreports.engine.fill.JRSubreportRunnable.run(JRSubreportRunnable.java:59) at net.sf.jasperreports.engine.fill.AbstractThreadSubreportRunner.run(AbstractThreadSubreportRunner.java:203) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619)
What might be causing this to work on my computer but not on the server? I am compiling my report with 4.8.0 compatibility
0 Answers:
No answers yet
I just tried it compiling my report from Java code with jasper version 5.0.0 and it produces the same exception... With latest version (6.2.0) it works so maybe this is a bug?
It seems all my parameters are reaching my subreport as Integers (0s and 1s) how is this even possible?