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

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

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