JasperReports 4.5.1 using JRE 1.6 method in Report Virtualization

0

We've just upgraded to JasperReports 4.5.1.   I'm now getting a NoSuchMethodError when trying to create an 108,000 line text report using JRSwapFileVirtualizer and exporting it using JRCsvExporter.

It appears that the VirtualizableElementList class is using a binarySearch method only available in JRE 1.6.

According to the Ultimate guide JRE 1.3 is all that is required.  Our platform uses JRE 1.5 and cannot be upgraded at this time.

Can you supply a patch or a workaround.

Here is the stack trace: Exception in thread "main" java.lang.NoSuchMethodError: java.util.Arrays.binaryS earch([IIII)I         at net.sf.jasperreports.engine.base.ElementsBlockList.blockIndex(Virtual izableElementList.java:711)         at net.sf.jasperreports.engine.base.ElementsBlockList.get(VirtualizableE lementList.java:586)         at net.sf.jasperreports.engine.base.VirtualizableElementList.get(Virtual izableElementList.java:96)         at net.sf.jasperreports.engine.base.VirtualizableElementList.get(Virtual izableElementList.java:54)         at net.sf.jasperreports.engine.export.JRGridLayout.createWrappers(JRGrid Layout.java:958)         at net.sf.jasperreports.engine.export.JRGridLayout.<init>(JRGridLayout.j ava:143)         at net.sf.jasperreports.engine.export.JRCsvExporter.exportPage(JRCsvExpo rter.java:53)         at net.sf.jasperreports.engine.export.JRAbstractCsvExporter.exportReport ToWriter(JRAbstractCsvExporter.java:240)         at net.sf.jasperreports.engine.export.JRAbstractCsvExporter.exportReport (JRAbstractCsvExporter.java:187) 

Thanks!

jtotaf's picture
11
Joined: Jul 31 2006 - 5:39am
Last seen: 8 years 3 months ago

5 Answers:

0

Hi,

 

Our documentation needs to be updated.

We are going to make it more clear to our users that we are going to keep compatibility with JRE 1.6.

Note that 1.5 has reached End Of Life years ago. If you still need to use it, then you'll need to use old JR as well, or adapt newer versions to 1.5. on your own.

"Java SE 5.0 is in its Java Technology End of Life (EOL) transition period. The EOL transition period began April 8th, 2007 and will complete October 8th, 2009, when Java SE 5.0 will have reached its End of Service Life (EOSL)."

 

Thank you,

Teodor

 

teodord's picture
2885
Joined: Jun 30 2006 - 9:00am
Last seen: 1 month 3 weeks ago
0

Thanks Teodor for your prompt response!

Could you tell me the last JasperReport  release that is fully compatible with JRE 1.5.

Thanks again!

 

jtotaf's picture
11
Joined: Jul 31 2006 - 5:39am
Last seen: 8 years 3 months ago
0

It turns out to be relatively easy to create a JRE 1.5 compatible version of the JasperReports 4.5.1 library.  I've created the jar file if anyone is interested.

jtotaf's picture
11
Joined: Jul 31 2006 - 5:39am
Last seen: 8 years 3 months ago

Hi Jtotaf, can you please share the jar with me as well? Many Thanks in advance!

selin.ebeci - 1 year 7 months ago
0

@jtotaf .. please share the custom jar of 4.5.1 compatible with JRE 1.5

jawwadfarooq1's picture
Joined: Feb 28 2011 - 7:35pm
Last seen: 1 year 11 months ago
0

Here you go!

Please note that this comes with no guarantee of any kind either implied or explicit.

The files I changed were HibernateDataAdapterService.java, SpringHibernateDataAdapterService.java, VirtualizableElementList.java and XmlaDataAdapterService.java.

All the best!

jtotaf's picture
11
Joined: Jul 31 2006 - 5:39am
Last seen: 8 years 3 months ago
Feedback
randomness