Impala JDBC Error: User '' does not have privileges to execute 'SELECT' on: table
<p>Resently I enabled the Sentry policy file for Hive. So when I try to execute a query in Impala using Impala-JDBC4 (version 2.5.16) I get this error:</p>

<pre><code>errorMessage:AuthorizationException: User '' does not have privileges to execute 'SELECT' on: db.table
</code></pre>

<p>In my code I set the user and password of my admin account of my DB. So I don't undestand why it don't reads that.</p>

<pre><code>public static double getDolarFromImpala(String date)  {
    double dolar = 0.0;
    try {
        Class.forName(JDBC_DRIVER_IMPALA);
        String sql = "SELECT value FROM db.table where date ='"+date+"'";
        String JDBC_IMPALA_URL = "jdbc:impala://impala1:21050;auth=noSasl;UseNativeQuery=1";

        Connection con = DriverManager.getConnection(JDBC_IMPALA_URL,IMPALA_USER,IMPALA_PASSWORD);
        Statement stmt = con.createStatement();
        ResultSet rs = stmt.executeQuery(sql);

        while(rs.next()){
            dolar = rs.getDouble("value");                                          
        }
        stmt.close();
        con.close();
    }
    catch(SQLException se){
          //Handle errors for JDBC
          se.printStackTrace();
    }
    catch(Exception e){
          //Handle errors for Class.forName
          e.printStackTrace();
    }
    return dolar;
}
</code></pre>

<p>What did I do wrong?</p>