hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Prasanth Jayachandran (JIRA)" <>
Subject [jira] [Updated] (HIVE-11572) Datanucleus loads Log4j1.x Logger from its ClassLoader
Date Sat, 15 Aug 2015 04:35:45 GMT


Prasanth Jayachandran updated HIVE-11572:
    Attachment: HIVE-11572.patch

To make sure log4j-1.2.x.jar is not present in the classpath we have to do the following
1) remove log4j-1.2.x.jar pulled transitively by Zookeeper by excluding it from bin packaging
(maven dist profile)
2) hive launch script has to be modified to append hive jars first to the classpath. This
will make sure log4j-1.2-api.jar (bridge api) will be first in the classpath before HADOOP_CLASSPATH.
3) Before launching the hive cli user has to export HADOOP_USER_CLASSPATH_FIRST="true" to
make sure hadoop does not load log4j-1.2.x.jar before the bridge-api jar.

> Datanucleus loads Log4j1.x Logger from its ClassLoader
> ------------------------------------------------------
>                 Key: HIVE-11572
>                 URL:
>             Project: Hive
>          Issue Type: Sub-task
>          Components: Logging
>    Affects Versions: 2.0.0
>            Reporter: Prasanth Jayachandran
>            Assignee: Prasanth Jayachandran
>             Fix For: 2.0.0
>         Attachments: HIVE-11572.patch
> As part of HIVE-11304, we moved from Log4j1.x to Log4j2. But DataNucleus log messages
gets logged to console when launching the hive cli. The reason is DataNucleus is trying to
load Log4j1.x Logger by traversing its class loader. Although we use log4j-1.2-api bridge
we are loading log4j-1.2.16 jar that was pulled by ZooKeeper. We should make sure that there
is no log4j-1.2.16 in datanucleus classloader hierarchy (classpath). 
> DataNucleus logger has this 
> {code}
> NucleusLogger.class.getClassLoader().loadClass("org.apache.log4j.Logger");
>             loggerClass = org.datanucleus.util.Log4JLogger.class;
> {code}

This message was sent by Atlassian JIRA

View raw message