Member since
07-24-2015
2
Posts
0
Kudos Received
1
Solution
My Accepted Solutions
Title | Views | Posted |
---|---|---|
11183 | 07-24-2015 07:51 AM |
03-12-2018
06:25 AM
After upating result set still getting the same error. java.sql.SQLFeatureNotSupportedException: [Simba][JDBC](10220) Driver not capable. public String list() throws SQLException, ClassNotFoundException {
List<Biler> bilers = new ArrayList<Biler>();
final String DRIVER_CLASS = "com.cloudera.impala.jdbc4.Driver";
final String CONNECTION_URL = "jdbc:impala://host_name:21050;AuthMech=0;";
Class.forName(DRIVER_CLASS);
Biler biler = null;
Connection connection = DriverManager.getConnection(CONNECTION_URL);
Statement stmt = connection.createStatement( ResultSet.TYPE_FORWARD_ONLY,
ResultSet.CONCUR_READ_ONLY);
ResultSet rs =stmt.executeQuery("select senderid ,procdate ,count(*) as"
+ " count1 from smsc.smsc_data_par group by senderid , procdate");
try{
while (rs.next()) {
biler = new Biler();
biler.setId(rs.getString("senderid"));
biler.setName(rs.getString("procdate"));
biler.setValue(rs.getString("count1"));
bilers.add(biler);
}
}finally{
if (rs != null){
try{
rs.close();
}catch(SQLException e){}
}
if(connection !=null){
try{
connection.close();
}catch(SQLException e){}
}
if(stmt != null){
try{
stmt.close();
}catch(SQLException e ){}
}
}
Gson gson = new Gson();
return gson.toJson(bilers);
}
} Any suggestion how to resolve this issue ?
... View more