Bug 58694

Summary: org.apache.poi.openxml4j.exceptions.OpenXML4JRuntimeException
Product: POI Reporter: wataylor
Component: POI OverallAssignee: POI Developers List <dev>
Status: RESOLVED WORKSFORME    
Severity: blocker    
Priority: P2    
Version: 3.13-FINAL   
Target Milestone: ---   
Hardware: PC   
OS: All   
Attachments: My web application passes this file to POI after uploading it. That works. When I try to write it back out, the sky falls.

Description wataylor 2015-12-06 02:21:51 UTC
Created attachment 33327 [details]
My web application passes this file to POI after uploading it.  That works.  When I try to write it back out, the sky falls.

Error writing work book org.apache.poi.openxml4j.exceptions.OpenXML4JRuntimeException: Rule M2.4 exception : this error should NEVER happen! Please raise a bug at https://bz.apache.org/bugzilla/enter_bug.cgi?product=POI and attach a file that triggers it, thanks!

I have attached the file which is input and read by POI after it has been uploaded to my web application.  My program changes all of the C cells in column A to Completed and then tries to write the spread sheet to request.out.  I have attached the input file.

This first happened on the Linux production system with version 11 but it was not happening on my windows 7 test system.  Suspecting that you'd ask me to upgrade, I switched from poi 11 to poi 13 on Windows, and it started happening on windows.
Comment 1 Dominik Stadler 2015-12-06 22:53:59 UTC
I tried to reproduce this, but could not when using the trunk version of POI. I used the following piece of code, can you provide the steps that reproduce the problem for you (reduced to the bare minimum) so we can try to reproduce it? 

       for(Sheet sheet : wb) {
           for(Row row : sheet) {
               Cell cell = row.getCell(0);
               if(cell.getStringCellValue().equals("C")) {
                   cell.setCellValue("Completed");
               }
           }
       }
       Workbook wb2 = XSSFTestDataSamples.writeOutAndReadBack(wb);
       wb2.close();
Comment 2 Dominik Stadler 2016-02-15 21:13:29 UTC
No response for some time on the request for more information, therefore I am setting closing this for now. Please reopen this with more information if you still have this problem with the latest version of POI.