net.sf.jasperreports.engine.JRException: Error loading object from InputStream error after loading report to jasperserver from ireport


I'm facing a strange problem.

I designed a report contains various nested subreports within it. After designing in ireport it is working propely in iReport, when I publish the same report to jasper server its working fine there too.

But when after publishing the report when I'm trying to run it in iReport again its giving error.



Error filling print... net.sf.jasperreports.engine.JRException: Error loading object from InputStream
Setting up the file resolver... 
Added file resolver... 
net.sf.jasperreports.engine.JRRuntimeException: net.sf.jasperreports.engine.JRException: Error loading object from InputStream 
    at net.sf.jasperreports.repo.SerializedObjectPersistenceService.load( 
    at net.sf.jasperreports.repo.SerializedReportPersistenceService.load( 
    at net.sf.jasperreports.repo.DefaultRepositoryService.getResource( 
    at net.sf.jasperreports.repo.RepositoryUtil.getResourceFromLocation( 
    at net.sf.jasperreports.repo.RepositoryUtil.getReport( 
    at net.sf.jasperreports.engine.fill.JRFillSubreport.evaluateReport( 
    at net.sf.jasperreports.engine.fill.JRFillSubreport.evaluateSubreport( 
    at net.sf.jasperreports.engine.fill.JRFillSubreport.evaluate( 
    at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate( 
    at net.sf.jasperreports.engine.fill.JRFillBand.evaluate( 
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand( 
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail( 
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart( 
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport( 
    at net.sf.jasperreports.engine.fill.JRBaseFiller.fill( 
    at net.sf.jasperreports.engine.fill.JRBaseFiller.fill( 
    at net.sf.jasperreports.engine.fill.JRFillSubreport.fillSubreport( 
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask( 
    at java.util.concurrent.ThreadPoolExecutor$ 
Caused by: net.sf.jasperreports.engine.JRException: Error loading object from InputStream 
    at net.sf.jasperreports.engine.util.JRLoader.loadObject( 
    at net.sf.jasperreports.engine.util.JRLoader.loadObject( 
    at net.sf.jasperreports.repo.SerializedObjectPersistenceService.load( 
    ... 21 more 
Caused by: invalid stream header: 3C3F786D 
    at net.sf.jasperreports.engine.util.ContextClassLoaderObjectInputStream.<init>( 
    at net.sf.jasperreports.engine.util.JRLoader.loadObject( 
    ... 23 more 


I modified the subrepot expression from "repo:subreport.jrxml" to "subreport.jrxml" in iReport but still its giving the same issue. I,m unable to figure it out why its giving this error.The report is same as privious.

Can anyone help me regarding this issue.




anand.p's picture
Joined: Oct 22 2012 - 1:51am
Last seen: 7 months 1 day ago

Hi I am also having the same problem.If you know the solution please post here.

I am new to Jasper Reports, thanks


suren.testmail - 9 years 1 week ago


I am also facing same problem if you know the solution let me know please

 - 8 years 8 months ago


I solve that changing the extension of the file to jasper. Not just modifying the subrepot expression from "repo:subreport.jrxml" to "subreport.jrxml". Because when you upload the report, previously is compiled. So, you need to change to.. "subreport.jasper"

Now, it is working again!

Good luck!

ronal0313 - 7 years 12 months ago
show 1 more...

Yeap chaning jrxml to jasper wiork for SUBREPORT. 

YOu can build project so that SUBreport get compiled - 5 years 9 months ago

2 Answers:

Change "subreport.jrxml" to "subreport.jasper"

hozawa's picture
Joined: Apr 24 2010 - 4:31pm
Last seen: 3 years 9 months ago

I had the same problem.

But in my case I renamed report.jasper to report.jrxml. Then I recompiled and the .jasper was generated correctly.

Lea R. Ning's picture
Joined: Jul 7 2015 - 11:05am
Last seen: 7 years 8 months ago