I am facing a error while uploading image to database, i am passing byte array ,but getting Exception below. could anyone help me `@Override @Transactional @SuppressWarnings("unchecked") public void update(MyFiles eqFiles, byte[] imageBytes) {
int result=sessionFactory.getCurrentSession().createNativeQuery(FILE_UPDATE).setBinary("image", imageBytes)
.setInteger("id", eqFiles.id().setTimeout(60).executeUpdate();
}`
Exception as follows:
SEVERE: Servlet.service() for servlet [jersey-servlet] in context with path [/HFD] threw exception [org.springframework.transaction.TransactionSystemException: Could not roll back Hibernate transaction; nested exception is org.hibernate.TransactionException: Unable to rollback against JDBC Connection] with root cause java.sql.SQLException: Connection is closed
Any responses would be appreciated, thanks in advance.