I have run into this issue: http://stackoverflow.com/questions/18756484/getting-illegalarguementexception-value-for-parameter-id-was-out-of-bounds The fix suggested there hasn't made it into trunk, and there also doesn't seem to be a bug report anyways. It is really that simple?
Do you have a file you could share which triggers the problem?
Sorry, not at the moment, I got the exception just in a log. I'll have the program save the file for inspection next time. It obviously affects only a very number of files anyways.
We like to have sample files that show the problem so we can include unit tests. That allows us to check we've really fixed the problem, and that it stays fixed as we go forward! If you could catch the next failing document and contribute it, we can then verify if the proposed fix is the right one, fix it, and test it
Created attachment 31750 [details] file causing error created or resaved by Libre Office 4.2.3.3 420m0(Build:3) (3.13.0-29-generic #53-Ubuntu SMP Wed Jun 4 21:00:20 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux)
I am experiencing this error as well. It is caused by docx files created or resaved by Libre Office 4.2.3.3 420m0(Build:3) (3.13.0-29-generic #53-Ubuntu SMP Wed Jun 4 21:00:20 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux) I have attached a file that caused the problem. stack trace [Request processing failed; nested exception is java.lang.IllegalArgumentException: Value for parameter 'id' was out of bounds] with root cause java.lang.IllegalArgumentException: Value for parameter 'id' was out of bounds at org.apache.poi.util.IdentifierManager.reserve(IdentifierManager.java:80) at org.apache.poi.xwpf.usermodel.XWPFRun.<init>(XWPFRun.java:107) at org.apache.poi.xwpf.usermodel.XWPFRun.<init>(XWPFRun.java:146) at org.apache.poi.xwpf.usermodel.XWPFParagraph.buildRunsInOrderFromXml(XWPFParagraph.java:135) at org.apache.poi.xwpf.usermodel.XWPFParagraph.<init>(XWPFParagraph.java:88) at org.apache.poi.xwpf.usermodel.XWPFDocument.onDocumentRead(XWPFDocument.java:147) at org.apache.poi.POIXMLDocument.load(POIXMLDocument.java:159) at org.apache.poi.xwpf.usermodel.XWPFDocument.<init>(XWPFDocument.java:124) I am instantiating XWPFDocument thi sway try (FileInputStream fis = new FileInputStream(inputFilename)) { doc = new XWPFDocument(fis); }
Created attachment 32346 [details] IdentifierManager initialised with IDs starting at 0. Patch to solve java.lang.IllegalArgumentException: Value for parameter 'id' was out of bounds when parsing docx files created with LibreOffice
This was actually fixed by checkin "Patch from rojotek from github-18 - Handle documents with a picture-only header" r1661908, I have added a small test with the document from here as test-case to verify that it also continues to work in the future.