Jump to content
We've recently updated our Privacy Statement, available here ×

Cannot find the way to deploy report on Jasper Server CP 4.5.0 from remote xml datasource.


ssharmahr12

Recommended Posts

  • 3 weeks later...
  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

  • 4 weeks later...

Hi, we have the exact same problem: remote xml datasource works just fine in iReport 4.5.1, but we can't find a way to make it work on Jasper Server CP 4.5.0. 

 
We followed Mariano's suggestion to install the custom XML datasource. The installation completed successfully, but unfortunately, the report still does not work in Jasper Server CP 4.5.0... The report appears in the Reports Repository on the server, but it is not possible to run it.
 
Any help would be appreciated!
Link to comment
Share on other sites

We actually managed to figure out how to solve the issue!

In case anybody else encounters the problem, following are the steps you need to follow in order to make reports with remote xml datasources work on Jasper Server:

 

1. Open the jasperreports.PROPERTIES file, located in:

...Program Files\jasperreports-server-cp-X.X.X\apache-tomcat\webapps\jasperserver\WEB-INF\classes\jasperreports.PROPERTIES

As a last line, add the following and save:

net.sf.jasperreports.query.executer.factory.xpath2=com.jaspersoft.jrx.query.JRXPathQueryExecuterFactory

 

2. Copy the jasperreports-extensions-X.X.X.jar file from:

...Program Files\Jaspersoft\iReport-X.X.X\ireport\modules\ext

Paste the file into:

...Program Files\jasperreports-server-cp-X.X.X\apache-tomcat\webapps\jasperserver\WEB-INF\lib

 

3. Restart the server (Stop the Service, then Start again)

 

4. Go into the XML viewer of your report, delete "language = groovy" inside <jasperReport ...> on top

 

5. Add an XML_URL parameter to your report, set its Default Value Expression to the XML URL query in quotation marks

 

6. Inside JasperRepository in the Repository Navigator window, right-click Reports -> Add -> JasperServer Report

  • Set ID and Name, click Next
  • Check "Locally Defined" and select the jrxml file from your file system
  • Click Next
  • Check "Don't use any datasource"
  • Click "Finish"

 

 

Link to comment
Share on other sites

  • 1 month later...

I have installed JasperServer CP 4.7.0 & JasperReport.  I have followed the steps above, but still do not get the XPath2 option in the jasper server data source.  I have restarted the server (& even rebooted the PC) but no change.  Any ideas?

Many thanks in advance.

Also, probably not connected, but when I make the suggested changes to my report in iReport 4.7.0 the compiler hangs and gets the following error:

java.lang.NullPointerException
    at com.jaspersoft.ireport.jasperserver.JasperServerManager$1.actionPerformed(JasperServerManager.java:153)
    at com.jaspersoft.ireport.designer.compiler.IReportCompiler.fireCompileListner(IReportCompiler.java:1947)
    at com.jaspersoft.ireport.designer.compiler.IReportCompiler.run(IReportCompiler.java:668)
    at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)
 

I have to shutdown iReprt to cancel the compile (the cancel button does nothing).

Here's the important bit of my jrxml:

    <parameter name="XML_URL" class="java.lang.String" isForPrompting="false">
          <defaultValueExpression><![CDATA["https://www.myurl.com/something/else"]]></defaultValueExpression>
    </parameter>
    <parameter name="XML_USERNAME" class="java.lang.String">
        <parameterDescription><![CDATA[username]]></parameterDescription>
    </parameter>
    <parameter name="XML_PASSWORD" class="java.lang.String">
        <parameterDescription><![CDATA[Password]]></parameterDescription>
    </parameter>
 

This is using https (which is what I need to use ultimately), but I get the same result with http.



Post Edited by ashleymantra at 09/20/2012 13:23
Link to comment
Share on other sites

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