Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-4584 Upgrade to spring 4.x
  3. TRUNK-4606

@NotTransactional is deprecated as of Spring 3.2.0.RC2

    XMLWordPrintable

    Details

    • Complexity:
      Low

      Description

      ]Impact:
      After the upgrade of the spring version to 4.1.4-RELEASE, running mvn clean install fails with:

      [ERROR] /media/KJoseph/Projects/openMRS/openmrs-core-master/openmrs-core/api/src/test/java/org/openmrs/api/OpenmrsServiceTest.java:[29,42] cannot find symbol
      symbol  : class NotTransactional
      location: package org.springframework.test.annotation
      
      [ERROR] /media/KJoseph/Projects/openMRS/openmrs-core-master/openmrs-core/api/src/test/java/org/openmrs/api/OpenmrsServiceTest.java:[47,2] cannot find symbol
      symbol  : class NotTransactional
      location: class org.openmrs.api.OpenmrsServiceTest
      

      Way out:
      As of Spring 3.0, @NotTransactional is deprecated in favor of moving the non-transactional test method to a separate (non-transactional) test class or to a @BeforeTransaction or @AfterTransaction method. As an alternative to annotating an entire class with @Transactional, consider annotating individual methods with @Transactional; doing so allows a mix of transactional and non-transactional methods in the same test class without the need for using @NotTransactional.

      see documentation at: http://docs.spring.io/spring-framework/docs/3.2.0.RC2/reference/htmlsingle/

        Gliffy Diagrams

          Attachments

            Activity

              People

              Assignee:
              grace Grace Potma
              Reporter:
              k.joseph Kaweesi Joseph
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: