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 AA46A200C70 for ; Thu, 20 Apr 2017 05:12:10 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id A8D91160BAD; Thu, 20 Apr 2017 03:12:10 +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 C0A97160B9C for ; Thu, 20 Apr 2017 05:12:09 +0200 (CEST) Received: (qmail 20816 invoked by uid 500); 20 Apr 2017 03:12:07 -0000 Mailing-List: contact dev-help@geode.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@geode.apache.org Delivered-To: mailing list dev@geode.apache.org Received: (qmail 20798 invoked by uid 99); 20 Apr 2017 03:12:07 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Apr 2017 03:12:07 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 4FD0C1857B2 for ; Thu, 20 Apr 2017 03:12:07 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id gxnmNG-ZPtod for ; Thu, 20 Apr 2017 03:12:06 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 3FEFE5FB64 for ; Thu, 20 Apr 2017 03:12:06 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id C50BFE06BE for ; Thu, 20 Apr 2017 03:12:05 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 7689021B53 for ; Thu, 20 Apr 2017 03:12:04 +0000 (UTC) Date: Thu, 20 Apr 2017 03:12:04 +0000 (UTC) From: "ASF subversion and git services (JIRA)" To: dev@geode.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (GEODE-2796) NPE in ClassPathLoader MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 20 Apr 2017 03:12:10 -0000 [ https://issues.apache.org/jira/browse/GEODE-2796?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15975975#comment-15975975 ] ASF subversion and git services commented on GEODE-2796: -------------------------------------------------------- Commit 48d662aab7ae4110f36a05aadefe9c12b48c1293 in geode's branch refs/heads/develop from [~jstewart] [ https://git-wip-us.apache.org/repos/asf?p=geode.git;h=48d662a ] GEODE-2796: ClassPathLoader does not blow up with null TCCL > NPE in ClassPathLoader > ---------------------- > > Key: GEODE-2796 > URL: https://issues.apache.org/jira/browse/GEODE-2796 > Project: Geode > Issue Type: Bug > Components: management > Reporter: Jared Stewart > Assignee: Jared Stewart > > It looks like an NPE was introduced by the fix for GEODE-2290: > {noformat} > Caused by: java.lang.NullPointerException > at org.apache.geode.internal.ClassPathLoader.getResource(ClassPathLoader.java:130) > at org.apache.geode.internal.ClassPathLoader.getResourceAsStream(ClassPathLoader.java:239) > at org.apache.geode.internal.ClassPathLoader.getResourceAsStream(ClassPathLoader.java:264) > at org.apache.geode.internal.GemFireVersion$VersionDescription.(GemFireVersion.java:191) > at org.apache.geode.internal.GemFireVersion.getDescription(GemFireVersion.java:52) > at org.apache.geode.internal.GemFireVersion.getGemFireVersion(GemFireVersion.java:66) > at org.apache.geode.cache.CacheFactory.getVersion(CacheFactory.java:305) > ... > {noformat} > This is caused by the following method: > {noformat} > private List getClassLoaders() { > ArrayList classLoaders = new ArrayList<>(); > if (!excludeTCCL) { > classLoaders.add(Thread.currentThread().getContextClassLoader()); > } > classLoaders.add(classLoaderForDeployedJars); > return classLoaders; > } > {noformat} > According to the JavaDocs, `getContextClassLoader()` actually returns null to indicate the system class loader (rather than actually returning the system class loader). -- This message was sent by Atlassian JIRA (v6.3.15#6346)