You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Alexandr Kuramshin (JIRA)" <ji...@apache.org> on 2017/09/25 08:24:00 UTC

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

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

Alexandr Kuramshin updated IGNITE-5251:
---------------------------------------
    Fix Version/s:     (was: 2.3)

> 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
>            Assignee: Alexey Dmitriev
>              Labels: easyfix
>
> 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.4.14#64029)