码迷,mamicode.com
首页 > 数据库 > 详细

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

时间:2017-01-24 19:03:25      阅读:1006      评论:0      收藏:0      [点我收藏+]

标签:bsp   string   change   url   apache   dem   drivers   main   cep   

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

标签:bsp   string   change   url   apache   dem   drivers   main   cep   

原文地址:http://www.cnblogs.com/liupuLearning/p/6347539.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!