https://issues.apache.org/bugzilla/show_bug.cgi?id=56906
Bug ID: 56906 Summary: While reading .docx(of more than 10mb) file with Apache POI its throwing OutOfMemory error Product: POI Version: 3.10-FINAL Hardware: PC Status: NEW Severity: major Priority: P2 Component: XWPF Assignee: dev@poi.apache.org Reporter: ajeet.si...@mastek.com I am using apche POI-3.10, I have to read an sample.docx file and write its content to new sampleOutput.docx file. However I have succeed to do the same but while reading file’s more than or equal to 10mb in size, XWPFDocument is not able to read the file, its throwing error “java.lang.OutOfMemoryError: Java heap space” Following is the sample code for the reference, Request you to help me with any solution try { FileInputStream fis = new FileInputStream(“sample.docx”); XWPFDocument document = new XWPFDocument(OPCPackage.open(inputFilePath)); // its throws error here with files of size >= 10 mb OutputStream outStream = new FileOutputStream(outputFilePath); document. write(outStream); }catch(Exception e){ e.printStackTrace(); } -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org