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

AlarmCallbacks with optional configuration fields cannot be loaded #1222

Closed
lennartkoopmann opened this Issue Jun 5, 2015 · 0 comments

Comments

Projects
None yet
1 participant
@lennartkoopmann
Member

lennartkoopmann commented Jun 5, 2015

It seems like AlarmCallbacks with configuration fields that are optional cannot be instantiated:

 2015-06-05T21:15:32.734Z WARN  [Configuration] Could not read input configuration key <icon_emoji>. Skipping.
 java.lang.NullPointerException
    at org.graylog2.plugin.configuration.Configuration.<init>(Configuration.java:94)
    at org.graylog2.alarmcallbacks.AlarmCallbackFactory.create(AlarmCallbackFactory.java:43)
    at org.graylog2.rest.resources.streams.alerts.StreamAlertReceiverResource.sendDummyAlert(StreamAlertReceiverResource.java:167)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)

I cannot confirm this at the moment (too far away from a setup where I could reproduce this) but it might be related to the changes made in 8966e3f and configuration keys that have values that are now null and before that just were not set at all.

This will most likely break any alarm callback plugin that has optional fields which are not set by the user.

@florianvolle We should think about how to integrate the plugin interfaces into our QA process. I think they are pretty left out at the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment