Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here. Want to know more about what has changed? Check out the Community News blog.

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

SOLVED Go to solution

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

New Contributor

" 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

Accepted Solutions

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

New Contributor

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.

3 REPLIES 3

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

New Contributor

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.

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

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);
         
    }
}
Highlighted

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

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 ?