4 Replies Latest reply on May 22, 2006 9:30 AM by dornus

    ClassCastException java.lang.Long in 4.0.4.GA

      I had code that worked in previous releases of 4.0.4, but now gets ClassCastExceptions when run under 4.0.4.GA

      It looks as though it is trying to interpret counts as a long instead of an integer. Is this a bug, or a change?

       private int getMyCount() {
       final Query q = em.createQuery(
       "select count(o) " +
       "from MyTable o "
       );
       return (Integer) q.getSingleResult();
       }
      


      javax.ejb.EJBException: java.lang.ClassCastException: java.lang.Long