DatabaseMetaData#getColumns returns an empty ResultSet
<p>I'm having an issue retrieving metadata from a MySQL connection, running locally, Ubuntu 14, with Java and NetBeans. I get an empty ResultSet from the <code>getColumns</code> method of a <code>DatabaseMetaData</code> object.</p>

<p>The code is the following:</p>

<pre><code>private static HashMap getColumnsFromDB(Connection con, String dbSchema, String tableName)    throws SQLException 
{
    HashMap Columns = new HashMap();

    DatabaseMetaData metadata = con.getMetaData();

    ResultSet rsColumns = metadata. getColumns(null, dbSchema.toUpperCase(), tableName.toUpperCase(), "%");

    while (rsColumns.next())
    {
        ColumnClass col = new ColumnClass();
        col.column_name = rsColumns.getString("COLUMN_NAME");
       col.mw_type =  UtilClass.toClass(rsColumns.getInt("DATA_TYPE"));   // Convert to java type
        col.is_nullable = rsColumns.getString("IS_NULLABLE");
        col.column_default = rsColumns.getString("COLUMN_DEF");

        Columns.put( col.column_name, col);
    }

    return Columns;
}    
</code></pre>

<p>I can do queries to the database normally, the user is DBA, the table has columns, I've seen in others questions that it can be a little tricky with cases and so on, but I have tried in many ways and I had no expected results.</p>