2019-05-03 16:58:54.468 [pool-1-thread-5] EventBusImplementation.lambda$doFireThreadPerHandler$1() WARNING: Exception during execution of event: tigase.pubsub.modules.PresenceCollectorModule.PresenceChangeEvent
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at tigase.eventbus.impl.ReflectEventListenerHandler.dispatch(ReflectEventListenerHandler.java:48)
at tigase.eventbus.impl.EventBusImplementation.lambda$doFireThreadPerHandler$1(EventBusImplementation.java:306)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor38.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at tigase.eventbus.impl.ReflectEventListenerHandler.dispatch(ReflectEventListenerHandler.java:46)
at tigase.eventbus.impl.EventBusImplementation.lambda$doFireThreadPerHandler$1(EventBusImplementation.java:306)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NullPointerException: Element child can not be null.
at tigase.xml.Element.addChild(Element.java:161)
at tigase.pubsub.modules.PublishItemModule.publishLastItem(PublishItemModule.java:403)
at tigase.pubsub.modules.PublishItemModule.onPresenceChangeEvent(PublishItemModule.java:710)
at sun.reflect.GeneratedMethodAccessor38.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at tigase.eventbus.impl.ReflectEventListenerHandler.dispatch(ReflectEventListenerHandler.java:46)
at tigase.eventbus.impl.EventBusImplementation.lambda$doFireThreadPerHandler$1(EventBusImplementation.java:306)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Andrzej Wójcik (Tigase) commented 6 years ago
I've fixed this NPE but added a log entry to catch when it happens as it should not be possible to happen.