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! 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:958) at org.apache.poi.openxml4j.opc.PackagePart.getOutputStream(PackagePart.java:522) at org.apache.poi.xssf.usermodel.XSSFWorkbook.commit(XSSFWorkbook.java:1687) at org.apache.poi.POIXMLDocumentPart.onSave(POIXMLDocumentPart.java:464) at org.apache.poi.POIXMLDocument.write(POIXMLDocument.java:211) at barker.alvine.staff.FileWrite.addItem(FileWrite.java:273) at barker.alvine.inventory.Order.getOrderDetails(Order.java:83) at barker.alvine.staff.User.getOption(User.java:47) at barker.alvine.access.Login.start(Login.java:47) at TestPackages.main(TestPackages.java:7)
Could you take look at bug 59806? This bug had the same stack trace and was caused by trying to use objects after the workbook/slideshow/document/etc was closed. Make sure your code isn't using resources after they are closed. If this is not the case, you will need to provide a *minimal* code sample and likely the workbook that caused the problem.
Also what about the "and attach a file that triggers it" part of the error message?
Please reopen this bug if you can provide some more information here, currently there is not much we can do without the actual file that triggers this.