logstash/log4j-jsonevent-layout

Layout not assignable

cdgraff opened this issue · 2 comments

Hi Guys,

I'm trying to use this jar, and when start the instance get this error:

log4j:ERROR A "net.logstash.log4j.JSONEventLayout" object is not assignable to a "org.apache.log4j.Layout" variable.
log4j:ERROR The class "org.apache.log4j.Layout" was loaded by
log4j:ERROR [WebappClassLoader
context:
delegate: false
repositories:
/WEB-INF/classes/
----------> Parent Classloader:
org.apache.catalina.loader.StandardClassLoader@2107ebe1
] whereas object of type
log4j:ERROR "net.logstash.log4j.JSONEventLayout" was loaded by [org.apache.catalina.loader.StandardClassLoader@2107ebe1].

I'm using the latest Git version, some advice?

Thanks

Fixed, the same log4j library into the webapp and the tomcat lib, removed from webapp the error was fixed

I think this is an actual issue. I can't get the logger to function unless all log4j jar files are removed from the class path entirely. Only the jsonevent layout jar must exist on the class path.