You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by "Alexandr Kuramshin (JIRA)" <ji...@apache.org> on 2017/05/18 06:43:04 UTC

[jira] [Created] (IGNITE-5251) Some JVM implementations may return null from getClassLoader()

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)