Even i'm casting Object into int, But this exception occur...
Actually my Hibernate-JPA method was return Object then i'm converting that Object into int...
Hear is my Hiberanate code..
@Transactional
public Object getAttendanceList(User user){
Query query = entityManager.createQuery("select Count(ad) from AttendanceDemo ad inner join ad.attendee at where at.user=:user",
Long.class);
query.setParameter("user", user);
return query.getSingleResult();
}
Now i'm converting this Object as int..
int k = (Integer) userService.getAttendanceList(currentUser);
i'm converting Object to Integer... hear any problem
Please help me...