Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullPointerException when DefaultNodeExtension class has been loaded by two different class-loaders. #8755

Closed
ttddlplp opened this issue Aug 21, 2016 · 2 comments

Comments

Projects
None yet
3 participants
@ttddlplp
Copy link

commented Aug 21, 2016

java.lang.NullPointerException at com.hazelcast.instance.NodeExtensionFactory.create(NodeExtensionFactory.java:42) at com.hazelcast.instance.DefaultNodeContext.createNodeExtension(DefaultNodeContext.java:35) at com.hazelcast.instance.Node.createNodeExtension(Node.java:290) at com.hazelcast.instance.Node.<init>(Node.java:177) at com.hazelcast.instance.HazelcastInstanceImpl.createNode(HazelcastInstanceImpl.java:155) at com.hazelcast.instance.HazelcastInstanceImpl.<init>(HazelcastInstanceImpl.java:126) at com.hazelcast.instance.HazelcastInstanceFactory.constructHazelcastInstance(HazelcastInstanceFactory.java:218) at com.hazelcast.instance.HazelcastInstanceFactory.newHazelcastInstance(HazelcastInstanceFactory.java:176) at com.hazelcast.instance.HazelcastInstanceFactory.newHazelcastInstance(HazelcastInstanceFactory.java:126) at com.hazelcast.core.Hazelcast.newHazelcastInstance(Hazelcast.java:58)

At NodeExtensionFactory.class line 43, when DefaultNodeExtension class has been loaded by two different class-loaders, it tries to generate logging, but node.nodeEngine is null at that point, therefore cause NullPointerException:

if (clazz.getName().equals(DefaultNodeExtension.class.getName())) { node.nodeEngine.getLogger(NodeExtensionFactory.class).warning( "DefaultNodeExtension class has been loaded by two different class-loaders. " + "Are you running Hazelcast in an OSGi environment? " + "If so, set the bundle class-loader in the Config using the setClassloader() method"); }

@jerrinot jerrinot added this to the 3.7.1 milestone Aug 21, 2016

@jerrinot

This comment has been minimized.

Copy link
Contributor

commented Aug 21, 2016

@ttddlplp: many thanks for your bug-report. it will be fixed in the next patch release.

@tombujok

This comment has been minimized.

Copy link
Contributor

commented Aug 22, 2016

@ttddlplp thx for your report. Issue should be fixed in 3.7.1 and 3.8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.