org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowed in read-only mode (FlushMode.MANUAL): Turn your Session into FlushMode.COMMIT/AUTO or remove 'readOnly' marker from transaction definition.

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowed in read-only mode (FlushMode.MANUAL): Turn your Session into FlushMode.COMMIT/AUTO or remove 'readOnly' marker from transaction definition. at org.springframework.orm.hibernate5.HibernateTemplate.checkWriteOperationAllowed(HibernateTemplate.java:1126) at org.springframework.orm.hibernate5.HibernateTemplate$12.doInHibernate(HibernateTemplate.java:619) at org.springframework.orm.hibernate5.HibernateTemplate$12.doInHibernate(HibernateTemplate.java:616) at org.springframework.orm.hibernate5.HibernateTemplate.doExecute(HibernateTemplate.java:341) at org.springframework.orm.hibernate5.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:309) at org.springframework.orm.hibernate5.HibernateTemplate.save(HibernateTemplate.java:616) at com.hbtemp.dao.impl.StudentDaoImpl.insertStudent(StudentDaoImpl.java:22) at com.hbtemp.test.TestClass.main(TestClass.java:25)

Users with the same issue

Unknown visitor1 times, last one,
Unknown visitor1 times, last one,
Unknown visitor1 times, last one,
Unknown visitor1 times, last one,