Summary: | Exception in thread "main" org.apache.poi.openxml4j.exceptions.OpenXML4JRuntimeException: | ||
---|---|---|---|
Product: | POI | Reporter: | Pankaj Sinha <psinha18> |
Component: | POI Overall | Assignee: | POI Developers List <dev> |
Status: | RESOLVED WORKSFORME | ||
Severity: | normal | CC: | psinha18 |
Priority: | P2 | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | All | ||
Attachments: |
Code file attached
Excel file attached |
Can you please upload the file that triggers the exception? Without a problematic file, there's almost nothing we can do to diagnose it The file is already attached in .txt format with the simple code present therein. Attached file name: "Code File attached" in the attachment section. Changed status to New You've attached the Java code, we need the Microsoft Excel file you're using to trigger the exception Created attachment 33350 [details] Excel file attached Please find attached herewith the required file triggering the issue.. Additional note: Exception in thread "main" 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've had a go at turning your file + code into a unit test, in r1720411. It's test58731() in TestXSSFBugs. Can you try to see what's different in our test to your code? Only the test is passing in the junit code Please note that the unit test did have a few issues and was not executed in CI at all, but even after those fixes it is running fine and does not reproduce the reported problem. This issue is not appearing now with the same lines of codes. Hence, the issue can be closed. Closing as requested by the original reporter |
Created attachment 33347 [details] Code file attached I ran a siple java code and got he below stated exception and reading the exception it says that such error should not come up and asked to log the issue. at org.apache.poi.openxml4j.opc.internal.ContentTypeManager.getContentType(ContentTypeManager.java:343) at org.apache.poi.openxml4j.opc.internal.ContentTypeManager.removeContentType(ContentTypeManager.java:256) at org.apache.poi.openxml4j.opc.OPCPackage.removePart(OPCPackage.java:943) at org.apache.poi.openxml4j.opc.PackagePart.getOutputStream(PackagePart.java:522) at org.apache.poi.xssf.usermodel.XSSFWorkbook.commit(XSSFWorkbook.java:1678) at org.apache.poi.POIXMLDocumentPart.onSave(POIXMLDocumentPart.java:341) at org.apache.poi.POIXMLDocument.write(POIXMLDocument.java:206) at Package1.ReadFile.main(ReadFile.java:136)