geode-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jared Stewart (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (GEODE-2796) NPE in ClassPathLoader
Date Mon, 01 May 2017 16:22:04 GMT

     [ https://issues.apache.org/jira/browse/GEODE-2796?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jared Stewart updated GEODE-2796:
---------------------------------
    Fix Version/s: 1.2.0

> 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
>             Fix For: 1.2.0
>
>
> 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.<init>(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<ClassLoader> getClassLoaders() {
>     ArrayList<ClassLoader> 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)

Mime
View raw message