This content has been marked as final. Show 2 replies
String query="select MD.ramSize,MD.cpuTemp,MD.cpuType FROM MachineData MD where MD.srNo="id;
List<MachineData> macDataList= (List<MachineData>)sess.createQuery(query).list();
Your query might have caused this issue. List<Object> returned from the query instead of List<MachineData>.
Change the query to return MachineData object and try,
String query=" from MachineData as MD where MD.srNo="+id;