jtotaf Posted March 19, 2012 Share Posted March 19, 2012 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.binarySearch([iIII)I at net.sf.jasperreports.engine.base.ElementsBlockList.blockIndex(VirtualizableElementList.java:711) at net.sf.jasperreports.engine.base.ElementsBlockList.get(VirtualizableElementList.java:586) at net.sf.jasperreports.engine.base.VirtualizableElementList.get(VirtualizableElementList.java:96) at net.sf.jasperreports.engine.base.VirtualizableElementList.get(VirtualizableElementList.java:54) at net.sf.jasperreports.engine.export.JRGridLayout.createWrappers(JRGridLayout.java:958) at net.sf.jasperreports.engine.export.JRGridLayout.<init>(JRGridLayout.java:143) at net.sf.jasperreports.engine.export.JRCsvExporter.exportPage(JRCsvExporter.java:53) at net.sf.jasperreports.engine.export.JRAbstractCsvExporter.exportReportToWriter(JRAbstractCsvExporter.java:240) at net.sf.jasperreports.engine.export.JRAbstractCsvExporter.exportReport(JRAbstractCsvExporter.java:187) Thanks! Link to comment Share on other sites More sharing options...
Teodor Danciu Posted March 20, 2012 Share Posted March 20, 2012 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 Link to comment Share on other sites More sharing options...
jtotaf Posted March 20, 2012 Author Share Posted March 20, 2012 Thanks Teodor for your prompt response!Could you tell me the last JasperReport release that is fully compatible with JRE 1.5.Thanks again! Link to comment Share on other sites More sharing options...
jtotaf Posted March 21, 2012 Author Share Posted March 21, 2012 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. Link to comment Share on other sites More sharing options...
jawwadfarooq1 Posted April 2, 2012 Share Posted April 2, 2012 @jtotaf .. please share the custom jar of 4.5.1 compatible with JRE 1.5 Link to comment Share on other sites More sharing options...
jtotaf Posted April 3, 2012 Author Share Posted April 3, 2012 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! Link to comment Share on other sites More sharing options...
selin.ebeci Posted March 25, 2013 Share Posted March 25, 2013 Hi Jtotaf, can you please share the jar with me as well? Many Thanks in advance! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now