'Can't start Hive
I have installed Hive and run the command
schematool -dbType derby -initSchema
for initializing the database. But showing the following error.
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/ubundu/Downloads/Hadoop/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/ubundu/hive/lib/log4j-slf4j-impl-2.10.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
2022-04-14 13:56:15,607 INFO conf.HiveConf (HiveConf.java:findConfigFile(187)) - Found configuration file file:/home/ubundu/hive/conf/hive-site.xml
2022-04-14 13:56:16,063 ERROR shims.ShimLoader (ShimLoader.java:getHadoopShims(88)) - Error loading shims
java.lang.NumberFormatException: For input string: "${declared"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:569)
at java.lang.Integer.parseInt(Integer.java:615)
at org.apache.hadoop.hive.shims.ShimLoader.getMajorVersion(ShimLoader.java:141)
at org.apache.hadoop.hive.shims.ShimLoader.loadShims(ShimLoader.java:112)
at org.apache.hadoop.hive.shims.ShimLoader.getHadoopShims(ShimLoader.java:86)
at org.apache.hive.beeline.HiveSchemaTool.main(HiveSchemaTool.java:1485)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.hadoop.util.RunJar.run(RunJar.java:323)
at org.apache.hadoop.util.RunJar.main(RunJar.java:236)
Exception in thread "main" java.lang.RuntimeException: java.lang.NumberFormatException: For input string: "${declared"
at org.apache.hadoop.hive.shims.ShimLoader.getHadoopShims(ShimLoader.java:89)
at org.apache.hive.beeline.HiveSchemaTool.main(HiveSchemaTool.java:1485)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.hadoop.util.RunJar.run(RunJar.java:323)
at org.apache.hadoop.util.RunJar.main(RunJar.java:236)
Caused by: java.lang.NumberFormatException: For input string: "${declared"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:569)
at java.lang.Integer.parseInt(Integer.java:615)
at org.apache.hadoop.hive.shims.ShimLoader.getMajorVersion(ShimLoader.java:141)
at org.apache.hadoop.hive.shims.ShimLoader.loadShims(ShimLoader.java:112)
at org.apache.hadoop.hive.shims.ShimLoader.getHadoopShims(ShimLoader.java:86)
... 7 more
Solution 1:[1]
The error is internal to the schemaTool command.
I'd recommend using a different version of Hive to start, and using a database other than the default Derby database such as MySQL/MariaDB or Postgres.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | OneCricketeer |
