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

NPE in WorkflowListenerManagerImpl at line 48 on event type CONNECTION_RECONNECTED with data = null #51

Open
beloyar777 opened this issue Sep 12, 2023 · 0 comments

Comments

@beloyar777
Copy link

Getting the following NPE while executing your example:

2023-09-12 09:40:32,831 ERROR org.apache.curator.framework.recipes.cache.PathChildrenCache [Curator-PathChildrenCache-0] -
java.lang.NullPointerException: Cannot invoke "org.apache.curator.framework.recipes.cache.ChildData.getPath()" because the return value of "org.apache.curator.framework.recipes.cache.PathChildrenCacheEvent.getData()" is null
                at com.nirmata.workflow.details.WorkflowListenerManagerImpl.lambda$start$0(WorkflowListenerManagerImpl.java:48) ~[nirmata-workflow-0.9.7.jar:?]
                at org.apache.curator.framework.recipes.cache.PathChildrenCache.lambda$callListeners$1(PathChildrenCache.java:535) ~[curator-recipes-5.5.0.jar:5.5.0]
                at org.apache.curator.framework.listen.MappingListenerManager.lambda$forEach$0(MappingListenerManager.java:93) ~[curator-framework-5.5.0.jar:5.5.0]
                at org.apache.curator.framework.listen.MappingListenerManager.forEach(MappingListenerManager.java:90) ~[curator-framework-5.5.0.jar:5.5.0]
                at org.apache.curator.framework.listen.StandardListenerManager.forEach(StandardListenerManager.java:90) ~[curator-framework-5.5.0.jar:5.5.0]
                at org.apache.curator.framework.recipes.cache.PathChildrenCache.callListeners(PathChildrenCache.java:532) ~[curator-recipes-5.5.0.jar:5.5.0]
                at org.apache.curator.framework.recipes.cache.EventOperation.invoke(EventOperation.java:36) ~[curator-recipes-5.5.0.jar:5.5.0]
                at org.apache.curator.framework.recipes.cache.PathChildrenCache$8.run(PathChildrenCache.java:802) ~[curator-recipes-5.5.0.jar:5.5.0]
                at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[?:?]
                at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
                at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[?:?]
                at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
                at java.lang.Thread.run(Thread.java:833) ~[?:?]

At WorkflowListenerManagerImpl:48 on event = PathChildrenCacheEvent{type=CONNECTION_RECONNECTED, data=null}

    @Override
    public void start() {
        try {
            runsCache.getListenable().addListener((client, event) -> {
                RunId runId = new RunId(ZooKeeperConstants.getRunIdFromRunPath(event.getData().getPath())); //<-- NPE here
                if (event.getType() == PathChildrenCacheEvent.Type.CHILD_ADDED) {
                    postEvent(new WorkflowEvent(WorkflowEvent.EventType.RUN_STARTED, runId));
                } else if (event.getType() == PathChildrenCacheEvent.Type.CHILD_UPDATED) {
                    postEvent(new WorkflowEvent(WorkflowEvent.EventType.RUN_UPDATED, runId));
                }
            });

ZK server 3.6.4
ZK clients tested 3.6.4, 3.7.1, 3.8.2, 3.9.0
curator-recipes 5.2.0, 5.5.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant