Hi, all
i have proplem i digen report and make preview when i click on desgin again error apear
Error loading the report template
Message:
net.sf.jasperreports.engine.JRException: org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed.
Level:
SEVERE
Stack Trace:
org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed.
net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:245)
net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:228)
net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:216)
com.jaspersoft.ireport.designer.JrxmlLoader.reloadJasperDesign(JrxmlLoader.java:87)
com.jaspersoft.ireport.designer.JrxmlVisualView.run(JrxmlVisualView.java:505)
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)
The processing instruction target matching "[xX][mM][lL]" is not allowed.
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:174)
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:388)
com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1414)
com.sun.org.apache.xerces.internal.impl.XMLScanner.scanPIData(XMLScanner.java:701)
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanPIData(XMLDocumentFragmentScannerImpl.java:1020)
com.sun.org.apache.xerces.internal.impl.XMLScanner.scanPI(XMLScanner.java:669)
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:954)
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
org.apache.commons.digester.Digester.parse(Digester.java:1647)
net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:241)
net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:228)
net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:216)
com.jaspersoft.ireport.designer.JrxmlLoader.reloadJasperDesign(JrxmlLoader.java:87)
com.jaspersoft.ireport.designer.JrxmlVisualView.run(JrxmlVisualView.java:505)
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)
2 Answers:
Hello ,
I have experianced the same error while runnig reports on Jasperserver.
What I did is to delete those reports from Jasperserver and upload it again,
I know It sound stange but It works for me.
when we try to replace the reports from IReport to Jasper Repository, Specially in the case of the Main Report which contain the reference of subreport. I think this may be the case where reports are not able to replace completely and it cause that error.
Thanks
Abhishek
Post Edited by abhishekverma18 at 09/30/2011 06:11
I too have trouble saving main.jrxml to the jasper server repository (My jasper server is on linux with Tomcat and Postgres database). First, if I make changes to the layout, I have to right click on the main.jrxml and choose "replace". This is bad since I edited the jrxml from the jasper server and would think that the saving of it would go back to the server without having to do a "replace". Second, if I manually edit the jrxml parameters, I can not get it to save back to the server no matter what I do.
Post Edited by johnmodla at 10/04/2011 01:53
Post Edited by johnmodla at 10/04/2011 02:36
I got the same error and when viewing the report in iReport on the XML tab, I noticed this at the top:
<?xml version="1.0" encoding="UTF-8"?>
I removed the white space before this line and the problem went away:
<?xml version="1.0" encoding="UTF-8"?>
my previous comment removed the whitespace so you couldnt see the change. There was whitespace before the <?xml version="1.0" encoding="UTF-8"?> on the top line. XML requires that the "<" sign be the first character in the file.