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.

javatpoint.com | 8 months ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    What is FlushMode in Spring-Hibernate Integration ? | 8369 - javatpoint.com

    javatpoint.com | 8 months ago
    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.
  2. 0

    Spring framework annotation-based transactions with superclass

    Stack Overflow | 3 years ago | Daniel
    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.

    Root Cause Analysis

    1. 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.hibernate4.HibernateTemplate.checkWriteOperationAllowed()
    2. Spring ORM
      HibernateTemplate.delete
      1. org.springframework.orm.hibernate4.HibernateTemplate.checkWriteOperationAllowed(HibernateTemplate.java:1135)
      2. org.springframework.orm.hibernate4.HibernateTemplate$24.doInHibernate(HibernateTemplate.java:789)
      3. org.springframework.orm.hibernate4.HibernateTemplate.doExecute(HibernateTemplate.java:340)
      4. org.springframework.orm.hibernate4.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:308)
      5. org.springframework.orm.hibernate4.HibernateTemplate.delete(HibernateTemplate.java:786)
      6. org.springframework.orm.hibernate4.HibernateTemplate.delete(HibernateTemplate.java:781)
      6 frames
    3. springHibernateIntegration
      InsertTest.main
      1. springHibernateIntegration.UsersDAO.deleteUser(UsersDAO.java:28)
      2. springHibernateIntegration.InsertTest.main(InsertTest.java:21)
      2 frames