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

How to open old .jasper report


bi.Khurram

Recommended Posts

Hi All,

We have on old linux server (SunOS 5.9) with old .jasper files with same name .xml files (didn't see any jrxml files) and we want to investigate all the .jasper files/reports to evaluate what was done etc.  Looked up a lot of post on this blog but didn't see how I can view or decompile those .jasper reports to see what was done on them (report logic, calculations, filters etc) except one about Jaspersoft Studio.  Moved the files over to my windows laptop and tried opening/previewing it as per its instructions but get an error (see below).  Any assistance would be greatly appreciated.

net.sf.jasperreports.engine.JRException: Error loading object from InputStream.
    at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:230)

Caused by: java.io.InvalidClassException: net.sf.jasperreports.engine.base.JRBaseReport; local class incompatible: stream classdesc serialVersionUID = 606, local class serialVersionUID = 10200
    at java.base/java.io.ObjectStreamClass.initNonProxy(Unknown Source)

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

serialVersionUID = 606 means JasperReports 0.6.6, release in April 2005.

You can download an iReport version released around the same time, for instance 0.5.0, from the iReport classic downloads list, and try to use it to open the .jasper file.

Or you can write a simple Java class that uses the JasperReports API to convert the .jasper file to a .jrxml which you would then be able to open in Jaspersoft Studio.  The code would look something like this:

        JasperReport report = (JasperReport) JRLoader.loadObject(new File("report.jasper"));        JRXmlWriter.writeReport(report, "report.jrxml", "UTF-8");[/code]

Note that in both cases you will probably need an old Java version (such as 1.4 or 5) to run iReport or JasperReports.

Regards,

Lucian

Link to comment
Share on other sites

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