Uploaded image for project: 'Spring IDE'
  1. Spring IDE
  2. IDE-1107

error running tutorial in TransferServiceTransactionManagementTests

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 2.3.1, 2.3.2
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      MacBook Pro (brand new)

      Description

      I have a brand new MacBook Pro and a fresh installation of STS 2.3.2-RELEASE. I follow the instructions for the tutorial entitled, "Adding Declarative Transaction Management to Your Spring Applications".

      As instructed, I execute a JUnit test for "TransferServiceTransactionManagementTests"
      and the following error occurs:

      java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
      at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.<clinit>(SpringJUnit4ClassRunner.java:62)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

      The name of the project created by the tutorial is: BankApp

      I think this should be fixed right away because first time users encounter this error and it looks really bad from a PR point of view.

        Activity

        Show
        robertgloverjr Robert Glover added a comment - A more in depth description can be found at: http://forum.springsource.org/showthread.php?t=73053&highlight=TransferServiceTransactionManagementTests
        Hide
        robertgloverjr Robert Glover added a comment -

        After the first dependency is resolved, the follow error occurs:

        java.lang.NoClassDefFoundError: org/springframework/context/ApplicationContext
        at java.lang.Class.getDeclaredConstructors0(Native Method)

        The missing jar file for this second error is: org.springframework.context-sources-2.5.4.A.jar

        After that is fixed, the 3rd error that appears is:

        ERROR [org.springframework.test.context.TestContextManager] - <Caught exception while allowing TestExecutionListener [org.springframewor[email protected]474b5f4a] to prepare test instance [com.springsource.sa[email protected]255d17d7]>
        java.lang.IllegalStateException: Failed to load ApplicationContext
        at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:203)
        at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:109)
        at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:75)

        ...snip..

        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
        Caused by: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from relative location [TransferServiceTests-context.xml]
        Offending resource: class path resource [com/springsource/samples/banking/service/TransferServiceTransactionManagementTests-context.xml]; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [com/springsource/samples/banking/service/TransferServiceTests-context.xml]; nested exception is java.lang.NoClassDefFoundError: org/aopalliance/intercept/MethodInterceptor
        at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68)
        at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85)

        Show
        robertgloverjr Robert Glover added a comment - After the first dependency is resolved, the follow error occurs: java.lang.NoClassDefFoundError: org/springframework/context/ApplicationContext at java.lang.Class.getDeclaredConstructors0(Native Method) The missing jar file for this second error is: org.springframework.context-sources-2.5.4.A.jar After that is fixed, the 3rd error that appears is: ERROR [org.springframework.test.context.TestContextManager] - <Caught exception while allowing TestExecutionListener [org.springframewor[email protected]474b5f4a] to prepare test instance [com.springsource.sa[email protected]255d17d7] > java.lang.IllegalStateException: Failed to load ApplicationContext at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:203) at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:109) at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:75) ...snip.. at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) Caused by: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from relative location [TransferServiceTests-context.xml] Offending resource: class path resource [com/springsource/samples/banking/service/TransferServiceTransactionManagementTests-context.xml] ; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [com/springsource/samples/banking/service/TransferServiceTests-context.xml] ; nested exception is java.lang.NoClassDefFoundError: org/aopalliance/intercept/MethodInterceptor at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68) at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85)
        Hide
        mlippert Martin Lippert added a comment -

        This project has moved its issue management to GitHub Issues:
        https://github.com/spring-projects/spring-ide/issues

        Therefore we closed the majority of old issues, like this one here. If you think this issue is still valid and should be fixed or worked on, please feel free to file it as a new issue on GitHub (using the link above).

        Show
        mlippert Martin Lippert added a comment - This project has moved its issue management to GitHub Issues: https://github.com/spring-projects/spring-ide/issues Therefore we closed the majority of old issues, like this one here. If you think this issue is still valid and should be fixed or worked on, please feel free to file it as a new issue on GitHub (using the link above).

          People

          • Assignee:
            Unassigned
            Reporter:
            robertgloverjr Robert Glover
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: