thesamim wrote:


willem.jiang wrote:
camel-example-spring-javaconfig      Fails with:
package org.apache.camel.osgi does not exist
package org.apache.camel.spring.javaconfig does not exist
package org.springframework.osgi.context does not exist

«  [hide part of quote]
It only work with Spring 3.x
Really? I can ran just fine with Spring 2.5.6 if I run "mvn camel:run" but
getting:
Please use mvn dependency:list to check the pom.xml dependency, you will find there are some dependency jars of Spring 3.0.0.RELEASE.

C:\opensource\apache-camel-2.2.0\examples\camel-example-spring-javaconfig>ant
camel.dot
Buildfile: build.xml

build.classes:

build.test:

build:

run:
     [java] java.lang.NoClassDefFoundError:
org/apache/camel/spring/javaconfig/Main
     [java] Caused by: java.lang.ClassNotFoundException:
org.apache.camel.spring.javaconfig.Main
     [java]     at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
     [java]     at java.security.AccessController.doPrivileged(Native
Method)
     [java]     at
java.net.URLClassLoader.findClass(URLClassLoader.java:190)
     [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
     [java]     at
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
     [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
     [java] Could not find the main class:
org.apache.camel.spring.javaconfig.Main.  Program will exit.
     [java] Exception in thread "main"

[Had to do some tweaking on the POM but that's for another post.]
You need put the camel-spring-javaconfig jar into the class path first.
I will head to fix this issue on camel trunk today.

Willem

Reply via email to