title: java.math.BigDecimal cannot be cast to [Ljava.lang.Object;
body: <pre><code>List queryList = executeReadAllSQLQuery(queryString);
      for (Iterator i = queryList.iterator(); i.hasNext();) {
          Object values[] = (Object[]) i.next();
          FDetails pDetails = transform(values);
          fDList.add(pDetails);
          values = null;
      }
  </code></pre>
  
  <p>Error I am getting at line 3 : <code>java.math.BigDecimal cannot be cast to [Ljava.lang.Object;</code></p>
  
  <p>My transform function : </p>
  
  <pre><code>private FDetails transform(Object[] values) {
      FDetails Details = new FDetails();
      Details.setPb((BigDecimal)values[0]);
      Details.setPm((BigDecimal)values[1]);
      Details.setEl((BigDecimal)values[1]);
      Details.setUl((BigDecimal)values[1]);
      return BalanceDetails;
  }
  </code></pre>
  
  <p>Please help me resolve these issue.</p>