java.sql.SQLException: No suitable driver found for jdbc:hive://localhost:10000/default

Posted 天天好心情

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了java.sql.SQLException: No suitable driver found for jdbc:hive://localhost:10000/default相关的知识,希望对你有一定的参考价值。

error:

java.sql.SQLException: No suitable driver found for 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的主要内容,如果未能解决你的问题,请参考以下文章

java.sql.SQLException: ORA-28040: No matching authentication protocol

java.sql.SQLException: No suitable driver 问题解决

java.sql.SQLException: No suitable driver found for jdbc:hive://localhost:10000/default

JPA Sql NativeQuery with SqlResultSetMapping throwing java.sql.SQLException: Column 'formula3_0_' no

Cause: java.sql.SQLException: No operations allowed after statement closed.

错误:java.sql.SQLException: Access denied for user ''@'localhost' (using password: NO)