[ 
https://issues.apache.org/jira/browse/STORM-2382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16363470#comment-16363470
 ] 

Jungtaek Lim commented on STORM-2382:
-------------------------------------

Lower the priority since it is specific to the case and answer is provided. I'm 
thinking about closing this if there's no further input here.

> log4j and slf4j conflicting libraries issue
> -------------------------------------------
>
>                 Key: STORM-2382
>                 URL: https://issues.apache.org/jira/browse/STORM-2382
>             Project: Apache Storm
>          Issue Type: Bug
>    Affects Versions: 1.0.1
>         Environment: centos 7.1, oracle jdk1.8
>            Reporter: Sree Vaddi
>            Priority: Minor
>
> my project storm 1.0.1 job's dependencies (log4j & slf4j) conflict with 
> apache&hdp storm 1.0.1 default libraries (STORM_HOME/lib) and is preventing 
> submitting new storm job.
> * 1. shadow my storm job jar *
> I get the following error:
> {code:language=java}
> SLF4J: Class path contains multiple SLF4J bindings.
> SLF4J: Found binding in 
> [jar:file:/usr/hdp/2.5.0.0-1245/storm/lib/log4j-slf4j-impl-2.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: Found binding in 
> [jar:file:/tmp/356865dafc1a11e69341ecb1d7ac1510.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an 
> explanation.
> SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
> Exception in thread "main" java.lang.IllegalAccessError: tried to access 
> method 
> org.apache.logging.log4j.core.lookup.MapLookup.newMap(I)Ljava/util/HashMap; 
> from class org.apache.logging.log4j.core.lookup.MainMapLookup
>       at 
> org.apache.logging.log4j.core.lookup.MainMapLookup.<clinit>(MainMapLookup.java:37)
>       at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>       at 
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
>       at 
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>       at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
>       at 
> org.apache.logging.log4j.core.util.ReflectionUtil.instantiate(ReflectionUtil.java:185)
>       at 
> org.apache.logging.log4j.core.lookup.Interpolator.<init>(Interpolator.java:65)
>       at 
> org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:346)
>       at 
> org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:161)
>       at 
> org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:359)
>       at 
> org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:420)
>       at 
> org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:138)
>       at 
> org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:147)
>       at 
> org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:41)
>       at org.apache.logging.log4j.LogManager.getContext(LogManager.java:175)
>       at 
> org.apache.logging.log4j.spi.AbstractLoggerAdapter.getContext(AbstractLoggerAdapter.java:102)
>       at 
> org.apache.logging.slf4j.Log4jLoggerFactory.getContext(Log4jLoggerFactory.java:43)
>       at 
> org.apache.logging.log4j.spi.AbstractLoggerAdapter.getLogger(AbstractLoggerAdapter.java:42)
>       at 
> org.apache.logging.slf4j.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:29)
>       at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:277)
>       at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:288)
>       at org.apache.storm.utils.LocalState.<clinit>(LocalState.java:45)
>       at java.lang.Class.forName0(Native Method)
>       at java.lang.Class.forName(Class.java:348)
>       at clojure.lang.RT.classForName(RT.java:2154)
>       at clojure.lang.RT.classForName(RT.java:2163)
>       at org.apache.storm.config__init.__init7(Unknown Source)
>       at org.apache.storm.config__init.<clinit>(Unknown Source)
>       at java.lang.Class.forName0(Native Method)
>       at java.lang.Class.forName(Class.java:348)
>       at clojure.lang.RT.classForName(RT.java:2154)
>       at clojure.lang.RT.classForName(RT.java:2163)
>       at clojure.lang.RT.loadClassForName(RT.java:2182)
>       at clojure.lang.RT.load(RT.java:436)
>       at clojure.lang.RT.load(RT.java:412)
>       at clojure.core$load$fn__5448.invoke(core.clj:5866)
>       at clojure.core$load.doInvoke(core.clj:5865)
>       at clojure.lang.RestFn.invoke(RestFn.java:408)
>       at clojure.core$load_one.invoke(core.clj:5671)
>       at clojure.core$load_lib$fn__5397.invoke(core.clj:5711)
>       at clojure.core$load_lib.doInvoke(core.clj:5710)
>       at clojure.lang.RestFn.applyTo(RestFn.java:142)
>       at clojure.core$apply.invoke(core.clj:632)
>       at clojure.core$load_libs.doInvoke(core.clj:5753)
>       at clojure.lang.RestFn.applyTo(RestFn.java:137)
>       at clojure.core$apply.invoke(core.clj:634)
>       at clojure.core$use.doInvoke(core.clj:5843)
>       at clojure.lang.RestFn.invoke(RestFn.java:408)
>       at 
> org.apache.storm.command.config_value$loading__5340__auto____12764.invoke(config_value.clj:16)
>       at org.apache.storm.command.config_value__init.load(Unknown Source)
>       at org.apache.storm.command.config_value__init.<clinit>(Unknown Source)
>       at java.lang.Class.forName0(Native Method)
>       at java.lang.Class.forName(Class.java:348)
>       at clojure.lang.RT.classForName(RT.java:2154)
>       at clojure.lang.RT.classForName(RT.java:2163)
>       at clojure.lang.RT.loadClassForName(RT.java:2182)
>       at clojure.lang.RT.load(RT.java:436)
>       at clojure.lang.RT.load(RT.java:412)
>       at clojure.core$load$fn__5448.invoke(core.clj:5866)
>       at clojure.core$load.doInvoke(core.clj:5865)
>       at clojure.lang.RestFn.invoke(RestFn.java:408)
>       at clojure.lang.Var.invoke(Var.java:379)
>       at org.apache.storm.command.config_value.<clinit>(Unknown Source)
> {code}
> * 2. upgrade STORM_HOME/lib *
> I get this warning.  looks like a racing condition (?)
> {code:language=java}
> log4j:WARN No appenders could be found for logger 
> (org.apache.storm.utils.Utils).
> log4j:WARN Please initialize the log4j system properly.
> log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more 
> info.
> log4j:WARN No appenders could be found for logger 
> (org.apache.storm.utils.Utils).
> log4j:WARN Please initialize the log4j system properly.
> log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more 
> info.
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to