# Logstash 5.3.\* could not start due to Log4j

**URL:** <https://discuss.elastic.co/t/logstash-5-3-could-not-start-due-to-log4j/110502>\
**Category:** Logstash\
**Created:** [December 6, 2017, 11:01am UTC](https://discuss.elastic.co/t/logstash-5-3-could-not-start-due-to-log4j/110502 "2017-12-06T11:01:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![HelloUniverse](https://avatars.discourse-cdn.com/v4/letter/h/a3d4f5/32.png) [@HelloUniverse](https://discuss.elastic.co/u/HelloUniverse)\
**Post date:** [December 6, 2017, 11:01am UTC](https://discuss.elastic.co/t/logstash-5-3-could-not-start-due-to-log4j/110502/1 "2017-12-06T11:01:46Z")

</div>

Hi There,

JDK 1.8.66, Logstash 5.3.1

So far we encountered a weired problem. The error information is as the following:

> LoadError: load error: logstash/environment -- java.lang. **IllegalAccessError** : class org.apache.logging.log4j.core.layout. **YamlLayout** cannot access its superclass org.apache.logging.log4j.core.layout. **AbstractJacksonLayout**  
> require at org/jruby/RubyKernel.java:1040  
> (root) at /gfserver/mocagent-1.0/logstash/file2kafka/logstash-core/lib/logstash/runner.rb:11  
> require at org/jruby/RubyKernel.java:1040  
> (root) at /gfserver/mocagent-1.0/logstash/file2kafka/lib/bootstrap/environment.rb:70  
> LoadError: load error: logstash/environment -- java.lang.IllegalAccessError: class org.apache.logging.log4j.core.layout.YamlLayout cannot access its superclass org.apache.logging.log4j.core.layout.AbstractJacksonLayout  
> require at org/jruby/RubyKernel.java:1040  
> (root) at /gfserver/mocagent-1.0/logstash/file2kafka/logstash-core/lib/logstash/runner.rb:11  
> require at org/jruby/RubyKernel.java:1040  
> (root) at /gfserver/mocagent-1.0/logstash/file2kafka/lib/bootstrap/environment.rb:70

Regards

---

<div class="post-metadata">

**Author:** ![HelloUniverse](https://avatars.discourse-cdn.com/v4/letter/h/a3d4f5/32.png) [@HelloUniverse](https://discuss.elastic.co/u/HelloUniverse)\
**Post date:** [December 12, 2017, 5:54am UTC](https://discuss.elastic.co/t/logstash-5-3-could-not-start-due-to-log4j/110502/2 "2017-12-12T05:54:07Z")

</div>

It's proved that the classpath is poluted by accident.

---

<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:** [January 9, 2018, 5:54am UTC](https://discuss.elastic.co/t/logstash-5-3-could-not-start-due-to-log4j/110502/3 "2018-01-09T05:54:33Z")

</div>

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