سلام من برای حذف کد زیر رو نوشتم ولی متاسفانه یه خطایی دارم کسی میتونه کمکم کنه؟؟
@Overridepublic void cancelTask(List<DeviceTask> deviceTasks) {
String ids = "";
for (DeviceTask deviceTask : deviceTasks) {
ids += deviceTask.getId() + ",";
}
Session session = null;
try {
session = getSession();
Transaction tx = (Transaction) session.beginTransaction();

String hqlUpdate = "update DeviceTask dt set dt.done =true ,dt.taskStatus = 6 " +
" where dt.activate =true and dt.done=false and dt.id in ("+ids+")";
int updatedEntities = session.createQuery(hqlUpdate)
.executeUpdate();
tx.commit();
} catch (RollbackException e) {
e.printStackTrace();
} catch (HeuristicMixedException e) {
e.printStackTrace();
} catch (HeuristicRollbackException e) {
e.printStackTrace();
} catch (SystemException e) {
e.printStackTrace();
} finally {
session.close();
}
}






و خطایی که بهم میده
HTTP Status 500 - Request processing failed; nested exception is org.springframework.transaction.TransactionSystemE xception: Could not roll back Hibernate transaction; nested exception is org.hibernate.TransactionException: rollback failed


type Exception report
message Request processing failed; nested exception is org.springframework.transaction.TransactionSystemE xception: Could not roll back Hibernate transaction; nested exception is org.hibernate.TransactionException: rollback failed
description The server encountered an internal error that prevented it from fulfilling this request.
exception