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

Use of precompiled reports throws exception


gkari

Recommended Posts

Dear all,

We've generated report templates using the I-report plugin for Netbeans and  store the compiled (.jasper) files. When the application is built, these are stored under WEB-INF/classes/../templates.

When accessed through the application for report generation the following exception is thrown:

net.sf.jasperreports.engine.JRException: Error loading object from InputStream                at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:198)                at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:603)                at management.reports.ReportingBean.generateReport(ReportingBean.java:520)                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

Caused by: java.io.UTFDataFormatException                at java.io.ObjectInputStream$BlockDataInputStream.readUTFSpan(ObjectInputStream.java:3082)                at java.io.ObjectInputStream$BlockDataInputStream.readUTFBody(ObjectInputStream.java:3007)                at java.io.ObjectInputStream$BlockDataInputStream.readUTF(ObjectInputStream.java:2820)

However, when the reports are compiled within the java application and then used (as opposed to using the already compiled reports), everything works fine.

Is there a way to avoid the overhead of compiling each report before use and just using precompiled .jasper files?

Any pointers would be appreciated.

Thanks.

 

 

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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