0

Hi I am learning Camel (using Camel in action). When I try to run a Maven command in cmd e.g. mvn compile exec:java -Dexec.mainClass=camelinaction.GreetMeBean

I get an error:

[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.1.1:java (default-cli) on project chapter2: An exception occured while executing the Java class. camelinaction.GreetMeBean -> [Help 1]

Apparently I am missing a plugin, but I don't understand how to get this plugin.

Kay
  • 799
  • 1
  • 11
  • 29
  • The errormessage says **An exception occured while executing the Java class. camelinaction.GreetMeBean** The whole message could help to find the reason why this is not working – Frank Feb 22 '16 at 14:11
  • Hi, the whole error is at --> https://shrib.com/23uzUjIhfEf1YWn – Kay Feb 22 '16 at 15:32
  • Can you post your `pom.xml` since logs are indicating that `camel-spring` dependency is missing _java.lang.ClassNotFoundException: org.apache.camel.spring.Main_ – Mahendra Feb 22 '16 at 15:47

1 Answers1

1

You need to run that command in the right directory, eg do

cd chapter2
cd spring
mvn compile exec:java -Dexec.mainClass=camelinaction.GreetMeBean
Claus Ibsen
  • 56,060
  • 7
  • 50
  • 65