https://bz.apache.org/bugzilla/show_bug.cgi?id=61104
Javen O'Neal <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO --- Comment #4 from Javen O'Neal <[email protected]> --- I am unable to reproduce your issue with the provided file using the latest POI trunk code, tested locally on my computer. I removed code that appeared to be irrelevant to the demonstrated problem. @Test public void test61104() throws IOException { File file = new File("test-data/document/61104.docx"); InputStream is = new FileInputStream(file); System.out.println(is.available()); XWPFDocument document = new XWPFDocument(is); document.close(); } My best guess is the issue you're having is due to ExtractorWorker or DocxExtractor. I am not familiar with the io.transwarp library, so I can't suggest anything more specific. Make sure you aren't writing to the file while you're reading from it (possibly by another thread, given how Worker classes tend to run in a multi-threaded environment). In general, POI is not thread safe. Usually any task that is run inside some kind of Worker is executed on its own thread, and has its own exception handler stack that will not inform the caller. Another possibility is that `document = XWPFDocument(is)` is throwing an exception that your thread never catches, causing the thread pool executor to suspend. Add some try/catch print code to make sure this isn't the case. If you're running your program in some web container where your `file` object lives in some restricted filesystem with restricted I/O, the problem may be with the I/O layer of the container. You could use POI's `IOUtils.readFully(is)` to see if there's an I/O problem on your platform. If none of the above resolve your question, please respond with the following: Are you using poi-3.16.jar, poi-ooxml-3.16.jar, and poi-ooxml-schemas-3.16.jar? What happens when you remove buffered file writer and replace the loggers with System.out.println? What vendor and version of Java are you running? What OS are you running this on? -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
