Hello.
This is Min from Data-Mining Lab, Seoul National University, Korea.
Our laboratory tried to use Hive with JDBC for construct Hadoop platform.
We could use hive on console(prompt), however, it didn't working at server.
*Error Logs*
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
hduser@cluster00:~$ hive --service hiveserver
Starting Hive Thrift Server
WARNING: org.apache.hadoop.metrics.jvm.EventCounter is deprecated. Please
use org.apache.hadoop.log.metrics.EventCounter in all the log4j.properties
files.
Exception in thread "main" java.lang.IllegalAccessError: tried to access
field org.slf4j.impl.StaticLoggerBinder.SINGLETON from class
org.slf4j.LoggerFactory
at org.slf4j.LoggerFactory.<clinit>(LoggerFactory.java:60)
at
org.apache.thrift.transport.TServerSocket.<clinit>(TServerSocket.java:37)
at
org.apache.hadoop.hive.service.HiveServer.main(HiveServer.java:659)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
*To figure it out this problem, I refer to slf4j site(
http://www.slf4j.org/faq.html<http://www.google.com/url?q=http%3A%2F%2Fwww.slf4j.org%2Ffaq.html&sa=D&sntz=1&usg=AFrqEzdc6xhlD8O63A72nVopk2LkAOsRfg>
).*
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
Here are the exception details.
Exception in thread "main" java.lang.IllegalAccessError: tried to access
field
org.slf4j.impl.StaticLoggerBinder.SINGLETON from class
org.slf4j.LoggerFactory
at org.slf4j.LoggerFactory.<clinit>(LoggerFactory.java:60)
This error is caused by the static initilizer of the LoggerFactory class
attempting to directly access the SINGLETON field of
org.slf4j.impl.StaticLoggerBinder. While this was allowed in SLF4J 1.5.5
and earlier, in 1.5.6 and later the SINGLETON field has been marked as
private access.
If you get the exception shown above, then you are using an older version
of slf4j-api, e.g. 1.4.3, with a new version of a slf4j binding, e.g.
1.5.6. Typically, this occurs when your Maven pom.ml file incoprporates
hibernate 3.3.0 which declares a dependency on slf4j-api version 1.4.2. If
your pom.xml declares a dependency on an slf4j binding, say slf4j-log4j12
version 1.5.6, then you will get illegal access errors.
To see which version of slf4j-api is pulled in by Maven, use the maven
dependency plugin as follows.
mvn dependency:tree
If you are usig Eclipse, please do not rely on the dependency tree shown by
m2eclipse.
In your pom.xml file, excplicitly declaring a dependecy on slf4j-api
matching the version of the declared binding will make the problem go away.
Please also read the FAQ entry on backward compatibility for a more general
explanation.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
*And we did like below but it didn't make solution.*
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
slf4j-api-1.6.1.jar, slf4j-log4j12-1.6.1.jar : Change to Version 1.4.2 -
Not Change
slf4j-api-1.6.1.jar, slf4j-log4j12-1.6.1.jar, log4j-1.2.15.jar,
log4j-1.2.16.jar : Delete - Not Change
------------------------------------------------------------
------------------------------------------------------------
--------------------------------------------
I hope your thankful respond.
Thanks for your concern.
*
*
*V/R*
*------------------------------------------------------------*
*Hunkee Min │ **민헌기(閔憲基)*
Data Mining Laboratory
Department of Industrial Engineering
Seoul National University
(O) +82 2 880 7025 / (H) +82 10 3772 2102
*"Difference is NOT Wrong"*