stefan.beukmann Posted May 5, 2015 Posted May 5, 2015 Hi!I am trying to publish a report to JasperServer 6.0.1 with remote XML datasource that can be changed via a report parameter.I've tried the following solutions so far:I followed this guide:http://community.jaspersoft.com/wiki/remote-xml-datasourceI edited my jrxml so that it contains the following parameters: <parameter name="NAME" class="java.lang.String"/> <parameter name="XML_URL" class="java.lang.String" isForPrompting="false"> <defaultValueExpression><![CDATA["http://server-ip-address/rest_v1/items/" + $P{NAME}]]></defaultValueExpression> </parameter>at first I tried copying the com.jaspersoft.studio.data_6.0.1.final to the WEB-INF/lib and edit the jasperserver.properties. After a restart I got an java.lang.ClassNotFoundException: com.jaspersoft.studio.utils.XMLUtils.So i also copied the com.jaspersoft.studio_6.0.1.final (which seems a bit overkill since it's 30 megabytes large!). The effect was, that I couldn't open any more reports in the jasperserver webinterface. I guess there are some classloader related issues, but I didn't look any further into it because integrating half of jasperstudios code into the server just for an remote xml seems a bit harshSo I tried locating the other mentioned jar (jasperreports-extensions-3.5.3.jar) and removed the aforementioned two from the serverThe report executed, but with no data. I looked into the server logs and found the warningWARN JRXPathQueryExecuter - No XML source was provided.After that, I stumbled across this post: http://community.jaspersoft.com/questions/824553/i-have-question-about-xml-datasource-and-xml-remote-datasourceIt seems like a totally different solution, but it doesn't seem to be parameterizable. So, now my questions is:which one of my previous attempts was the correct one and what did I do wrong? Thanks a lot in advance
Solution stefan.beukmann Posted May 5, 2015 Author Solution Posted May 5, 2015 I finally got it!I was using xpath as query syntax, because xPath2 was throwing a "unknown query language" error. changing the language in querystring to xpath2 (all in lowercase) solved the issue.I am using the jasperreports-extensions-3.5.3.jar
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