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

Virtualization Not Working For Excel?


registros.poig

Recommended Posts

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:

  • JRFileVirtualizer
    • JRFileVirtualizer(int maxSize, java.lang.String directory)
       
  • JRSwapFileVirtualizer
    • JRSwapFileVirtualizer(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 5
  • directory (both): /var/opt/test/
  • blockSize (swap): 4096
  • minGrowCount (swap): 25

It 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

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