问题描述
- 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)
所需包都有还包异常。。。求助
解决方案
hive jdbc连接时的乱码问题
hive jdbc
Hive的JDBC连接
解决方案二:
一个是你的jar包倒入吗?肯能会有版本的问题。可以看看这个链接的东西:http://www.aboutyun.com/thread-7461-1-1.html
时间: 2024-11-16 08:39:12