# No Implicit conversion of Nil

**URL:** https://discuss.elastic.co/t/no-implicit-conversion-of-nil/253594
**Category:** Logstash
**Created:** [October 28, 2020, 5:05pm UTC](https://discuss.elastic.co/t/no-implicit-conversion-of-nil/253594 "2020-10-28T17:05:53Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![elasticforme](https://avatars.discourse-cdn.com/v4/letter/e/f05b48/32.png) [@elasticforme](https://discuss.elastic.co/u/elasticforme)
#### Post date: [October 28, 2020, 5:05pm UTC](https://discuss.elastic.co/t/no-implicit-conversion-of-nil/253594/1 "2020-10-28T17:05:54Z")

</div>

I am getting following error. but do not where in code it is getting this error from.

```
[ERROR] 2020-10-28 11:41:31.825 [[main]>worker7] WorkerLoop - Exception in pipelineworker, the pipeline stopped processing new events, please check your filter configuration and restart Logstash.
org.jruby.exceptions.TypeError: (TypeError) no implicit conversion of nil into Integer
        at usr.share.logstash.logstash_minus_core.lib.logstash.java_pipeline.start_workers(/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:278) ~[?:?]
warning: thread "[main]>worker7" terminated with exception (report_on_exception is true):
java.lang.IllegalStateException: org.jruby.exceptions.TypeError: (TypeError) no implicit conversion of nil into Integer
        at org.logstash.execution.WorkerLoop.run(org/logstash/execution/WorkerLoop.java:105)
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(jdk/internal/reflect/NativeMethodAccessorImpl.java:62)
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(jdk/internal/reflect/DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:564)
        at org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(org/jruby/javasupport/JavaMethod.java:441)
        at org.jruby.javasupport.JavaMethod.invokeDirect(org/jruby/javasupport/JavaMethod.java:305)
        at usr.share.logstash.logstash_minus_core.lib.logstash.java_pipeline.start_workers(/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:278)
        at org.jruby.RubyProc.call(org/jruby/RubyProc.java:318)
        at java.lang.Thread.run(java/lang/Thread.java:832)
Caused by: org.jruby.exceptions.TypeError: (TypeError) no implicit conversion of nil into Integer
        at usr.share.logstash.logstash_minus_core.lib.logstash.java_pipeline.start_workers(/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:278)
[FATAL] 2020-10-28 11:41:31.990 [LogStash::Runner] runner - An unexpected error occurred! {:error=>java.lang.IllegalStateException: org.jruby.exceptions.TypeError: (TypeError) no implicit conversion of nil into Integer, :backtrace=>["org.logstash.execution.WorkerLoop.run(org/logstash/execution/WorkerLoop.java:105)", "jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)", "jdk.internal.reflect.NativeMethodAccessorImpl.invoke(jdk/internal/reflect/NativeMethodAccessorImpl.java:62)", "jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(jdk/internal/reflect/DelegatingMethodAccessorImpl.java:43)", "java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:564)", "org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(org/jruby/javasupport/JavaMethod.java:441)", "org.jruby.javasupport.JavaMethod.invokeDirect(org/jruby/javasupport/JavaMethod.java:305)", "usr.share.logstash.logstash_minus_core.lib.logstash.java_pipeline.start_workers(/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:278)", "org.jruby.RubyProc.call(org/jruby/RubyProc.java:318)", "java.lang.Thread.run(java/lang/Thread.java:832)"]}
[ERROR] 2020-10-28 11:41:32.009 [LogStash::Runner] Logstash - java.lang.IllegalStateException: Logstash stopped processing because of an error: (SystemExit) exit
```

---

<div class="post-metadata">

### Author: ![elasticforme](https://avatars.discourse-cdn.com/v4/letter/e/f05b48/32.png) [@elasticforme](https://discuss.elastic.co/u/elasticforme)
#### Post date: [October 28, 2020, 7:54pm UTC](https://discuss.elastic.co/t/no-implicit-conversion-of-nil/253594/2 "2020-10-28T19:54:16Z")

</div>

Alright fixed. figure.

It was logic problem. I was defining new field

for example  
orginal\_number = 12

then along the code I was creating  
mutate { add\_field =\> { "new\_original\_number" =\> "%{original\_number}" } }

and it was now string as "12" and then after few code I was using that new\_original\_number as some calculation.

man o man. took almost whole day to figure out what is going on.. I thought integer value going in new field will be automatically integer. LOL

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [November 25, 2020, 7:54pm UTC](https://discuss.elastic.co/t/no-implicit-conversion-of-nil/253594/3 "2020-11-25T19:54:41Z")

</div>

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