Announcement Announcement Module
No announcement yet.
cannot run integration samples Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • cannot run integration samples


    I face a problem. I want to run the spring integration sample for basic\file. I got a local copy of the github respository and I created a maven project in Eclipse Juno for the subproject basic\file maven project.

    When I do a mvn test I get the following error:

    org.apache.maven.surefire.util.SurefireReflectionE xception: java.lang.reflect.InvocationTargetException; nested exception is java.lang.reflect.InvocationTargetException: null
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.maven.surefire.util.ReflectionUtils.inv okeMethodWithArray(
    at org.apache.maven.surefire.booter.ProviderFactory$P roviderProxy.invoke(
    at org.apache.maven.surefire.booter.SurefireStarter.i nvokeProvider(
    at org.apache.maven.surefire.booter.SurefireStarter.r unSuitesInProcessWhenForked( 07)
    at org.apache.maven.surefire.booter.ForkedBooter.main (
    Caused by: java.lang.NoClassDefFoundError: org/springframework/context/ApplicationContext
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
    at java.lang.Class.getMethod0(Unknown Source)
    at java.lang.Class.getMethod(Unknown Source)
    at org.apache.maven.surefire.util.ReflectionUtils.try GetMethod(
    at org.apache.maven.surefire.common.junit3.JUnit3Test Checker.isSuiteOnly(
    at org.apache.maven.surefire.common.junit3.JUnit3Test Checker.isValidJUnit3Test( 0)
    at org.apache.maven.surefire.common.junit3.JUnit3Test Checker.accept(
    at org.apache.maven.surefire.common.junit4.JUnit4Test Checker.accept(
    at org.apache.maven.surefire.util.DefaultDirectorySca nner.locateTestClasses(DefaultDirectoryScanner.jav a:80)
    at anClassPath(
    at voke(
    ... 9 more
    Caused by: java.lang.ClassNotFoundException: org.springframework.context.ApplicationContext
    at$ Source)
    at$ Source)
    at Method)
    at Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    ... 21 more

    I do not understand. All the dependencies are correct. I have no compile errors and still it does not work.

    How do I get these samples to work properly?

    Somehow my jar dependencies were corrupt. I deleted my local repository and did a mvn package. It retrieved them correct now so it works.
    Last edited by ihullu; May 23rd, 2013, 09:12 AM.