ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexandr Kuramshin (JIRA)" <j...@apache.org>
Subject [jira] [Created] (IGNITE-5251) Some JVM implementations may return null from getClassLoader()
Date Thu, 18 May 2017 06:43:04 GMT
Alexandr Kuramshin created IGNITE-5251:
------------------------------------------

             Summary: Some JVM implementations may return null from getClassLoader()
                 Key: IGNITE-5251
                 URL: https://issues.apache.org/jira/browse/IGNITE-5251
             Project: Ignite
          Issue Type: Bug
          Components: general
    Affects Versions: 2.0
         Environment: OpenJDK Runtime Environment (build 1.8.0_131-b11)
OpenJDK 64-Bit Server VM (build 25.131-b11, mixed mode)
            Reporter: Alexandr Kuramshin
             Fix For: 2.1


Starting Ignite instance causes the NPE

{noformat}
java.lang.NullPointerException
        at org.apache.ignite.internal.util.IgniteUtils.appendClassLoaderHash(IgniteUtils.java:4438)
        at org.apache.ignite.internal.util.IgniteUtils.makeMBeanName(IgniteUtils.java:4418)
        at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.registerFactoryMbean(IgnitionEx.java:2499)
        at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1801)
        at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1604)
        at org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1041)
        at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:568)
        at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:515)
        at org.apache.ignite.Ignition.start(Ignition.java:322)
{noformat}

Should be implemented {{IgniteUtils.getClassLoader(Class<?> cls)}} which checks {{cls.getClassLoader()}}
and in the case of null returns {{ClassLoader.getSystemClassLoader()}}.

All usages of {{Class.getClassLoader()}} should be replaced with  {{IgniteUtils.getClassLoader()}}.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message