can't preview document (xml source). Error filling print

0

I use xml datasource. I ve made several fields, put in them data from xml - data-source (with XPath metchod).

Then I compile document, everything is right. And then iReport has announced error like this:

Error filling print... XPath compilation failed. Expression: 
Setting up the file resolver... 
net.sf.jasperreports.engine.JRException: XPath compilation failed. Expression:  
    at net.sf.jasperreports.engine.util.xml.JaxenXPathExecuter.getXPath(JaxenXPathExecuter.java:66) 
    at net.sf.jasperreports.engine.util.xml.JaxenXPathExecuter.selectNodeList(JaxenXPathExecuter.java:77) 
    at net.sf.jasperreports.engine.data.JRXmlDataSource.moveFirst(JRXmlDataSource.java:415) 
    at net.sf.jasperreports.engine.data.JRXmlDataSource.<init>(JRXmlDataSource.java:189) 
    at net.sf.jasperreports.engine.query.JRXPathQueryExecuter.createDatasource(JRXPathQueryExecuter.java:113) 
    at net.sf.jasperreports.engine.fill.JRFillDataset.createQueryDatasource(JRFillDataset.java:1087) 
    at net.sf.jasperreports.engine.fill.JRFillDataset.initDatasource(JRFillDataset.java:668) 
    at net.sf.jasperreports.engine.fill.JRBaseFiller.setParameters(JRBaseFiller.java:1281) 
    at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:900) 
    at net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:126) 
    at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:464) 
    at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:300) 
    at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:757) 
    at com.jaspersoft.ireport.designer.compiler.IReportCompiler.run(IReportCompiler.java:1003) 
    at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572) 
    at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997) 
Caused by: org.jaxen.XPathSyntaxException: Unexpected '' 
    at org.jaxen.BaseXPath.<init>(BaseXPath.java:118) 
    at org.jaxen.BaseXPath.<init>(BaseXPath.java:139) 
    at org.jaxen.dom.DOMXPath.<init>(DOMXPath.java:87) 
    at net.sf.jasperreports.engine.util.xml.JaxenXPathExecuter.getXPath(JaxenXPathExecuter.java:62) 
    ... 15 more 
Caused by: class org.jaxen.saxpath.XPathSyntaxException: : 0: Unexpected '' 
    at org.jaxen.saxpath.base.XPathReader.createSyntaxException(XPathReader.java:1084) 
    at org.jaxen.saxpath.base.XPathReader.pathExpr(XPathReader.java:190) 
    at org.jaxen.saxpath.base.XPathReader.unionExpr(XPathReader.java:1006) 
    at org.jaxen.saxpath.base.XPathReader.unaryExpr(XPathReader.java:994) 
    at org.jaxen.saxpath.base.XPathReader.multiplicativeExpr(XPathReader.java:943) 
    at org.jaxen.saxpath.base.XPathReader.additiveExpr(XPathReader.java:913) 
    at org.jaxen.saxpath.base.XPathReader.relationalExpr(XPathReader.java:860) 
    at org.jaxen.saxpath.base.XPathReader.equalityExpr(XPathReader.java:829) 
    at org.jaxen.saxpath.base.XPathReader.andExpr(XPathReader.java:809) 
    at org.jaxen.saxpath.base.XPathReader.orExpr(XPathReader.java:787) 
    at org.jaxen.saxpath.base.XPathReader.expr(XPathReader.java:780) 
    at org.jaxen.saxpath.base.XPathReader.parse(XPathReader.java:100) 
    at org.jaxen.BaseXPath.<init>(BaseXPath.java:113) 
    ... 18 more 
Print not filled. Try to use an EmptyDataSource...]

I ve change files in dicrectoru ireport/libs like Xalan and others, how it advised in forums, but nothing has helped me. 

I have tryed to use diffirent versions of programm, but in vain. Maybe IReport can't work with xml datasource at all?

Can you help me?

 

victorsambist's picture
Joined: Jun 4 2013 - 2:38pm
Last seen: 5 years 8 months ago

2 Answers:

2

The exceptions tell us that there is a syntax error in one or more of your XPath expressions. XPath expressions are compiled runtime, not when you compile the report.

nicolaifriis's picture
Joined: May 25 2010 - 4:32am
Last seen: 4 years 5 months ago

Hello nocolaifriis, i ve sent file, where you can see stages of my making of report

victorsambist - 6 years 3 months ago
1
can you provide JRXML File ?
netti royala's picture
Joined: Oct 28 2013 - 11:43pm
Last seen: 5 years 2 months ago

Hellow netti royala, I ve sent JRXML file.

victorsambist - 6 years 3 months ago
Feedback