Return-Path: X-Original-To: apmail-poi-user-archive@www.apache.org Delivered-To: apmail-poi-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2ED167B2C for ; Wed, 20 Jul 2011 22:42:29 +0000 (UTC) Received: (qmail 45817 invoked by uid 500); 20 Jul 2011 22:42:28 -0000 Delivered-To: apmail-poi-user-archive@poi.apache.org Received: (qmail 45740 invoked by uid 500); 20 Jul 2011 22:42:28 -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 45732 invoked by uid 99); 20 Jul 2011 22:42:27 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Jul 2011 22:42:27 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of nick.burch@alfresco.com designates 207.126.144.127 as permitted sender) Received: from [207.126.144.127] (HELO eu1sys200aog109.obsmtp.com) (207.126.144.127) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 20 Jul 2011 22:42:18 +0000 Received: from zimbra.alfresco.com ([88.151.129.3]) by eu1sys200aob109.postini.com ([207.126.147.11]) with SMTP ID DSNKTidZtjoVKy4zOrGvLkggv9xhVtSB8bSm@postini.com; Wed, 20 Jul 2011 22:41:58 UTC Received: from localhost (localhost.localdomain [127.0.0.1]) by zimbra.alfresco.com (Postfix) with ESMTP id 2447350C02B for ; Wed, 20 Jul 2011 23:41:58 +0100 (BST) X-Virus-Scanned: amavisd-new at unx-d-manc4.tc.ifeltd.com Received: from zimbra.alfresco.com ([127.0.0.1]) by localhost (zimbra.alfresco.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5-6M5CqRIvEh for ; Wed, 20 Jul 2011 23:41:58 +0100 (BST) Received: from urchin.earth.li (urchin.earth.li [212.13.204.73]) (Authenticated sender: nick.burch@alfresco.com) by zimbra.alfresco.com (Postfix) with ESMTP id 0036750C02A for ; Wed, 20 Jul 2011 23:41:57 +0100 (BST) Date: Wed, 20 Jul 2011 23:41:57 +0100 (BST) From: Nick Burch X-X-Sender: nick@urchin.earth.li To: POI Users List Subject: Re: InvalidOperation retrieving InputStream In-Reply-To: Message-ID: References: <1311102609563-4613320.post@n5.nabble.com> <1311162888960-4615621.post@n5.nabble.com> <1311166136767-4615747.post@n5.nabble.com> <1311168627555-4615851.post@n5.nabble.com> <1311171374304-4615986.post@n5.nabble.com> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Checked: Checked by ClamAV on apache.org On Wed, 20 Jul 2011, Pruitt, Byron S wrote: > I am having a problem with the openxml4j library in poi 3.7. > > OPCPackage pkg = OPCPackage.open(filePath); > PackagePartName corePartName = PackagingURIHelper.createPartName("/docProps/core.xml"); > PackagePart dCore = pkg.getPart(corePartName); > > System.out.println(dCore.getContentType()); > System.out.println(dCore.getPartName().getName()); > > InputStream strmCore = dCore.getInputStream(); I think you're not supposed to work with the core part in this way. It's a special part with certain restrictions, which POI enforces What were you hoping to do with the core part? (There may well be a better way to do it) Nick --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@poi.apache.org For additional commands, e-mail: user-help@poi.apache.org