当前位置:Gxlcms >
数据库问题 >
java.sql.SQLException: No suitable driver found for jdbc:hive://localhost:10000/default
java.sql.SQLException: No suitable driver found for jdbc:hive://localhost:10000/default
时间:2021-07-01 10:21:17
帮助过:67人阅读
jdbc:hive:
//localhost:10000/default
at java.sql.DriverManager.getConnection(DriverManager.java:
596)
at java.sql.DriverManager.getConnection(DriverManager.java:233)
at demo.utils.JDBCUtils.getConnection(JDBCUtils.java:25)
at demo.hive.HiveJDBCDemo.main(HiveJDBCDemo.java:16)
Exception in thread
"main" java.lang.NullPointerException
at demo.hive.HiveJDBCDemo.main(HiveJDBCDemo.java:18)
resolve:
url->change hive to hive2
before:
private static String driverString = "org.apache.hive.jdbc.HiveDriver";
private static String urlString = "jdbc:hive://localhost:10000/default";
after:
private static String driverString = "org.apache.hive.jdbc.HiveDriver";
private static String urlString = "jdbc:hive2://localhost:10000/default";
java.sql.SQLException: No suitable driver found for jdbc:hive://localhost:10000/default
标签:bsp string change url apache dem drivers main cep