java - Resource leak: workbook is never closed warning when using Apache.POI XSSFWorkbook -


so, using apache poi in order parse excel file database. initializing xssfworkbook follows:

xssfworkbook workbook = new xssfworkbook(fip); 

then proceed method. workbook.close() not available method close workbook afterwards. ideas of how can let garbage collection take workbook after task finished?

i had issue, , making little sense. in end tracked issue down ide (netbeans) picking earlier version of poi libraries (v3.8) didn't have "close" method. check class path , duplicate imports of different versions of poi libraries.


Comments

Popular posts from this blog

apache - setting document root in antoher partition on ubuntu -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -

Process 'command 'F:\android-sdk\build-tools\21.1.2\aapt.exe'' finished with non-zero exit value 1 -