java.lang.IllegalStateException: Cannot start a new transaction without ending the existing transaction.

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.

  • We have a base class for tests annotated like this: {code:java} @TestExecutionListeners(TransactionalTestExecutionListener.class) public class BaseTests {} {code} If we extend that class and annotate the subclass like this... {code:java} @Transactional @TestExecutionListeners(TransactionalTestExecutionListener.class) public class ExtendedTests extends BaseTests {} {code} ... then the following exception is thrown: {noformat} java.lang.IllegalStateException: Cannot start a new transaction without ending the existing transaction. at org.springframework.test.context.transaction.TransactionalTestExecutionListener.beforeTestMethod(TransactionalTestExecutionListener.java:174) at org.springframework.test.context.TestContextManager.beforeTestMethod(TestContextManager.java:249) at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:71) at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:81) at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:216) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:82) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:60) at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:67) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:162) at org.junit.runner.JUnitCore.run(JUnitCore.java:160) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:74) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:211) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:67) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134) {noformat}
    via by Federico Donnarumma,
  • We have a base class for tests annotated like this: {code:java} @TestExecutionListeners(TransactionalTestExecutionListener.class) public class BaseTests {} {code} If we extend that class and annotate the subclass like this... {code:java} @Transactional @TestExecutionListeners(TransactionalTestExecutionListener.class) public class ExtendedTests extends BaseTests {} {code} ... then the following exception is thrown: {noformat} java.lang.IllegalStateException: Cannot start a new transaction without ending the existing transaction. at org.springframework.test.context.transaction.TransactionalTestExecutionListener.beforeTestMethod(TransactionalTestExecutionListener.java:174) at org.springframework.test.context.TestContextManager.beforeTestMethod(TestContextManager.java:249) at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:71) at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:81) at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:216) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:82) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:60) at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:67) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:162) at org.junit.runner.JUnitCore.run(JUnitCore.java:160) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:74) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:211) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:67) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134) {noformat}
    via by Federico Donnarumma,
  • GitHub comment 3010#189609925
    via GitHub by deepu105
    ,
  • {code} Results : Tests in error: testDoesntExist(org.springframework.data.neo4j.rest.integration.RestFinderTests): Cannot start a new transaction without ending the existing transaction. testSaveManyPeople(org.springframework.data.neo4j.rest.integration.RestFinderTests): Cannot start a new transaction without ending the existing transaction. testFinderFindAll(org.springframework.data.neo4j.rest.integration.RestFinderTests): Cannot start a new transaction without ending the existing transaction. testSavePerson(org.springframework.data.neo4j.rest.integration.RestFinderTests): Cannot start a new transaction without ending the existing transaction. testFindIterableMapsWithQueryAnnotation(org.springframework.data.neo4j.rest.integration.RestFinderTests): Cannot start a new transaction without ending the existing transaction. testFindIterableOfPersonWithQueryAnnotation(org.springframework.data.neo4j.rest.integration.RestFinderTests): Cannot start a new transaction without ending the existing transaction. testFindPaged(org.springframework.data.neo4j.rest.integration.RestFinderTests): Cannot start a new transaction without ending the existing transaction. testFinderFindById(org.springframework.data.neo4j.rest.integration.RestFinderTests): Cannot start a new transaction without ending the existing transaction. testFinderCount(org.springframework.data.neo4j.rest.integration.RestFinderTests): Cannot start a new transaction without ending the existing transaction. testExists(org.springframework.data.neo4j.rest.integration.RestFinderTests): Cannot start a new transaction without ending the existing transaction. testFindRelationshipEntity(org.springframework.data.neo4j.rest.integration.RestFinderTests): Cannot start a new transaction without ending the existing transaction. testFindPersonWithQueryAnnotation(org.springframework.data.neo4j.rest.integration.RestFinderTests): Cannot start a new transaction without ending the existing transaction. testFinderFindByIdNonexistent(org.springframework.data.neo4j.rest.integration.RestFinderTests): Cannot start a new transaction without ending the existing transaction. testFindByNamedQuery(org.springframework.data.neo4j.rest.integration.RestFinderTests): Cannot start a new transaction without ending the existing transaction. testFindAllOnGroup(org.springframework.data.neo4j.rest.integration.RestFinderTests): Cannot start a new transaction without ending the existing transaction. testFindAccountByEmailLikeNumber(org.springframework.data.neo4j.rest.integration.RestGraphRepositoryTests): Cannot start a new transaction without ending the existing transaction. testFindPagedNull(org.springframework.data.neo4j.rest.integration.RestGraphRepositoryTests): Cannot start a new transaction without ending the existing transaction. testFindPagedDescending(org.springframework.data.neo4j.rest.integration.RestGraphRepositoryTests): Cannot start a new transaction without ending the existing transaction. testFindIterableMapsWithQueryAnnotation(org.springframework.data.neo4j.rest.integration.RestGraphRepositoryTests): Cannot start a new transaction without ending the existing transaction. testSaveWhenFailOnDuplicateSetToFalse(org.springframework.data.neo4j.rest.integration.RestGraphRepositoryTests): Cannot start a new transaction without ending the existing transaction. testFindIterableOfPersonWithQueryAnnotation(org.springframework.data.neo4j.rest.integration.RestGraphRepositoryTests): Cannot start a new transaction without ending the existing transaction. testFindPaged(org.springframework.data.neo4j.rest.integration.RestGraphRepositoryTests): Cannot start a new transaction without ending the existing transaction. testSaveWhenDefaultFailOnDuplicateSetToTrueAllowsUpdates(org.springframework.data.neo4j.rest.integration.RestGraphRepositoryTests): Cannot start a new transaction without ending the existing transaction. testFindSortedNull(org.springframework.data.neo4j.rest.integration.RestGraphRepositoryTests): Cannot start a new transaction without ending the existing transaction. testFindSortedDescending(org.springframework.data.neo4j.rest.integration.RestGraphRepositoryTests): Cannot start a new transaction without ending the existing transaction. testFindPersonWithQueryAnnotation(org.springframework.data.neo4j.rest.integration.RestGraphRepositoryTests): Cannot start a new transaction without ending the existing transaction. testFindByNamedQuery(org.springframework.data.neo4j.rest.integration.RestGraphRepositoryTests): Cannot start a new transaction without ending the existing transaction. testUpdateSingleRelatedToViaField(org.springframework.data.neo4j.rest.integration.RestNodeEntityRelationshipTests): Cannot start a new transaction without ending the existing transaction. testOneToManyReadOnlyShouldThrowExceptionOnSet(org.springframework.data.neo4j.rest.integration.RestNodeEntityRelationshipTests): Cannot start a new transaction without ending the existing transaction. testRemoveFromOneToManyRelationship(org.springframework.data.neo4j.rest.integration.RestNodeEntityRelationshipTests): Cannot start a new transaction without ending the existing transaction. testRelationshipGetEntities(org.springframework.data.neo4j.rest.integration.RestNodeEntityRelationshipTests): Cannot start a new transaction without ending the existing transaction. testRelationshipSetEntitiesShouldThrowException(org.springframework.data.neo4j.rest.integration.RestNodeEntityRelationshipTests): Cannot start a new transaction without ending the existing transaction. testClearFromOneToManyRelationship(org.springframework.data.neo4j.rest.integration.RestNodeEntityRelationshipTests): Cannot start a new transaction without ending the existing transaction. testAddToOneToManyRelationship(org.springframework.data.neo4j.rest.integration.RestNodeEntityRelationshipTests): Cannot start a new transaction without ending the existing transaction. testRemoveSingleRelatedToViaField(org.springframework.data.neo4j.rest.integration.RestNodeEntityRelationshipTests): Cannot start a new transaction without ending the existing transaction. testSingleRelatedToViaField(org.springframework.data.neo4j.rest.integration.RestNodeEntityRelationshipTests): Cannot start a new transaction without ending the existing transaction. testOneToManyReadOnly(org.springframework.data.neo4j.rest.integration.RestNodeEntityRelationshipTests): Cannot start a new transaction without ending the existing transaction. testDeletePreviousRelationshipOnNewRelationship(org.springframework.data.neo4j.rest.integration.RestNodeEntityRelationshipTests): Cannot start a new transaction without ending the existing transaction. testSetOneToManyRelationship(org.springframework.data.neo4j.rest.integration.RestNodeEntityRelationshipTests): Cannot start a new transaction without ending the existing transaction. testRetainAllFromOneToManyRelationship(org.springframework.data.neo4j.rest.integration.RestNodeEntityRelationshipTests): Cannot start a new transaction without ending the existing transaction. testRemoveAllFromOneToManyRelationship(org.springframework.data.neo4j.rest.integration.RestNodeEntityRelationshipTests): Cannot start a new transaction without ending the existing transaction. multipleRelationshipsOfSameTypeBetweenTwoEntities(org.springframework.data.neo4j.rest.integration.RestNodeEntityRelationshipTests): Cannot start a new transaction without ending the existing transaction. testCreateRelationshipWithAnnotationOnSet(org.springframework.data.neo4j.rest.integration.RestNodeEntityRelationshipTests): Cannot start a new transaction without ending the existing transaction. testCreateIncomingRelationshipWithAnnotationOnSet(org.springframework.data.neo4j.rest.integration.RestNodeEntityRelationshipTests): Cannot start a new transaction without ending the existing transaction. testDeleteRelationship(org.springframework.data.neo4j.rest.integration.RestNodeEntityRelationshipTests): Cannot start a new transaction without ending the existing transaction. testGetOneToManyRelationship(org.springframework.data.neo4j.rest.integration.RestNodeEntityRelationshipTests): Cannot start a new transaction without ending the existing transaction. testCreateRelationshipWithoutAnnotationOnSet(org.springframework.data.neo4j.rest.integration.RestNodeEntityRelationshipTests): Cannot start a new transaction without ending the existing transaction. testConvertedIterableProperties(org.springframework.data.neo4j.rest.integration.RestNodeEntityTests): Cannot start a new transaction without ending the existing transaction. testSetShortProperty(org.springframework.data.neo4j.rest.integration.RestNodeEntityTests): Cannot start a new transaction without ending the existing transaction. testDefaultFailOnDuplicateSetToFalseCausesMergeWhenAnotherDuplicateEntityCreated(org.springframework.data.neo4j.rest.integration.RestNodeEntityTests): Cannot start a new transaction without ending the existing transaction. testCollectionProperties(org.springframework.data.neo4j.rest.integration.RestNodeEntityTests): Cannot start a new transaction without ending the existing transaction. testSetSimpleProperties(org.springframework.data.neo4j.rest.integration.RestNodeEntityTests): Cannot start a new transaction without ending the existing transaction. testDefaultFailOnDuplicateSetToTrueSavesCorrectlyWhenUpdating(org.springframework.data.neo4j.rest.integration.RestNodeEntityTests): Cannot start a new transaction without ending the existing transaction. testIterableProperties(org.springframework.data.neo4j.rest.integration.RestNodeEntityTests): Cannot start a new transaction without ending the existing transaction. testUserConstructor(org.springframework.data.neo4j.rest.integration.RestNodeEntityTests): Cannot start a new transaction without ending the existing transaction. testConvertedSetProperties(org.springframework.data.neo4j.rest.integration.RestNodeEntityTests): Cannot start a new transaction without ending the existing transaction. testConvertedArrayProperties(org.springframework.data.neo4j.rest.integration.RestNodeEntityTests): Cannot start a new transaction without ending the existing transaction. testSetProperties(org.springframework.data.neo4j.rest.integration.RestNodeEntityTests): Cannot start a new transaction without ending the existing transaction. testArrayProperties(org.springframework.data.neo4j.rest.integration.RestNodeEntityTests): Cannot start a new transaction without ending the existing transaction. testLabels(org.springframework.data.neo4j.rest.integration.RestNodeEntityTests): Cannot start a new transaction without ending the existing transaction. testSetShortNameProperty(org.springframework.data.neo4j.rest.integration.RestNodeEntityTests): Cannot start a new transaction without ending the existing transaction. testConvertedCollectionProperties(org.springframework.data.neo4j.rest.integration.RestNodeEntityTests): Cannot start a new transaction without ending the existing transaction. testTraverseFromGroupToPeople(org.springframework.data.neo4j.rest.integration.RestTraversalTests): Cannot start a new transaction without ending the existing transaction. testTraverseFromGroupToPeopleWithFinder(org.springframework.data.neo4j.rest.integration.RestTraversalTests): Cannot start a new transaction without ending the existing transaction. testTraverseFieldFromGroupToPeople(org.springframework.data.neo4j.rest.integration.RestTraversalTests): Cannot start a new transaction without ending the existing transaction. testTraverseFieldFromGroupToPeopleRelationships(org.springframework.data.neo4j.rest.integration.RestTraversalTests): Cannot start a new transaction without ending the existing transaction. testTraverseFromGroupToPeoplePaths(org.springframework.data.neo4j.rest.integration.RestTraversalTests): Cannot start a new transaction without ending the existing transaction. testTraverseFieldFromGroupToPeopleNodes(org.springframework.data.neo4j.rest.integration.RestTraversalTests): Cannot start a new transaction without ending the existing transaction. testQuerySingleOfTypePerson(org.springframework.data.neo4j.rest.support.RestQueryEngineTests): Cannot start a new transaction without ending the existing transaction. testQueryList(org.springframework.data.neo4j.rest.support.RestQueryEngineTests): Cannot start a new transaction without ending the existing transaction. testQueryListWithCustomConverter(org.springframework.data.neo4j.rest.support.RestQueryEngineTests): Cannot start a new transaction without ending the existing transaction. testQueryWithSpaceInParameter(org.springframework.data.neo4j.rest.support.RestQueryEngineTests): Cannot start a new transaction without ending the existing transaction. testQueryListOfTypeNode(org.springframework.data.neo4j.rest.support.RestQueryEngineTests): Cannot start a new transaction without ending the existing transaction. testQueryForObjectAsString(org.springframework.data.neo4j.rest.support.RestQueryEngineTests): Cannot start a new transaction without ending the existing transaction. testQueryForObjectAsEnum(org.springframework.data.neo4j.rest.support.RestQueryEngineTests): Cannot start a new transaction without ending the existing transaction. testQueryListOfTypePerson(org.springframework.data.neo4j.rest.support.RestQueryEngineTests): Cannot start a new transaction without ending the existing transaction. Tests run: 222, Failures: 0, Errors: 76, Skipped: 12 [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] Spring Data Neo4j - Parent ........................ SUCCESS [ 0.541 s] [INFO] Spring Data Neo4j ................................. SUCCESS [01:20 min] [INFO] Spring Data Neo4j - AspectJ Advanced Mapping ...... SUCCESS [ 54.850 s] [INFO] Spring Data Neo4j - Transactions .................. SUCCESS [ 4.498 s] [INFO] Spring Data Neo4j - Cross-Store Persistence Support SUCCESS [ 7.724 s] [INFO] Spring Data Neo4j - Rest Binding .................. FAILURE [01:10 min] [INFO] Spring Data Neo4j - Distribution .................. SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 03:39 min [INFO] Finished at: 2015-03-26T07:33:48+01:00 [INFO] Final Memory: 58M/724M {code} StackTrace example (same for all tests): {code} testQueryListOfTypePerson(org.springframework.data.neo4j.rest.support.RestQueryEngineTests) Time elapsed: 0.003 sec <<< ERROR! java.lang.IllegalStateException: Cannot start a new transaction without ending the existing transaction. at org.springframework.test.context.transaction.TransactionalTestExecutionListener.beforeTestMethod(TransactionalTestExecutionListener.java:175) at org.springframework.test.context.TestContextManager.beforeTestMethod(TestContextManager.java:249) at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:72) at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:82) at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:73) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:224) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:83) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:68) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:163) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:236) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:134) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:113) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189) at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165) at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:103) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:74) {code}
    via by Thomas Darimont,
  • {code} Results : Tests in error: testDoesntExist(org.springframework.data.neo4j.rest.integration.RestFinderTests): Cannot start a new transaction without ending the existing transaction. testSaveManyPeople(org.springframework.data.neo4j.rest.integration.RestFinderTests): Cannot start a new transaction without ending the existing transaction. testFinderFindAll(org.springframework.data.neo4j.rest.integration.RestFinderTests): Cannot start a new transaction without ending the existing transaction. testSavePerson(org.springframework.data.neo4j.rest.integration.RestFinderTests): Cannot start a new transaction without ending the existing transaction. testFindIterableMapsWithQueryAnnotation(org.springframework.data.neo4j.rest.integration.RestFinderTests): Cannot start a new transaction without ending the existing transaction. testFindIterableOfPersonWithQueryAnnotation(org.springframework.data.neo4j.rest.integration.RestFinderTests): Cannot start a new transaction without ending the existing transaction. testFindPaged(org.springframework.data.neo4j.rest.integration.RestFinderTests): Cannot start a new transaction without ending the existing transaction. testFinderFindById(org.springframework.data.neo4j.rest.integration.RestFinderTests): Cannot start a new transaction without ending the existing transaction. testFinderCount(org.springframework.data.neo4j.rest.integration.RestFinderTests): Cannot start a new transaction without ending the existing transaction. testExists(org.springframework.data.neo4j.rest.integration.RestFinderTests): Cannot start a new transaction without ending the existing transaction. testFindRelationshipEntity(org.springframework.data.neo4j.rest.integration.RestFinderTests): Cannot start a new transaction without ending the existing transaction. testFindPersonWithQueryAnnotation(org.springframework.data.neo4j.rest.integration.RestFinderTests): Cannot start a new transaction without ending the existing transaction. testFinderFindByIdNonexistent(org.springframework.data.neo4j.rest.integration.RestFinderTests): Cannot start a new transaction without ending the existing transaction. testFindByNamedQuery(org.springframework.data.neo4j.rest.integration.RestFinderTests): Cannot start a new transaction without ending the existing transaction. testFindAllOnGroup(org.springframework.data.neo4j.rest.integration.RestFinderTests): Cannot start a new transaction without ending the existing transaction. testFindAccountByEmailLikeNumber(org.springframework.data.neo4j.rest.integration.RestGraphRepositoryTests): Cannot start a new transaction without ending the existing transaction. testFindPagedNull(org.springframework.data.neo4j.rest.integration.RestGraphRepositoryTests): Cannot start a new transaction without ending the existing transaction. testFindPagedDescending(org.springframework.data.neo4j.rest.integration.RestGraphRepositoryTests): Cannot start a new transaction without ending the existing transaction. testFindIterableMapsWithQueryAnnotation(org.springframework.data.neo4j.rest.integration.RestGraphRepositoryTests): Cannot start a new transaction without ending the existing transaction. testSaveWhenFailOnDuplicateSetToFalse(org.springframework.data.neo4j.rest.integration.RestGraphRepositoryTests): Cannot start a new transaction without ending the existing transaction. testFindIterableOfPersonWithQueryAnnotation(org.springframework.data.neo4j.rest.integration.RestGraphRepositoryTests): Cannot start a new transaction without ending the existing transaction. testFindPaged(org.springframework.data.neo4j.rest.integration.RestGraphRepositoryTests): Cannot start a new transaction without ending the existing transaction. testSaveWhenDefaultFailOnDuplicateSetToTrueAllowsUpdates(org.springframework.data.neo4j.rest.integration.RestGraphRepositoryTests): Cannot start a new transaction without ending the existing transaction. testFindSortedNull(org.springframework.data.neo4j.rest.integration.RestGraphRepositoryTests): Cannot start a new transaction without ending the existing transaction. testFindSortedDescending(org.springframework.data.neo4j.rest.integration.RestGraphRepositoryTests): Cannot start a new transaction without ending the existing transaction. testFindPersonWithQueryAnnotation(org.springframework.data.neo4j.rest.integration.RestGraphRepositoryTests): Cannot start a new transaction without ending the existing transaction. testFindByNamedQuery(org.springframework.data.neo4j.rest.integration.RestGraphRepositoryTests): Cannot start a new transaction without ending the existing transaction. testUpdateSingleRelatedToViaField(org.springframework.data.neo4j.rest.integration.RestNodeEntityRelationshipTests): Cannot start a new transaction without ending the existing transaction. testOneToManyReadOnlyShouldThrowExceptionOnSet(org.springframework.data.neo4j.rest.integration.RestNodeEntityRelationshipTests): Cannot start a new transaction without ending the existing transaction. testRemoveFromOneToManyRelationship(org.springframework.data.neo4j.rest.integration.RestNodeEntityRelationshipTests): Cannot start a new transaction without ending the existing transaction. testRelationshipGetEntities(org.springframework.data.neo4j.rest.integration.RestNodeEntityRelationshipTests): Cannot start a new transaction without ending the existing transaction. testRelationshipSetEntitiesShouldThrowException(org.springframework.data.neo4j.rest.integration.RestNodeEntityRelationshipTests): Cannot start a new transaction without ending the existing transaction. testClearFromOneToManyRelationship(org.springframework.data.neo4j.rest.integration.RestNodeEntityRelationshipTests): Cannot start a new transaction without ending the existing transaction. testAddToOneToManyRelationship(org.springframework.data.neo4j.rest.integration.RestNodeEntityRelationshipTests): Cannot start a new transaction without ending the existing transaction. testRemoveSingleRelatedToViaField(org.springframework.data.neo4j.rest.integration.RestNodeEntityRelationshipTests): Cannot start a new transaction without ending the existing transaction. testSingleRelatedToViaField(org.springframework.data.neo4j.rest.integration.RestNodeEntityRelationshipTests): Cannot start a new transaction without ending the existing transaction. testOneToManyReadOnly(org.springframework.data.neo4j.rest.integration.RestNodeEntityRelationshipTests): Cannot start a new transaction without ending the existing transaction. testDeletePreviousRelationshipOnNewRelationship(org.springframework.data.neo4j.rest.integration.RestNodeEntityRelationshipTests): Cannot start a new transaction without ending the existing transaction. testSetOneToManyRelationship(org.springframework.data.neo4j.rest.integration.RestNodeEntityRelationshipTests): Cannot start a new transaction without ending the existing transaction. testRetainAllFromOneToManyRelationship(org.springframework.data.neo4j.rest.integration.RestNodeEntityRelationshipTests): Cannot start a new transaction without ending the existing transaction. testRemoveAllFromOneToManyRelationship(org.springframework.data.neo4j.rest.integration.RestNodeEntityRelationshipTests): Cannot start a new transaction without ending the existing transaction. multipleRelationshipsOfSameTypeBetweenTwoEntities(org.springframework.data.neo4j.rest.integration.RestNodeEntityRelationshipTests): Cannot start a new transaction without ending the existing transaction. testCreateRelationshipWithAnnotationOnSet(org.springframework.data.neo4j.rest.integration.RestNodeEntityRelationshipTests): Cannot start a new transaction without ending the existing transaction. testCreateIncomingRelationshipWithAnnotationOnSet(org.springframework.data.neo4j.rest.integration.RestNodeEntityRelationshipTests): Cannot start a new transaction without ending the existing transaction. testDeleteRelationship(org.springframework.data.neo4j.rest.integration.RestNodeEntityRelationshipTests): Cannot start a new transaction without ending the existing transaction. testGetOneToManyRelationship(org.springframework.data.neo4j.rest.integration.RestNodeEntityRelationshipTests): Cannot start a new transaction without ending the existing transaction. testCreateRelationshipWithoutAnnotationOnSet(org.springframework.data.neo4j.rest.integration.RestNodeEntityRelationshipTests): Cannot start a new transaction without ending the existing transaction. testConvertedIterableProperties(org.springframework.data.neo4j.rest.integration.RestNodeEntityTests): Cannot start a new transaction without ending the existing transaction. testSetShortProperty(org.springframework.data.neo4j.rest.integration.RestNodeEntityTests): Cannot start a new transaction without ending the existing transaction. testDefaultFailOnDuplicateSetToFalseCausesMergeWhenAnotherDuplicateEntityCreated(org.springframework.data.neo4j.rest.integration.RestNodeEntityTests): Cannot start a new transaction without ending the existing transaction. testCollectionProperties(org.springframework.data.neo4j.rest.integration.RestNodeEntityTests): Cannot start a new transaction without ending the existing transaction. testSetSimpleProperties(org.springframework.data.neo4j.rest.integration.RestNodeEntityTests): Cannot start a new transaction without ending the existing transaction. testDefaultFailOnDuplicateSetToTrueSavesCorrectlyWhenUpdating(org.springframework.data.neo4j.rest.integration.RestNodeEntityTests): Cannot start a new transaction without ending the existing transaction. testIterableProperties(org.springframework.data.neo4j.rest.integration.RestNodeEntityTests): Cannot start a new transaction without ending the existing transaction. testUserConstructor(org.springframework.data.neo4j.rest.integration.RestNodeEntityTests): Cannot start a new transaction without ending the existing transaction. testConvertedSetProperties(org.springframework.data.neo4j.rest.integration.RestNodeEntityTests): Cannot start a new transaction without ending the existing transaction. testConvertedArrayProperties(org.springframework.data.neo4j.rest.integration.RestNodeEntityTests): Cannot start a new transaction without ending the existing transaction. testSetProperties(org.springframework.data.neo4j.rest.integration.RestNodeEntityTests): Cannot start a new transaction without ending the existing transaction. testArrayProperties(org.springframework.data.neo4j.rest.integration.RestNodeEntityTests): Cannot start a new transaction without ending the existing transaction. testLabels(org.springframework.data.neo4j.rest.integration.RestNodeEntityTests): Cannot start a new transaction without ending the existing transaction. testSetShortNameProperty(org.springframework.data.neo4j.rest.integration.RestNodeEntityTests): Cannot start a new transaction without ending the existing transaction. testConvertedCollectionProperties(org.springframework.data.neo4j.rest.integration.RestNodeEntityTests): Cannot start a new transaction without ending the existing transaction. testTraverseFromGroupToPeople(org.springframework.data.neo4j.rest.integration.RestTraversalTests): Cannot start a new transaction without ending the existing transaction. testTraverseFromGroupToPeopleWithFinder(org.springframework.data.neo4j.rest.integration.RestTraversalTests): Cannot start a new transaction without ending the existing transaction. testTraverseFieldFromGroupToPeople(org.springframework.data.neo4j.rest.integration.RestTraversalTests): Cannot start a new transaction without ending the existing transaction. testTraverseFieldFromGroupToPeopleRelationships(org.springframework.data.neo4j.rest.integration.RestTraversalTests): Cannot start a new transaction without ending the existing transaction. testTraverseFromGroupToPeoplePaths(org.springframework.data.neo4j.rest.integration.RestTraversalTests): Cannot start a new transaction without ending the existing transaction. testTraverseFieldFromGroupToPeopleNodes(org.springframework.data.neo4j.rest.integration.RestTraversalTests): Cannot start a new transaction without ending the existing transaction. testQuerySingleOfTypePerson(org.springframework.data.neo4j.rest.support.RestQueryEngineTests): Cannot start a new transaction without ending the existing transaction. testQueryList(org.springframework.data.neo4j.rest.support.RestQueryEngineTests): Cannot start a new transaction without ending the existing transaction. testQueryListWithCustomConverter(org.springframework.data.neo4j.rest.support.RestQueryEngineTests): Cannot start a new transaction without ending the existing transaction. testQueryWithSpaceInParameter(org.springframework.data.neo4j.rest.support.RestQueryEngineTests): Cannot start a new transaction without ending the existing transaction. testQueryListOfTypeNode(org.springframework.data.neo4j.rest.support.RestQueryEngineTests): Cannot start a new transaction without ending the existing transaction. testQueryForObjectAsString(org.springframework.data.neo4j.rest.support.RestQueryEngineTests): Cannot start a new transaction without ending the existing transaction. testQueryForObjectAsEnum(org.springframework.data.neo4j.rest.support.RestQueryEngineTests): Cannot start a new transaction without ending the existing transaction. testQueryListOfTypePerson(org.springframework.data.neo4j.rest.support.RestQueryEngineTests): Cannot start a new transaction without ending the existing transaction. Tests run: 222, Failures: 0, Errors: 76, Skipped: 12 [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] Spring Data Neo4j - Parent ........................ SUCCESS [ 0.541 s] [INFO] Spring Data Neo4j ................................. SUCCESS [01:20 min] [INFO] Spring Data Neo4j - AspectJ Advanced Mapping ...... SUCCESS [ 54.850 s] [INFO] Spring Data Neo4j - Transactions .................. SUCCESS [ 4.498 s] [INFO] Spring Data Neo4j - Cross-Store Persistence Support SUCCESS [ 7.724 s] [INFO] Spring Data Neo4j - Rest Binding .................. FAILURE [01:10 min] [INFO] Spring Data Neo4j - Distribution .................. SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 03:39 min [INFO] Finished at: 2015-03-26T07:33:48+01:00 [INFO] Final Memory: 58M/724M {code} StackTrace example (same for all tests): {code} testQueryListOfTypePerson(org.springframework.data.neo4j.rest.support.RestQueryEngineTests) Time elapsed: 0.003 sec <<< ERROR! java.lang.IllegalStateException: Cannot start a new transaction without ending the existing transaction. at org.springframework.test.context.transaction.TransactionalTestExecutionListener.beforeTestMethod(TransactionalTestExecutionListener.java:175) at org.springframework.test.context.TestContextManager.beforeTestMethod(TestContextManager.java:249) at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:72) at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:82) at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:73) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:224) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:83) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:68) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:163) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:236) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:134) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:113) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189) at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165) at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:103) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:74) {code}
    via by Thomas Darimont,
  • GitHub comment 174#130468017
    via GitHub by sobkowiak
    ,
    • java.lang.IllegalStateException: Cannot start a new transaction without ending the existing transaction. at org.springframework.test.context.transaction.TransactionalTestExecutionListener.beforeTestMethod(TransactionalTestExecutionListener.java:174) at org.springframework.test.context.TestContextManager.beforeTestMethod(TestContextManager.java:249) at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:71) at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:81) at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:216) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:82) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:60) at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:67) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:162) at org.junit.runner.JUnitCore.run(JUnitCore.java:160) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:74) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:211) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:67) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)

    Users with the same issue

    Andreas Häber
    Andreas Häber22 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    2 more bugmates