I am getting a NullPointerException when i run this code : <p>Hi guys i have a NullPointerException when i run this code ,and its pointing on the model = (DefaultTableModel) DbUtils.resultSetToTableModel(rs) , and i have imported the net.proteanit.sql.DbUtils , any ideas ?</p>

<pre><code>public void setTableValues(){
         try {
             cn.start();
             String sql = "select id,first_name as Firstname,last_name as Lastname,email,phone,description as AllergyInfo from clients where isDeleted=0";
             rs = cn.executeSelect(sql);
             model = (DefaultTableModel) DbUtils.resultSetToTableModel(rs);
             jTable1.setModel(model);
             rowSorter = new TableRowSorter&lt;&gt;(jTable1.getModel());
             jTable1.setRowSorter(rowSorter);
             cn.stop();
         } catch (SQLException ex) {
             Logger.getLogger(Clients.class.getName()).log(Level.SEVERE, null, ex);
         }
    }
</code></pre>
