You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2018/07/31 14:52:03 UTC

[Bug 62588] New: Null pointer exception while debugging but same code work and provide me correct output,But when i ran it normal way

https://bz.apache.org/bugzilla/show_bug.cgi?id=62588

            Bug ID: 62588
           Summary: Null pointer exception while debugging but same code
                    work and provide me correct output,But when i ran it
                    normal way
           Product: POI
           Version: 3.17-FINAL
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: SXSSF
          Assignee: dev@poi.apache.org
          Reporter: praveenhudgi@gmail.com
  Target Milestone: ---

Created attachment 36061
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=36061&action=edit
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);

                System.out.println(cl.getStringCellValue());

        }

}

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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 62588] Null pointer exception while debugging but same code work and provide me correct output when i ran it normal way

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62588

Dominik Stadler <do...@gmx.at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |WORKSFORME

--- Comment #1 from Dominik Stadler <do...@gmx.at> ---
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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 62588] Null pointer exception while debugging but same code work and provide me correct output when i ran it normal way

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62588

Praveen <pr...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All
            Summary|Null pointer exception      |Null pointer exception
                   |while debugging but same    |while debugging but same
                   |code work and provide me    |code work and provide me
                   |correct output,But when i   |correct output when i ran
                   |ran it normal way           |it normal way

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org