registros.poig Posted October 16, 2020 Share Posted October 16, 2020 Hello everybody,I am trying to generate a XLSX report with one big sheet, but I obtain the famous "java.lang.OutOfMemoryError: Java heap space" Exception.I have tried using JRFileVirtualizer and JRSwapFileVirtualizer, obtaining the same error.Constructors used:JRFileVirtualizerJRFileVirtualizer(int maxSize, java.lang.String directory) JRSwapFileVirtualizerJRSwapFileVirtualizer(int maxSize, JRSwapFile swap, boolean swapOwner)JRSwapFile(java.lang.String directory, int blockSize, int minGrowCount)Arguments that I have used in my tests:maxSize (both FileVirtualizer and SwapFileVirtualizer): 0, 1, 2 and 5directory (both): /var/opt/test/blockSize (swap): 4096minGrowCount (swap): 25It seems that the virtualizer is not being used. I have been monitorizing the virtualization directory, and no file is created there.I am conrnerned about the maxSize parameter, as it is the number of report PAGES that the virtualizer will keep in memory before it triggers,but xlsx files do not have pages, like pdf files have (and I am not using "pagination" either -> isIgnorePagination="true"),so I thought that maybe this was the reason why the virtualizer is not triggering.About this matter, I have found this post about the meaning of the maxSize attribute https://community.jaspersoft.com/questions/505021/virtualizer-attribute-maxsize ,and it seems to say that there is a problem with xlsx files.I am trying to figure out posible tricks but I can't find one.My report is a big variant crosstab, so dividing in subreports is not possible.I can't test if using pagination ( isIgnorePagination="false") the virtualization finally works, because I can't avoid the error "net.sf.jasperreports.engine.JRRuntimeException: Not enough space to render the crosstab." while using it. 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