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

  • cannot run integration samples

    Hello,

    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
    java.lang.reflect.InvocationTargetException
    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(ReflectionUtils.java:164)
    at org.apache.maven.surefire.booter.ProviderFactory$P roviderProxy.invoke(ProviderFactory.java:110)
    at org.apache.maven.surefire.booter.SurefireStarter.i nvokeProvider(SurefireStarter.java:175)
    at org.apache.maven.surefire.booter.SurefireStarter.r unSuitesInProcessWhenForked(SurefireStarter.java:1 07)
    at org.apache.maven.surefire.booter.ForkedBooter.main (ForkedBooter.java:68)
    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(ReflectionUtils.java:57)
    at org.apache.maven.surefire.common.junit3.JUnit3Test Checker.isSuiteOnly(JUnit3TestChecker.java:65)
    at org.apache.maven.surefire.common.junit3.JUnit3Test Checker.isValidJUnit3Test(JUnit3TestChecker.java:6 0)
    at org.apache.maven.surefire.common.junit3.JUnit3Test Checker.accept(JUnit3TestChecker.java:55)
    at org.apache.maven.surefire.common.junit4.JUnit4Test Checker.accept(JUnit4TestChecker.java:52)
    at org.apache.maven.surefire.util.DefaultDirectorySca nner.locateTestClasses(DefaultDirectoryScanner.jav a:80)
    at org.apache.maven.surefire.junit4.JUnit4Provider.sc anClassPath(JUnit4Provider.java:174)
    at org.apache.maven.surefire.junit4.JUnit4Provider.in voke(JUnit4Provider.java:83)
    ... 9 more
    Caused by: java.lang.ClassNotFoundException: org.springframework.context.ApplicationContext
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown 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?

    [SOLVED]
    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.
Working...
X