Bug 62588

Summary: Null pointer exception while debugging but same code work and provide me correct output when i ran it normal way
Product: POI Reporter: Praveen <praveenhudgi>
Component: SXSSFAssignee: POI Developers List <dev>
Severity: normal    
Priority: P2    
Version: 3.17-FINAL   
Target Milestone: ---   
Hardware: PC   
OS: All   
Attachments: Attached the exception for the above code mentioned in the description.

Description Praveen 2018-07-31 14:52:03 UTC
Created attachment 36061 [details]
Attached the exception for the above code mentioned in the description.

Null pointer exception is thrown ,When i am trying to read data from external source Excel.

here is my code to read data from excel (.xlsx)

public class ExcelReader {

	public static void main(String[] args) throws Exception {
		String path ="C:\\Users\\hudgipr\\Desktop\\ConfigData.xlsx";
		FileInputStream fis = new FileInputStream(path);
		Workbook wb = WorkbookFactory.create(fis);
		Sheet sh = wb.getSheet("Flipkart");
		Row rw = sh.getRow(0);
		Cell cl =rw.getCell(0);



problem is when i run it normal way it works fine and provide me correct output without throwing any exception,but when i debug same code i get an exception on the line code

 Workbook wb = WorkbookFactory.create(fis);

Please find attachment for exception while debugging.

Please help me i am blocked on this from 3 days and did not found any solution,not sure whats the issue.
Comment 1 Dominik Stadler 2018-12-21 07:26:51 UTC
The exception seems to happen deeply inside JVM code while class-loading and is not related to POI itself. Also seems to only happen when debugging in local IDE, so not easy to reproduce. 

Therefore I am not sure how we can help/investigate her. If it works when run without IDE debugging, it seems to be caused by some glitch in your IDE and not in code in POI.

Thus I am closing this with WORKSFORME unless there is some more indication of a problem directly in Apache POI code here.