The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

nscode (1) [Avatar] Offline
#1
I am having some trouble with running examples on a fresh install. I am wondering if this is something to do with the versions not being supported yet, or did I miss something during configuration. The examples provided with Camel itself seam to run fine (console and sql are the ones I've tried). The versions I have are:

Apache Maven 3.1.0 (893ca28a1da9d5f51ac03827af98bb730128f9f2; 2013-06-28 04:15:32+0200)
Maven home: c:apache-maven-3.1.0
Java version: 1.7.0_25, vendor: Oracle Corporation
Java home: c:Javajdk1.7.0_25jre
Default locale: en_US, platform encoding: Cp1250
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
Camel in action source code updated for Apache Camel 2.11.1


Output for file-copy example is:


[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Camel in Action :: Chapter 1 :: File Copy Example 1.0.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> camel-maven-plugin:2.11.1:run (default-cli) @ chapter1-file-copy >>>
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ chapter1-file-copy ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.5:compile (default-compile) @ chapter1-file-copy ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @ chapter1-file-copy ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:apache-camel-2.11.1examplescamelinaction-sourcechapter1file-copysrc est esources
[INFO]
[INFO] --- maven-compiler-plugin:2.5:testCompile (default-testCompile) @ chapter1-file-copy ---
[INFO] No sources to compile
[INFO]
[INFO] <<< camel-maven-plugin:2.11.1:run (default-cli) @ chapter1-file-copy <<<
[INFO]
[INFO] --- camel-maven-plugin:2.11.1:run (default-cli) @ chapter1-file-copy ---
[INFO] Using org.apache.camel.spring.Main to initiate a CamelContext
[ERROR] *************************************
[ERROR] Error occurred while running main from: org.apache.camel.spring.Main
[ERROR]
java.lang.ClassNotFoundException: org.apache.camel.spring.Main
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:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.apache.camel.maven.RunMojo$1.run(RunMojo.java:453)
at java.lang.Thread.run(Thread.java:724)
[ERROR] *************************************
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.191s
[INFO] Finished at: Wed Jul 24 20:08:58 CEST 2013
[INFO] Final Memory: 15M/224M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.camel:camel-maven-plugin:2.11.1:run (default-cli) on project chapter1-file-copy: null: MojoExecutionException:
org.apache.camel.spring.Main -> [Help 1]



==========================
For the order-router-full:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5:testCompile (default-testCompile) on project chapter11-order-router-full: Compilation failure: Compilation failure:
[ERROR] bootstrap class path not set in conjunction with -source 1.6
[ERROR] C:apache-camel-2.11.1examplescamelinaction-sourcechapter11order-router-fullsrc estjavacamelinactionOrderRouterTest.java:[22,35] error:
package org.apache.camel.test.spring does not exist
[ERROR] C:apache-camel-2.11.1examplescamelinaction-sourcechapter11order-router-fullsrc estjavacamelinactionOrderRouterTest.java:[27,38] error:
cannot find symbol
[ERROR] symbol: class CamelSpringTestSupport
[ERROR] C:apache-camel-2.11.1examplescamelinaction-sourcechapter11order-router-fullsrc estjavacamelinactionOrderRouterTest.java:[31,4] error: method does not override or implement a method from a supertype
[ERROR] C:apache-camel-2.11.1examplescamelinaction-sourcechapter11order-router-fullsrc estjavacamelinactionOrderRouterTest.java:[38,8] error: cannot find symbol
[ERROR] symbol: variable template
[ERROR] location: class OrderRouterTest
[ERROR] C:apache-camel-2.11.1examplescamelinaction-sourcechapter11order-router-fullsrc estjavacamelinactionOrderRouterTest.java:[45,23] error:
cannot find symbol
[ERROR] symbol: variable template
[ERROR] location: class OrderRouterTest
[ERROR] C:apache-camel-2.11.1examplescamelinaction-sourcechapter11order-router-fullsrc estjavacamelinactionOrderRouterTest.java:[46,8] error: cannot find symbol
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5:testCompile (default-testCompile) on project chapter11-order-router-full: Compilation failure
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
davsclaus (413) [Avatar] Offline
#2
Re: Problem running examples
Can you try with Maven 3.0.4.
575296 (1) [Avatar] Offline
#3
hi Claus,

Am having trouble with running examples provided with the book source code (camelinaction2). Error message in Intellij Idea IDE is : INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.191s
[INFO] Finished at: Wed Jul 24 20:08:58 CEST 2013
[INFO] Final Memory: 15M/224M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.camel:camel-maven-plugin:2.11.1:run (default-cli) on project chapter1-file-copy: null: MojoExecutionException:
org.apache.camel.spring.Main -> [Help 1]

Maven version am using - 3.5.2

Thanks,
Dixit