Total Pageviews

2014/07/01

net.sf.jasperreports.engine.JRException: org.xml.sax.SAXParseException; Premature end of file.

Problem
When I try to build my project, it show this error message
1:  [ERROR] Could not compile fms435r1.jrxml because org.xml.sax.SAXParseException; Premature end of file.  
2:  net.sf.jasperreports.engine.JRException: org.xml.sax.SAXParseException; Premature end of file.  
3:       at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:247)  
4:       at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:230)  
5:       at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:218)  
6:       at net.sf.jasperreports.engine.JasperCompileManager.compileToStream(JasperCompileManager.java:191)  
7:       at net.sf.jasperreports.engine.JasperCompileManager.compileReportToStream(JasperCompileManager.java:471)  
8:       at com.alexnederlof.jasperreport.CompileTask.call(CompileTask.java:65)  
9:       at com.alexnederlof.jasperreport.CompileTask.call(CompileTask.java:28)  
10:       at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)  
11:       at java.util.concurrent.FutureTask.run(FutureTask.java:166)  
12:       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)  
13:       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)  
14:       at java.lang.Thread.run(Thread.java:724)  

As I try to open this jrxml file via iReport Designer, it show the same error message


Root Cause
As I change iReport mode from Designer to XML, I figure out the root cause. This jrxml file had broken for unknown reason, it's an empty jrxml file so it cannot be compiled correctly.

THerefore, I need to revert this file to server version by svn client, and do it again.





No comments: