很奇怪的异常
我的代码
Query q = em.createQuery("SELECT u FROM Chatuser u");
List<Chatuser> list = (List<Chatuser>) q.getResultList();
for (int i = 0; i < list.size(); i++) {
Object aa = list.get(i);
Chatuser chatuser = (Chatuser)aa;
例外
ex = (java.lang.ClassCastException) java.lang.ClassCastException: Entities.service.Chatuser cannot be cast to Entities.service.Chatuser
问题是什么 ?