Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-28684 Hive module support JDK 11
  3. SPARK-29015

Can't use 'add jar' jar's class as create table serde class on JDK 11

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0.0
    • 3.0.0
    • SQL
    • None

    Description

      How to reproduce:

      export JAVA_HOME=/usr/lib/jdk-11.0.3
      export PATH=$JAVA_HOME/bin:$PATH
      
      build/sbt clean package -Phive -Phadoop-3.2 -Phive-thriftserver
      export SPARK_PREPEND_CLASSES=true
      sbin/start-thriftserver.sh
      bin/beeline -u jdbc:hive2://localhost:10000
      
      0: jdbc:hive2://localhost:10000> add jar /root/.m2/repository/org/apache/hive/hcatalog/hive-hcatalog-core/2.3.6/hive-hcatalog-core-2.3.6.jar;
      INFO  : Added [/root/.m2/repository/org/apache/hive/hcatalog/hive-hcatalog-core/2.3.6/hive-hcatalog-core-2.3.6.jar] to class path
      INFO  : Added resources: [/root/.m2/repository/org/apache/hive/hcatalog/hive-hcatalog-core/2.3.6/hive-hcatalog-core-2.3.6.jar]
      +---------+
      | result  |
      +---------+
      +---------+
      No rows selected (0.381 seconds)
      0: jdbc:hive2://localhost:10000> CREATE TABLE addJar(key string) ROW FORMAT SERDE 'org.apache.hive.hcatalog.data.JsonSerDe';
      +---------+
      | Result  |
      +---------+
      +---------+
      No rows selected (0.613 seconds)
      0: jdbc:hive2://localhost:10000> select * from addJar;
      Error: Error running query: java.lang.RuntimeException: java.lang.ClassNotFoundException: org.apache.hive.hcatalog.data.JsonSerDe (state=,code=0)
      

      Attachments

        Issue Links

          Activity

            People

              angerszhuuu angerszhu
              yumwang Yuming Wang
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: