4 Replies Latest reply on Apr 16, 2014 1:18 PM by Steve Leach

    Failed to execute goal org.apache.camel:camel-maven-plugin in JBDS

    Steve Leach Newbie

      Hi all

       

      I created a Fuse Project in JBoss Developer Studio 7.1.1 GA (New project > Fuse Tooling > Fuse Project). The clean and install goals seem to work fine, but the camel:run goal is failing...

       

      [ERROR] Failed to execute goal org.apache.camel:camel-maven-plugin:2.12.0.redhat-610379:run (default-cli) on project camel-activemq2: null: MojoExecutionException: org/springframework/context/support/AbstractApplicationContext: org.springframework.context.support.AbstractApplicationContext -> [Help 1]

      org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.camel:camel-maven-plugin:2.12.0.redhat-610379:run (default-cli) on project camel-activemq2: null

       

      Stack trace is at the bottom of this post, but the root exception is a ClassNotFound on org.springframework.context.support.AbstractApplicationContext

       

      This class is in the Maven dependencies for the project, in the spring-context-3.2.8-RELEASE.jar

       

      Any ideas what I'm doing wrong?

       

      Cheers

      Steve

       

      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
      at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
      at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
      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.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
      at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
      at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)

      Caused by: org.apache.maven.plugin.MojoExecutionException

      at org.apache.camel.maven.RunMojo.execute(RunMojo.java:532)
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
      ... 19 more

      Caused by: java.lang.NoClassDefFoundError: org/springframework/context/support/AbstractApplicationContext

      at java.lang.Class.getDeclaredMethods0(Native Method)
      at java.lang.Class.privateGetDeclaredMethods(Class.java:2531)
      at java.lang.Class.getMethod0(Class.java:2774)
      at java.lang.Class.getMethod(Class.java:1663)
      at org.apache.camel.maven.RunMojo$1.run(RunMojo.java:485)
      at java.lang.Thread.run(Thread.java:744)

      Caused by: java.lang.ClassNotFoundException: org.springframework.context.support.AbstractApplicationContext

      at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
      at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
      ... 6 more