Using a boolean setting in Java plugin crashes logstash

I am building my own java filter plugin for logstash and trying to make use of the booleanSetting available in PluginConfigSpec, but when I attempt to use it in a logstash instance it throws a IllegalStateException I've checked my code and configuration files and I cannot seem to locate the issue, I believe it may be a bug within logstash.

Here is my code (shortened)

Extractor.java

public static final PluginConfigSpec<String> SOURCE_CONFIG = 
PluginConfigSpec.stringSetting("source", "message");

public static final PluginConfigSpec<Boolean> SECONDARY_ENABLE_CONFIG = 
PluginConfigSpec.booleanSetting("secondary_enable", false);

private String source;
private Boolean secondaryEnabled;

public Extractor(String id, Configuration config, Context cxt){
   //relavant lines shown
   this.secondaryEnabled = config.get(SECONDARY_ENABLE_CONFIG);
   this.source = config.get(SOURCE_CONFIG);
}

@Override
public Collection<PluginConfigSpec<?>> configSchema(){
  List<PluginConfigSpec<?>> settings = new ArrayList<>();
  settings.add(SECONDARY_ENABLE_CONFIG);
  settings.add(SOURCE_CONFIG);

}

secondary_test.conf

input{
  generator{
              message => "Test"
              count => 1
  }
}

filter{
   my_filter{
      secondary_enable => true
   }
}

output{
   stdout{
     codec => rubydebug
   }
}

If i comment out the boolean settings in the configuration file it will function like normal again.

Log output

Sending Logstash logs to /licensed/elk/logstash/logs which is now configured via log4j2.properties
[2019-07-05T13:22:04,763][WARN ][logstash.runner          ] --config.debug was specified, but log.level was not set to 'debug'! No config info will be logged.

[2019-07-05T13:22:05,199][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2019-07-05T13:22:05,209][INFO ][logstash.runner          ] Starting Logstash {"logstash.version"=>"7.1.0"}
[2019-07-05T13:22:10,449][ERROR][logstash.agent           ] Failed to execute action {
:action=>LogStash::PipelineAction::Create/pipeline_id:main, 
:exception=>"Java::JavaLang::IllegalStateException", 
:message=>"java.lang.reflect.InvocationTargetException", 
:backtrace=>["org.logstash.plugins.PluginFactoryExt$Plugins.plugin(PluginFactoryExt.java:292)", 
	     "org.logstash.plugins.PluginFactoryExt$Plugins.buildFilter(PluginFactoryExt.java:157)", 
	     "org.logstash.config.ir.CompiledPipeline.setupFilters(CompiledPipeline.java:133)", 
             "org.logstash.config.ir.CompiledPipeline.<init>(CompiledPipeline.java:81)", 
             "org.logstash.execution.JavaBasePipelineExt.initialize(JavaBasePipelineExt.java:50)", 
             "org.logstash.execution.JavaBasePipelineExt$INVOKER$i$1$0$initialize.call(JavaBasePipelineExt$INVOKER$i$1$0$initialize.gen)", 
             "org.jruby.internal.runtime.methods.JavaMethod$JavaMethodN.call(JavaMethod.java:837)", 
             "org.jruby.ir.runtime.IRRuntimeHelpers.instanceSuper(IRRuntimeHelpers.java:1154)", 
             "org.jruby.ir.runtime.IRRuntimeHelpers.instanceSuperSplatArgs(IRRuntimeHelpers.java:1141)", 
             "org.jruby.ir.targets.InstanceSuperInvokeSite.invoke(InstanceSuperInvokeSite.java:39)", 
             "licensed.elk.logstash_minus_7_dot_1_dot_0.logstash_minus_core.lib.logstash.java_pipeline.RUBY$method$initialize$0(/licensed/elk/logstash-7.1.0/logstash-core/lib/logstash/java_pipeline.rb:23)", 
             "org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:91)", 
             "org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:90)", 
             "org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:296)", 
             "org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:82)", 
             "org.jruby.RubyClass.newInstance(RubyClass.java:915)", 
             "org.jruby.RubyClass$INVOKER$i$newInstance.call(RubyClass$INVOKER$i$newInstance.gen)", 
             "org.jruby.ir.targets.InvokeSite.invoke(InvokeSite.java:183)", 
             "licensed.elk.logstash_minus_7_dot_1_dot_0.logstash_minus_core.lib.logstash.pipeline_action.create.RUBY$method$execute$0(/licensed/elk/logstash-7.1.0/logstash-core/lib/logstash/pipeline_action/create.rb:36)", 
             "licensed.elk.logstash_minus_7_dot_1_dot_0.logstash_minus_core.lib.logstash.pipeline_action.create.RUBY$method$execute$0$__VARARGS__(/licensed/elk/logstash-7.1.0/logstash-core/lib/logstash/pipeline_action/create.rb)", 
             "org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:91)", 
             "org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:90)", 
             "org.jruby.ir.targets.InvokeSite.invoke(InvokeSite.java:183)", 
             "licensed.elk.logstash_minus_7_dot_1_dot_0.logstash_minus_core.lib.logstash.agent.RUBY$block$converge_state$2(/licensed/elk/logstash-7.1.0/logstash-core/lib/logstash/agent.rb:325)", 
             "org.jruby.runtime.CompiledIRBlockBody.callDirect(CompiledIRBlockBody.java:136)", 
             "org.jruby.runtime.IRBlockBody.call(IRBlockBody.java:77)",
             "org.jruby.runtime.Block.call(Block.java:124)", 
             "org.jruby.RubyProc.call(RubyProc.java:295)", 
             "org.jruby.RubyProc.call(RubyProc.java:274)", 
             "org.jruby.RubyProc.call(RubyProc.java:270)", 
             "org.jruby.internal.runtime.RubyRunnable.run(RubyRunnable.java:105)", 
             "java.lang.Thread.run(Thread.java:748)"]}
warning: thread "Converge PipelineAction::Create<main>" terminated with exception (report_on_exception is true):
LogStash::Error: Don't know how to handle `Java::JavaLang::IllegalStateException` for `PipelineAction::Create<main>`
          create at org/logstash/execution/ConvergeResultExt.java:109
             add at org/logstash/execution/ConvergeResultExt.java:37
  converge_state at /licensed/elk/logstash-7.1.0/logstash-core/lib/logstash/agent.rb:338
[2019-07-05T13:22:10,460][ERROR][logstash.agent           ] An exception happened when converging configuration {
:exception=>LogStash::Error, 
:message=>"Don't know how to handle `Java::JavaLang::IllegalStateException` for `PipelineAction::Create<main>`", 
:backtrace=>["org/logstash/execution/ConvergeResultExt.java:109:in `create'", 
             "org/logstash/execution/ConvergeResultExt.java:37:in `add'", 
             "/licensed/elk/logstash-7.1.0/logstash-core/lib/logstash/agent.rb:338:in `block in converge_state'"]
}
[2019-07-05T13:22:10,501][FATAL][logstash.runner          ] An unexpected error occurred! {
:error=>#<LogStash::Error: Don't know how to handle `Java::JavaLang::IllegalStateException` for `PipelineAction::Create<main>`>, 
:backtrace=>["org/logstash/execution/ConvergeResultExt.java:109:in `create'", 
             "org/logstash/execution/ConvergeResultExt.java:37:in `add'", 
             "/licensed/elk/logstash-7.1.0/logstash-core/lib/logstash/agent.rb:338:in `block in converge_state'"]}
[2019-07-05T13:22:10,673][ERROR][org.logstash.Logstash    ] java.lang.IllegalStateException: Logstash stopped processing beause of an error: (SystemExit) exit

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.