gabriel.sanmartindiaz Posted November 25, 2015 Share Posted November 25, 2015 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.Documentjava.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 Link to comment Share on other sites More sharing options...
gabriel.sanmartindiaz Posted November 25, 2015 Author Share Posted November 25, 2015 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? Link to comment Share on other sites More sharing options...
gabriel.sanmartindiaz Posted November 25, 2015 Author Share Posted November 25, 2015 It seems all my parameters are reaching my subreport as Integers (0s and 1s) how is this even possible? Link to comment Share on other sites More sharing options...
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