Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 151C2200D48 for ; Wed, 29 Nov 2017 11:49:49 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 13403160C04; Wed, 29 Nov 2017 10:49:49 +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 57FB0160BF6 for ; Wed, 29 Nov 2017 11:49:48 +0100 (CET) Received: (qmail 64449 invoked by uid 500); 29 Nov 2017 10:49:47 -0000 Mailing-List: contact dev-help@poi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "POI Developers List" Delivered-To: mailing list dev@poi.apache.org Received: (qmail 64437 invoked by uid 99); 29 Nov 2017 10:49:47 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Nov 2017 10:49:47 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 616D71A081A for ; Wed, 29 Nov 2017 10:49:46 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.48 X-Spam-Level: ** X-Spam-Status: No, score=2.48 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=dinom-ru.20150623.gappssmtp.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id KiCgFJtZ6Fg2 for ; Wed, 29 Nov 2017 10:49:42 +0000 (UTC) Received: from mail-oi0-f45.google.com (mail-oi0-f45.google.com [209.85.218.45]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id DA94A5F260 for ; Wed, 29 Nov 2017 10:49:41 +0000 (UTC) Received: by mail-oi0-f45.google.com with SMTP id y75so2080198oie.4 for ; Wed, 29 Nov 2017 02:49:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dinom-ru.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=pULZD6UYk+80qY3gubtIOxHHGb9HNQaa2Rhj0Mf0YTY=; b=Y+3A9qXv+pPUFmyLz693J/FawixjHyOW0msfbn+4tDhbEcmkwY0m0+8lYVfcMfANF8 DYAfAvQmhvf4tj6ZcBZdnSS1KOmAgJDB2o8uCzG1jevyFm72XrWu2G+QsN59E/fV9ykx FipRn02ICLIO1IGqzxm3Ge1ZQerI5bonyNPmSyaNnBYj+jm1m0LMxiPMbMDBLYJrjCUV WB7MR029dkDdZNHmPiHF8DKf8xhupd7rMkaL4RXyA5t1AhM6DaXvo4/mwx2+51n/xbkV r8iP0olfxAjgUPdF32JcPNaAd3s/x5uLL/Pmjac6NT/7saJzP+2PMTW+i1YHIy1PBV9j Lh5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=pULZD6UYk+80qY3gubtIOxHHGb9HNQaa2Rhj0Mf0YTY=; b=GwDDYoaEV2j31TaFLf6xX3BfcROSnDV+F43sLjRscr8MK20cVCzDul3t7W/kvmt/C4 a43MybIxxwMU3WwGtC9iWbac4Ns3jBmRo/EfSDPy0tXi5fiMt2e5K6/eRAU2yNuNA5er MZsoLdcYpTIs5CNlVAhI5rYi2yEy4nE8hAHr0kBaBFMfGcxQtjBozmJPjIR6N8JAU8Yw NTvttqvzDembCLA2ylvQ5S3S0YB01Y5uo04GO3nbWrh6SuRQJUVUoiNbcwDElfDhapn4 aT8zpGlvWObww49gzG8ZWMPmdUzuygOukE8re33eejuPlO8VyYVOhk7AQp5E6eYJwMiK cwSg== X-Gm-Message-State: AJaThX6ZEEIr1vXdcxQ0eYVeuOpkFsR5cJQ0bIm9qP1QYf4quz0VtDt2 ftfcFWGbDNUsseES0owlmKPT0vArf3EFOqKLA2ag/Rb+ X-Google-Smtp-Source: AGs4zMatoMSC3I0dXRlFIik0rCSwNzu0cLHp82c1mOI8DdfIoiNtE6e/gIoUKFTPUyjMz+vIWMeQErS5ufcfIzS1qJ0= X-Received: by 10.202.206.151 with SMTP id e145mr1660904oig.108.1511952580307; Wed, 29 Nov 2017 02:49:40 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.92.195 with HTTP; Wed, 29 Nov 2017 02:49:39 -0800 (PST) In-Reply-To: <24553656-2840-357b-2e32-4a1248dc8bf9@apache.org> References: <24553656-2840-357b-2e32-4a1248dc8bf9@apache.org> From: Yegor Kozlov Date: Wed, 29 Nov 2017 13:49:39 +0300 Message-ID: Subject: Re: classloading xsbs for pptx To: POI Developers List Content-Type: multipart/alternative; boundary="001a113df41c778605055f1ce47c" archived-at: Wed, 29 Nov 2017 10:49:49 -0000 --001a113df41c778605055f1ce47c Content-Type: text/plain; charset="UTF-8" It seems to be fixed in 3.17. The snippet below fails with 3.16 but works fine with 3.17 and trunk public static void main( String[] args ) throws Exception { Thread thread = Thread.currentThread(); ClassLoader cl = thread.getContextClassLoader(); Thread th = new Thread(() -> { try { XMLSlideShow ppt = new XMLSlideShow(new FileInputStream(args[0])); for (XSLFSlide slide : ppt.getSlides()) { List shapes = slide.getShapes(); } } catch (Exception e){ e.printStackTrace(); // prints "java.lang.IllegalStateException: Schemas (*.xsb) for CTTable can't be loaded " with poi-3.16 } }); th.setContextClassLoader(cl.getParent()); th.start(); th.join(); } Tim, you should be good to release with poi-3.17, the fix is already there. Yegor On Wed, Nov 29, 2017 at 2:25 AM, Andreas Beeker wrote: > Hi Tim, > > last time when I've introduced the setClassLoader() method, it was helpful > to have a minimal maven project > to showcase the error. > Can you setup a sample project? > > When I changed the ClassLoader code last time with #61478, I've also used > the same sample project [1] > > Andi > > [1] https://github.com/glucazeau/test-poi-sling > > > --001a113df41c778605055f1ce47c--