[
https://issues.apache.org/jira/browse/HIVE-13015?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15151754#comment-15151754
]
Gopal V commented on HIVE-13015:
--------------------------------
I thought so too, but transitive dependencies are pulled for compile, but not
for shading - wasn't getting them in the hive-exec shader.
Was getting
{code}
Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/logging/log4j/spi/LoggerAdapter
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
at java.lang.Class.getConstructor0(Class.java:3075)
at java.lang.Class.newInstance(Class.java:412)
at
org.apache.commons.logging.LogFactory.createFactory(LogFactory.java:1090)
at org.apache.commons.logging.LogFactory$2.run(LogFactory.java:1003)
at java.security.AccessController.doPrivileged(Native Method)
at
org.apache.commons.logging.LogFactory.newFactory(LogFactory.java:1000)
at org.apache.commons.logging.LogFactory.getFactory(LogFactory.java:554)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:657)
at
org.apache.hadoop.service.AbstractService.<clinit>(AbstractService.java:43)
Caused by: java.lang.ClassNotFoundException:
org.apache.logging.log4j.spi.LoggerAdapter
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 11 more
{code}
> Bundle Log4j2 jars with hive-exec
> ---------------------------------
>
> Key: HIVE-13015
> URL: https://issues.apache.org/jira/browse/HIVE-13015
> Project: Hive
> Issue Type: Bug
> Affects Versions: 2.1.0
> Reporter: Prasanth Jayachandran
> Assignee: Gopal V
> Attachments: HIVE-13015.1.patch, HIVE-13015.1.patch,
> HIVE-13015.2.patch, HIVE-13015.3.patch
>
>
> In some of the recent test runs, we are seeing multiple bindings for SLF4j
> that causes issues with LOG4j2 logger.
> {code}
> SLF4J: Found binding in
> [jar:file:/grid/0/hadoop/yarn/local/usercache/hrt_qa/appcache/application_1454694331819_0001/container_e06_1454694331819_0001_01_000002/app/install/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> {code}
> We have added explicit exclusions for slf4j-log4j12 but some library is
> pulling it transitively and it's getting packaged with hive libs. Also hive
> currently uses version 1.7.5 for slf4j. We should add dependency convergence
> for sl4fj and also remove packaging of slf4j-log4j12.*.jar
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)