timveil / hive-jdbc-uber-jar Goto Github PK
View Code? Open in Web Editor NEWHive JDBC "uber" or "standalone" jar based on the latest Apache Hive version
Hive JDBC "uber" or "standalone" jar based on the latest Apache Hive version
recommended additional jars to support kerberos secure mode:
Hi,
I am trying to connect to Hive from dbeaver using library -
The database has zookeeper discovery enabled.
But the connection fails with below error:
org.apache.hive.jdbc.ZooKeeperHiveClientException: Unable to read HiveServer2 configs from ZooKeeper
Unable to read HiveServer2 configs from ZooKeeper
Unable to read HiveServer2 configs from ZooKeeper
A HostProvider may not be empty!
The hostname looks like this -
zookeeperhost1:2181,zookeeperhost12:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2
I am able to connect to the same host using beeline.
Can you please let me know if I am missing something?
Thanks!
trying to update hive-jdbc-uber-jar in DbVisualizer 10 throws following exception on connection:
An error occurred while establishing the connection:
Details:
Type: java.lang.reflect.UndeclaredThrowableExceptionStack Trace:
java.lang.IllegalStateException: org.slf4j.LoggerFactory in failed state. Original exception was thrown EARLIER. See also http://www.slf4j.org/codes.html#unsuccessfulInit
at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:422)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:357)
at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:155)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:290)
at org.apache.hive.jdbc.HiveConnection.(HiveConnection.java:111)
[wrapped] java.lang.ExceptionInInitializerError
at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:105)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.onseven.dbvis.g.B.D.ā(Z:1548)
at com.onseven.dbvis.g.B.F$A.call(Z:1369)
[wrapped] java.lang.Exception: java.lang.ExceptionInInitializerError
at com.onseven.dbvis.g.B.F$A.call(Z:2374)
at java.util.concurrent.FutureTask.run(Unknown Source)
[wrapped] java.lang.reflect.UndeclaredThrowableException
at com.sun.proxy.$Proxy0.connect(Unknown Source)
at com.onseven.dbvis.db.I.H.Ŋ(Z:2070)
at com.onseven.dbvis.db.I.H.Ĵ(Z:1692)
at com.onseven.dbvis.db.I.K.Ĵ(Z:3063)
at com.onseven.dbvis.db.I.D.ĥ(Z:1756)
at com.onseven.dbvis.K.C.W.ğ(Z:503)
at com.onseven.dbvis.K.C.J.Ă(Z:1374)
at com.onseven.dbvis.K.C.J.doInBackground(Z:1521)
at javax.swing.SwingWorker$1.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at javax.swing.SwingWorker.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
used version: hive-jdbc-uber-2.6.2.0-205.jar
using the earlier version hive-jdbc-uber-2.6.1.0-129.jar works just fine
Hey Tim,
I want to make sure Log4J, if included here, is not in versions mentioned in CVE-2021-44228 but have had trouble tracking down dependencies in the final jar. I saw in a previous Issue that you removed log4j, but in the readme it seems to suggest log4j is included. Could you comment?
支持HIVE 1.10 是哪个版本呢?最新版无法支持
Tim - first, many thank yous for your initiative. I'm sure this is relieving a lot of pain for a lot of people - i.e., fixing Hadoop version problem, packaging all these into a file, etc.
I believe I have tried all JDBC drivers under the sky - Simba, Impala, jars from my Hadoop cluster - and now yours. All gives me an error that is similar in nature.
Background
However, I dream of using a modern GUI SQL tool on Windows to do some of my work. Currently I'm using DBVisualizer.
I have followed your instructions - setting the JVM properties, adding your jar - but end up with the following error when I connect
Database URL=jdbc:hive2://myserver.mydomain.com:10000/default;principal=hive/[email protected]
Long Message:
Could not open client transport with JDBC Uri: : GSS initiate failed
Details:
Type: java.sql.SQLException
SQL State: 08S01
Many thanks in advance,
Alex
I got this following error when using version 2.6.2.0-205 in DataGrip.
java.lang.ClassNotFoundException: org.apache.log4j.Level
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150)
at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124)
at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:412)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:357)
at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:155)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:290)
at org.apache.hive.jdbc.HiveConnection.<clinit>(HiveConnection.java:111)
at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:105)
at com.intellij.database.remote.jdbc.impl.RemoteDriverImpl.connect(RemoteDriverImpl.java:27)
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 sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:346)
at sun.rmi.transport.Transport$1.run(Transport.java:200)
at sun.rmi.transport.Transport$1.run(Transport.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745) (no stack trace).
java.lang.NoClassDefFoundError: org/apache/log4j/Level
When i try to use 2.6.1.0-129, test connection was successful but it said "method not supported" maybe because i'm using HDP 2.6.2.0-205
how can Knox be used in a kerberised setup with i.e. DataGrip to connect Hive JDBC?
recommended additional jars include:
You have updated the read me to say that 3.1.2 is now supported as of 7/05/20 but there is no binary for it.
Hello,
Is it possible to connect to Kerberized Hive using Uber JDBC and DataGrip via SSH? I'm assuming I'd need to put ssh login/pwd into template, but what are the identifiers for ssh information?
Thanks in advance!
How can I connect with HiVe that is secured with Kerberos and SASL?
For beeline I use following string connection:
beeline -u "jdbc:hive2://ServerName:10000/default;principal=hive/ServerName@REALM;saslQop=auth-conf"
Thanks,
Andrzej
Trying to use this jar with Apache Zeppelin, I got the error:
java.lang.IllegalStateException: Detected both log4j-over-slf4j.jar AND slf4j-log4j12.jar on the class path, preempting StackOverflowError.
Is log4j included in your uber jar?
Does not seem to include all dependencies:
java.lang.NoClassDefFoundError: org/apache/commons/codec/binary/Base64
at org.apache.http.impl.auth.BasicScheme.authenticate(BasicScheme.java:168)
at org.apache.hive.jdbc.HttpBasicAuthInterceptor.addHttpAuthHeader(HttpBasicAuthInterceptor.java:52)
at org.apache.hive.jdbc.HttpRequestInterceptorBase.process(HttpRequestInterceptorBase.java:74)
at org.apache.http.protocol.ImmutableHttpProcessor.process(ImmutableHttpProcessor.java:132)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:182)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
at org.apache.http.impl.execchain.ServiceUnavailableRetryExec.execute(ServiceUnavailableRetryExec.java:84)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:117)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55)
at org.apache.thrift.transport.THttpClient.flushUsingHttpClient(THttpClient.java:251)
at org.apache.thrift.transport.THttpClient.flush(THttpClient.java:313)
at org.apache.thrift.TServiceClient.sendBase(TServiceClient.java:73)
at org.apache.thrift.TServiceClient.sendBase(TServiceClient.java:62)
at org.apache.hive.service.cli.thrift.TCLIService$Client.send_OpenSession(TCLIService.java:154)
at org.apache.hive.service.cli.thrift.TCLIService$Client.OpenSession(TCLIService.java:146)
at org.apache.hive.jdbc.HiveConnection.openSession(HiveConnection.java:552)
at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:170)
at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:105)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:208)
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:497)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.codec.binary.Base64
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 26 more
Hey ,
Wanted to check with you , for the compatibility of creating this process for hive LLAP . Does the Jar produced here work with Hive LLAP as well ???
Hey,
I'm from https://github.com/dbeaver/dbeaver/ team.
We are using hive uber jar for some time (thanks for it!) and it actually rocks (https://github.com/dbeaver/dbeaver/wiki/Apache-Hive). For UI client it is a life saver. DBeaver supports downloading of Maven artifacts (and most of publicly available drivers are downloaded directly from Maven Central) but for standard Hive driver it takes like forever to download these hundreds of jars.
For now I've hardcoded direct http link on one of the latest uber-jar releases on GitHub. This works but it is not very cool as users can't choose the most recent or some older version.
While for Maven artifacts DBeaver shows all available versions and allows user to choose one.
How do you think - is it possible to put uber-jar in a public Maven repository?
Also I noticed that you are making your own Hive driver - looks very interesting. I could add it to DBeaver config at some moment but again - it would be great to have it in Maven repository (any public repository, Maven Central is not a requirement).
Thank you very much,
Serge
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.