Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

" java.sql.SQLFeatureNotSupportedException: [Simba][JDBC](10220) Driver not capable. " in Hive

avatar
Frequent Visitor

" java.sql.SQLFeatureNotSupportedException: [Simba][JDBC](10220) Driver not capable. "

 

The above exception is giving when I'm executing my JEE webapplication with Hive 0.13 in Eclipse (Kepler).

 

Due to below line:

         pstmt = con.prepareStatement(query, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);

 

NOTE:

        - The application is executing properly with query parameter of the above method.

        - But, This exception is coming just because of last 2 parameters of above method, nothing but ResultSet types.

 

I Followed Configurations:

 

 

- Cloudera Hive JDBC Driver class: com.cloudera.hive.jdbc4.HS2Driver

- Connection URL: jdbc:hive2://192.168.1.135:10000/yottadb6

 

- Cloudera Software: cloudera-quickstart-vm-5.3.0-0-vmware

- Hive v0.13

- Cloudera Hive Jdbc drivers 2.5.3

- Apache Tomcat 7.0

- JDK 1.7

 

Q:  Can any body resolve the above problem as early as possible?

 

1 ACCEPTED SOLUTION

avatar
Frequent Visitor

Hey guys, I found one thing. Sorry to say this:

 

i.e., Cloudera Hive & Cloudera Impala both just will support "forward-only and read-only ResultSet". Because both of these environments won't support Transactions.

View solution in original post

3 REPLIES 3

avatar
Frequent Visitor

Hey guys, I found one thing. Sorry to say this:

 

i.e., Cloudera Hive & Cloudera Impala both just will support "forward-only and read-only ResultSet". Because both of these environments won't support Transactions.

avatar
Explorer

I tried to use only the "forward-only and read-only ResultSet". Still getting the same error . This is what I have tried:-

@GET
    @Produces(MediaType.APPLICATION_JSON)
    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://SERVER_ADDRESS:21050;AuthMech=0;";
             Class.forName(DRIVER_CLASS);
               Biler biler = null;
               Connection    connection = DriverManager.getConnection(CONNECTION_URL);
           // Statement stmt = connection.createStatement();
            stmt = connection.createStatement( ResultSet.CONCUR_READ_ONLY,
            		ResultSet.TYPE_FORWARD_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);
         
    }
}

avatar
Explorer

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 ?