Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-20878

Hive Runner for Unit tests with Hive JDBC standanlone jar issue with log4j slf4j

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.1.0, 3.1.1
    • None
    • Hive, JDBC
    • None
    • hive 3.1.1 and hive 3.1.0

      backend hadoop 2.9.1

      hive runner https://github.com/klarna/HiveRunner

    Description

      I have an standalone java application using the hive-jdbc-standalone.jar to create and drop databases, tables, indexes, views in a hive db via jdbc connection. I want to unit test the executed DDL operations via hive runner.

      The hive jdbc standalone jar brings a lot of dependencies (and shades them), but that causes issues with using application context where there is logging infrastructure configure and in place.

      java.lang.IncompatibleClassChangeError: Class org.apache.logging.slf4j.Log4jLoggerFactory does not implement the requested interface org.apache.hive.org.slf4j.ILoggerFactory
       at org.apache.hive.org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:285)

       

      How to properly setup dependencies or exclusions? Should't a library like hive-jdbc leave logging to the "surrounging" application context? Why the dependency to logging?

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              cons0l3 Carsten Steckel
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: