Unable to start Hive metastore related to java exception

127
January 27, 2021, at 4:30 PM

I installed Apache hive 3, Apache Hadoop 3, Trino and Mysql (mysql Ver 14.14 Distrib 5.7.20, for Linux (x86_64) using EditLine wrapper).

When I start Hive metastore I had an exception, it blocked the start of the metastore:

Exception:

Exception in thread "main" java.lang.NoSuchMethodError: com/google/common/base/Preconditions.checkArgument(ZLjava/lang/String;Ljava/lang/Object;)V (loaded from file:/root/trino_poc/trino-server-351/etc/catalog/apache-hive-3.1.2-bin/lib/guava-19.0.jar by jdk.internal.loader.ClassLoaders$AppClassLoader@8753f89b) called from class org.apache.hadoop.conf.Configuration (loaded from file:/root/trino_poc/hadoop-3.2.2/share/hadoop/common/hadoop-common-3.2.2.jar by jdk.internal.loader.ClassLoaders$AppClassLoader@8753f89b). 
 at org.apache.hadoop.conf.Configuration.set(Configuration.java:1357) 

My solution was (I found it on github) to replace the guava-19.0.jar by guava-22.0.jar

So the metastore started well on localhost:9083

But the port is not in listen: netstat -na | grep :9083 ==> nothing

in hive log I have this error:

   Unable to open a test connection to the given database. JDBC url = jdbc:mysql://localhost:3306/metastore_dbs?useSSL=false;createDatabaseIfNotExist=true, username = root. Terminating connection pool (set lazyInit to true if you expect to start your database after your app). Original Exception: ------^M 
java.sql.SQLException: The connection property 'useSSL' only accepts values of the form: 'true', 'false', 'yes' or 'no'. The value 'false;createDatabaseIfNotExist=true' is not in this set

So the issue is here: 'false;createDatabaseIfNotExist=true' the ';' is not supported in xml file because this code is exist in hive-site.xml and I need to properly escape the characters.

I used '?' instead, Hivemetastore started but port 9083 is not listen, and I got almost the same exception'false?createDatabaseIfNotExist=true'

I used '&' ==> Hive metastore is not started (failed) and I got this exception:

WARNING: An illegal reflective access operation has occurred 
WARNING: Illegal reflective access by com.google.common.base.internal.Finalizer (file:/root/trino_poc/trino-server-351/etc/catalog/apache-hive-3.1.2-bin/lib/guava-22.0.jar) to field java.lang.Thread.inheritableThreadLocals 
WARNING: Please consider reporting this to the maintainers of com.google.common.base.internal.Finalizer 
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations 
WARNING: All illegal access operations will be denied in a future release 
MetaException(message:org.jets3t.service.security.ProviderCredentials) 

If I resume:

To resolve exception to initialize Database and start hive metastore I replace the guava-19.0.jar by guava-22.0.jar but port 9083 is not listen.

Then to resolve the issue of port listening:

  • I Used '?' instead of ';' ==> hive metastore still started well but port 9083 in not listen.

  • I tried using '&' instead of '?' ==> Hive metastore not started (failed) and I got the exception above related to guava-22.0.jar

I hope that I was clear. Really I need to your help, because I spent a lot of hours trying to resolve the issue. Thanks in advance

READ ALSO
Select content from “div class” which contains certain words

Select content from “div class” which contains certain words

I have the following ajax-response which is generated by a server sided script:

110
I'm not able to pass the state value to the method or function in React [closed]

I'm not able to pass the state value to the method or function in React [closed]

Want to improve this question? Add details and clarify the problem by editing this post

137
How to access array index of Cloud Firestore using query in Flutter?

How to access array index of Cloud Firestore using query in Flutter?

I have field users in document and this field contains two element in arrayI have to check specific two values are in this array

162
Getting an unwanted space between Nav Items in Navbar Angular

Getting an unwanted space between Nav Items in Navbar Angular

I am trying to create a sidenav bar with nav items in it which has sub menusI am able to create it but i am getting space between 2 navitems which have submenus

52