This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
Query query=em.createQuery("SELECT U.firstname from User U");
List list = query.getResultList();
Iterator iterator = list.iterator();
User emp = (User)iterator.next();
return new DefaultHttpHeaders("create");
the user is my bean .
when i m running the web application the occurs due to this line i.e User emp = (User)iterator.next();
and the error is java.lang.String cannot be cast to com.action.User
so please help me t solve the problem :