# Codec json is not working in logstash 5.2.1

**URL:** <https://discuss.elastic.co/t/codec-json-is-not-working-in-logstash-5-2-1/80376>\
**Category:** Logstash\
**Created:** [March 28, 2017, 8:36pm UTC](https://discuss.elastic.co/t/codec-json-is-not-working-in-logstash-5-2-1/80376 "2017-03-28T20:36:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mdafrozhcl](https://avatars.discourse-cdn.com/v4/letter/m/71c47a/32.png) [@mdafrozhcl](https://discuss.elastic.co/u/mdafrozhcl)\
**Post date:** [March 28, 2017, 8:36pm UTC](https://discuss.elastic.co/t/codec-json-is-not-working-in-logstash-5-2-1/80376/1 "2017-03-28T20:36:43Z")

</div>

I have installed Logstash 5.2.1 and trying to do basic json output and input test. can you let me know if it is installation issue ? but rubydebug codec is working fine.

logstash -e 'input { stdin { } } output { stdout { codec =\> json } }'

output

```
The stdin plugin is now waiting for input:
16:15:54.998 [[main]-pipeline-manager] INFO logstash.pipeline - Starting pipeline {"id"=>"main", "pipeline.workers"=>8, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>5, "pipeline.max_inflight"=>1000}
16:15:55.015 [[main]-pipeline-manager] INFO logstash.pipeline - Pipeline main started
16:15:55.058 [Api Webserver] INFO logstash.agent - Successfully started Logstash API endpoint {:port=>9600}
HI
ClassLoader.java:-2:in `defineClass1': java.lang.VerifyError: class com.fasterxml.jackson.dataformat.cbor.CBORGenerator overrides final method copyCurrentEvent.(Lcom/fasterxml/jackson/core/JsonParser;)V
    from ClassLoader.java:760:in `defineClass'
    from SecureClassLoader.java:142:in `defineClass'
    from URLClassLoader.java:467:in `defineClass'
    from URLClassLoader.java:73:in `access$100'
    from URLClassLoader.java:368:in `run'
    from URLClassLoader.java:362:in `run'
    from AccessController.java:-2:in `doPrivileged'
    from URLClassLoader.java:361:in `findClass'
    from JRubyClassLoader.java:221:in `findClass'
    from ClassLoader.java:424:in `loadClass'
    from ClassLoader.java:357:in `loadClass'
    from ObjectMappers.java:10:in `<clinit>'
    from Event.java:234:in `toJson'
    from JrubyEventExtLibrary.java:240:in `ruby_to_json'
    from JrubyEventExtLibrary$RubyEvent$INVOKER$i$0$0$ruby_to_json.gen:-1:in `call'
    from JavaMethod.java:663:in `call'
    from DynamicMethod.java:198:in `call'
    from CachingCallSite.java:306:in `cacheAndCall'
    from CachingCallSite.java:136:in `call'
    from CallNoArgNode.java:60:in `interpret'
    from CallTwoArgNode.java:59:in `interpret'
    from NewlineNode.java:105:in `interpret'
    from ASTInterpreter.java:74:in `INTERPRET_METHOD'
    from InterpretedMethod.java:182:in `call'
    from DefaultMethod.java:203:in `call'
    from CachingCallSite.java:326:in `cacheAndCall'
    from CachingCallSite.java:170:in `call'
    from CallOneArgNode.java:57:in `interpret'
    from NewlineNode.java:105:in `interpret'
    from ASTInterpreter.java:112:in `INTERPRET_BLOCK'
    from Interpreted19Block.java:206:in `evalBlockBody'
    from Interpreted19Block.java:157:in `yield'
    from Block.java:142:in `yield'
    from RubyArray.java:1606:in `eachCommon'
    from RubyArray.java:1613:in `each'
    from RubyArray$INVOKER$i$0$0$each.gen:-1:in `call'
    from CachingCallSite.java:316:in `cacheAndCall'
    from CachingCallSite.java:145:in `callBlock'
    from CachingCallSite.java:154:in `callIter'
    from CallNoArgBlockNode.java:64:in `interpret'
    from NewlineNode.java:105:in `interpret'
    from BlockNode.java:71:in `interpret'
    from IfNode.java:118:in `interpret'
    from NewlineNode.java:105:in `interpret'
    from ASTInterpreter.java:74:in `INTERPRET_METHOD'
    from InterpretedMethod.java:182:in `call'
    from DefaultMethod.java:203:in `call'
    from CachingCallSite.java:326:in `cacheAndCall'
    from CachingCallSite.java:170:in `call'
    from CallOneArgNode.java:57:in `interpret'
    from CallOneArgNode.java:57:in `interpret'
    from NewlineNode.java:105:in `interpret'
    from IfNode.java:116:in `interpret'
    from NewlineNode.java:105:in `interpret'
    from ASTInterpreter.java:74:in `INTERPRET_METHOD'
    from InterpretedMethod.java:182:in `call'
    from DefaultMethod.java:203:in `call'
    from CachingCallSite.java:326:in `cacheAndCall'
    from CachingCallSite.java:170:in `call'
    from CallOneArgNode.java:57:in `interpret'
    from NewlineNode.java:105:in `interpret'
    from ASTInterpreter.java:112:in `INTERPRET_BLOCK'
    from Interpreted19Block.java:206:in `evalBlockBody'
    from Interpreted19Block.java:157:in `yield'
    from Block.java:142:in `yield'
    from Mutex.java:149:in `synchronize'
    from Mutex$INVOKER$i$0$0$synchronize.gen:-1:in `call'
    from CachingCallSite.java:316:in `cacheAndCall'
    from CachingCallSite.java:145:in `callBlock'
    from CachingCallSite.java:154:in `callIter'
    from CallNoArgBlockNode.java:64:in `interpret'
    from NewlineNode.java:105:in `interpret'
    from ASTInterpreter.java:74:in `INTERPRET_METHOD'
    from InterpretedMethod.java:182:in `call'
    from DefaultMethod.java:203:in `call'
    from CachingCallSite.java:326:in `cacheAndCall'
    from CachingCallSite.java:170:in `call'
    from CallOneArgNode.java:57:in `interpret'
    from NewlineNode.java:105:in `interpret'
    from BlockNode.java:71:in `interpret'
    from ASTInterpreter.java:74:in `INTERPRET_METHOD'
    from InterpretedMethod.java:182:in `call'
    from DefaultMethod.java:203:in `call'
    from CachingCallSite.java:326:in `cacheAndCall'
    from CachingCallSite.java:170:in `call'
    from /usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:336:in `block_3$RUBY$ __file__'
    from rubyjit$LogStash::Pipeline$$output_batch_0fff0c09973773b7280f6d663f2a362e1a27f8cc1028566121$block_3$RUBY$ __file__ :-1:in `call'
```

---

<div class="post-metadata">

**Author:** ![guyboertje](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/guyboertje/32/31592_2.png) [@guyboertje](https://discuss.elastic.co/u/guyboertje)\
**Post date:** [March 31, 2017, 4:39pm UTC](https://discuss.elastic.co/t/codec-json-is-not-working-in-logstash-5-2-1/80376/2 "2017-03-31T16:39:19Z")

</div>

I can't reproduce this with 5.2.1 or 5.2.2 or 5.3.0

Is there any chance you are using Java 7?

---

<div class="post-metadata">

**Author:** ![mdafrozhcl](https://avatars.discourse-cdn.com/v4/letter/m/71c47a/32.png) [@mdafrozhcl](https://discuss.elastic.co/u/mdafrozhcl)\
**Post date:** [April 4, 2017, 12:47pm UTC](https://discuss.elastic.co/t/codec-json-is-not-working-in-logstash-5-2-1/80376/3 "2017-04-04T12:47:12Z")

</div>

I was able to resolve it ... it was permission issues.

---

<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:** [May 2, 2017, 12:47pm UTC](https://discuss.elastic.co/t/codec-json-is-not-working-in-logstash-5-2-1/80376/4 "2017-05-02T12:47:11Z")

</div>

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