Hive JDBC 连接异常问题

代码:
String driverName = "org.apache.hive.jdbc.HiveDriver";
String url = "jdbc:hive://192.168.1.108:10000/default";
String user = "";
String password = "";
String sql = "";
ResultSet res = null;
Class.forName(driverName);

        Connection con = DriverManager.getConnection(url, user, password);

错:
Exception in thread "main" java.sql.SQLException: No suitable driver found for jdbc:hive://192.168.1.108:10000/default
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
所需包都有还包异常。。。求助

1个回答

一个是你的jar包倒入吗?肯能会有版本的问题。可以看看这个链接的东西:http://www.aboutyun.com/thread-7461-1-1.html

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问