helix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kishore g <g.kish...@gmail.com>
Subject NPE during start up
Date Mon, 16 Feb 2015 00:35:09 GMT
Steph described this problem on IRC.

He is using 0.7.1. On connecting to cluster he gets this NPE

http://pastebin.com/YE3fwK5i

java.lang.NullPointerException
        at
org.apache.helix.messaging.handling.HelixTaskExecutor.createMessageHandler(HelixTaskExecutor.java:661)
        at
org.apache.helix.messaging.handling.HelixTaskExecutor.onMessage(HelixTaskExecutor.java:581)
        at
org.apache.helix.manager.zk.ZkCallbackHandler.invoke(ZkCallbackHandler.java:202)
        at
org.apache.helix.manager.zk.ZkCallbackHandler.init(ZkCallbackHandler.java:336)
        at
org.apache.helix.manager.zk.ZkCallbackHandler.<init>(ZkCallbackHandler.java:130)
        at
org.apache.helix.manager.zk.ZkHelixConnection.addListener(ZkHelixConnection.java:533)
        at
org.apache.helix.manager.zk.ZkHelixConnection.addMessageListener(ZkHelixConnection.java:267)
        at
org.apache.helix.manager.zk.ZkHelixParticipant.setupMsgHandler(ZkHelixParticipant.java:347)
        at
org.apache.helix.manager.zk.ZkHelixParticipant.init(ZkHelixParticipant.java:383)
        at
org.apache.helix.manager.zk.ZkHelixParticipant.onConnected(ZkHelixParticipant.java:401)
        at
org.apache.helix.manager.zk.ZkHelixParticipant.start(ZkHelixParticipant.java:428)
        at
com.example.ProtostuffServerNode.spinUpParticipant(ProtostuffServerNode.java:134)


Here is his connection code.

http://pastebin.com/QRfVU1tc

private static HelixParticipant spinUpParticipant(HelixAdmin admin,
ParticipantId participantId) {
                LOGGER.info("Starting up "+participantId);
                HelixConnection connection = new ZkHelixConnection(
ZK_ADDRESS);
                connection.connect();
                HelixParticipant participant =
connection.createParticipant(CLUSTER_ID,
participantId);
                StateMachineEngine stateMach = participant.
getStateMachineEngine();

                StateTransitionHandlerFactory<LocalTransitionHandler>
transitionHandlerFactory = new OnlineOfflineHandlerFactory();
                stateMach.registerStateModelFactory(STATE_MODEL_NAME,
transitionHandlerFactory);
                participant.start();

                admin.enableInstance(CLUSTER_NAME, participantId.toString(),
true);

                return participant;
        }

Adding 3s sleep after registerStateModelFactory works. Any idea what is
happening.

thanks,
Kishore G

Mime
View raw message