From user-return-22902-archive-asf-public=cust-asf.ponee.io@poi.apache.org Tue Jan 23 16:50:06 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id B3F0418076D for ; Tue, 23 Jan 2018 16:50:06 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id A401D160C17; Tue, 23 Jan 2018 15:50:06 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id F1ABE160C4D for ; Tue, 23 Jan 2018 16:50:05 +0100 (CET) Received: (qmail 66674 invoked by uid 500); 23 Jan 2018 15:50:04 -0000 Mailing-List: contact user-help@poi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "POI Users List" Delivered-To: mailing list user@poi.apache.org Received: (qmail 66017 invoked by uid 99); 23 Jan 2018 15:50:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Jan 2018 15:50:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id B08E5C3C8C for ; Tue, 23 Jan 2018 15:50:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.193 X-Spam-Level: *** X-Spam-Status: No, score=3.193 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, MIME_QP_LONG_LINE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URI_HEX=1.313] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id s75QuzvvsJ0t for ; Tue, 23 Jan 2018 15:50:01 +0000 (UTC) Received: from mail-wm0-f50.google.com (mail-wm0-f50.google.com [74.125.82.50]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 0CF1E5F1F3 for ; Tue, 23 Jan 2018 15:50:01 +0000 (UTC) Received: by mail-wm0-f50.google.com with SMTP id b21so2819023wme.4 for ; Tue, 23 Jan 2018 07:50:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:content-transfer-encoding:mime-version:date:subject:message-id :references:in-reply-to:to; bh=EJ55ZTSB73VCbyZ0/rXxE+oSM5yPlqu8c8U/hqnQmQc=; b=ZYlZbp3qgBNKHJq+SgxwhcXhF9iLwVr7rf+uKizfJoBr09NAX7D7Kj5dlsqK9W9OGx m+c23K1dum+NDX4KW3J7ur8x3wrKCZ9vgKS+rF5isQzmrFcXCQBq7SSi5TZgRiPusS+2 44Okv6IOoi2HYgL+zb2PEiOVwpD5TefEGcMN2E3rjtMpH9p50uEs1ChVeMv5KDbe37u2 Snl9DdQPAU7DoZ+mdtM482rYZO5yDTZAyy+L4+K80J5V21W4wzRPnyF8U7OIYO0R5YiY YJ6fB8C6zKAlrqaM2ltUZMmCllZQeNLuYeqwq+uV1kgzY1tt1sMRKvYfAnclFRfAZS0d XvIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version:date :subject:message-id:references:in-reply-to:to; bh=EJ55ZTSB73VCbyZ0/rXxE+oSM5yPlqu8c8U/hqnQmQc=; b=qkbzQ07XLwG79tztdjDb+fHtgjfYX5RrH7/2ltUgVjvU9MnDxgZmvDWd1ZKjReTTY0 JwwcVJoBMXNzTZxhKuzXlBjg6qBH/DKdE0kJfmCGzgCV8SaZ+jqgx0Qtg8jyusc3jzQZ kkt7FEtvXDPXRepV9OcnrdhBbC66WwdfPXskCwSDlPFsXf2n6ElIRZWg53Hz6YTa1NL5 SHNQEdCnBNsSsI0laGQOIu3s2HFWFRkXCgrDam5CqdzpsCgHil1B0Z+IaiHVR0R32AcH 3hIkRpFjlgFnCHhnkFqDJdNhD6iDRKadfj7swUTbSj9i8LubXzfK8DMIkDZh0UuiQkyS yS/w== X-Gm-Message-State: AKwxytfohudW4mwzytDvufH5PLCDN3DsjabVM5XNfJwikWcbEPD1NP+Y eLFF2OHOaxkhzDZmEg+QSCbw7Bpw X-Google-Smtp-Source: AH8x225f7G4gIyxN+2X324uzezVN0WDIm+v5bW0h2W10sGag471Y0XksLDge/1k/EYCXGp+6TiSBCQ== X-Received: by 10.28.87.20 with SMTP id l20mr2189195wmb.48.1516722593998; Tue, 23 Jan 2018 07:49:53 -0800 (PST) Received: from [10.33.154.232] (x527163e8.dyn.telefonica.de. [82.113.99.232]) by smtp.gmail.com with ESMTPSA id o12sm788863wrf.81.2018.01.23.07.49.52 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Jan 2018 07:49:52 -0800 (PST) From: =?utf-8?Q?J=C3=B6rn_Franke?= Content-Type: multipart/alternative; boundary=Apple-Mail-19707F91-E3DB-419F-97DC-94F4FB78A639 Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (1.0) Date: Tue, 23 Jan 2018 16:49:51 +0100 Subject: Re: XSSFWorkbook throws outofMemoryError Message-Id: <83F25EC7-D651-46BA-A087-BE4144B049E4@gmail.com> References: <1516717333630-0.post@n5.nabble.com> In-Reply-To: <1516717333630-0.post@n5.nabble.com> To: POI Users List X-Mailer: iPhone Mail (15C202) --Apple-Mail-19707F91-E3DB-419F-97DC-94F4FB78A639 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable 50 mb compressed can easily be several hundred MBs uncompressed. Especially w= ith Java Datentypes. You should increase the memory by at least 2 other GB, i= f you want to stay with your current solution. Depending on your workbook structure you could skip reading sheets which are= not relevant or just read one after the other. The following example uses t= his as part of hybrid streaming, but you could follow the same approach with= the normal api(read only one sheet and ignore the others): https://svn.apache.org/repos/asf/poi/trunk/src/examples/src/org/apache/poi/x= ssf/streaming/examples/HybridStreaming.java I use the streaming classes as part of HadoopOffice (including support for e= ncryption and digital signature) it is not so difficult to use. > On 23. Jan 2018, at 15:22, maitrey wrote: >=20 > My file is 50MB and I got outofMemoryError in this statement. > XSSFWorkbook workbook =3D new XSSFWorkbook(excelFilePath);=20 >=20 > this line causes to java.lang.OutOfMemoryError: Java heap space >=20 > We have search and try to apply the solutions like SXSSF classes, > StreamReader classes and SAX parser. > But this needs big implementation in our application. > We have the heap memory to 2GB but still we get this error. >=20 > Is there any way to use this constuctor?=20 > we need workbook object. It is extensive used in application. > I know there are similar questions like this. I have also tried to apply > suggetions but it is not completly works in our case. >=20 >=20 >=20 > -- > Sent from: http://apache-poi.1045710.n5.nabble.com/POI-User-f2280730.html >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@poi.apache.org > For additional commands, e-mail: user-help@poi.apache.org >=20 --Apple-Mail-19707F91-E3DB-419F-97DC-94F4FB78A639--