camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From boday <ben.o...@initekconsulting.com>
Subject Re: Using Camel with Quartz Schedular
Date Tue, 21 Jun 2011 23:27:55 GMT
with Camel 2.5.0, make sure you are using spring 3.0.4.RELEASE and have these
dependencies in your pom.xml file...camel-core, camel-quartz and
camel-stream

I just ran your example and it worked fine with Camel 2.5...


diwakar.sapan wrote:
> 
> Thanks. I really appreciate your help.
> 
> After going through that stuffs that you pointed out I came up with the
> following code-
> 
> public static void main(String args[]) throws Exception {	
> 		CamelContext context = new DefaultCamelContext();
> 		context.addRoutes(new RouteBuilder() {
> 			@Override
> 			public void configure() {
> 				from(
> 						"quartz://myTimer?trigger.repeatInterval=5&trigger.repeatCount=1")
> 						.setBody().simple("I was fired at ").to("stream:out");
> 			}
> 		});
> 		context.start();
> 		Thread.sleep(10000);
> 		context.stop();
> 	}
> 
> And my pom.xml looks like
> 
> <dependency>
> 	    <groupId>org.apache.camel</groupId>
> 	    <artifactId>camel-core</artifactId>
> 	    <version>2.5.0</version>
> 	</dependency>
> 
>     <dependency>
> 		<groupId>org.apache.camel</groupId>
> 		<artifactId>camel-quartz</artifactId>
> 		<version>2.5.0</version>
> 	</dependency>
> 
> But I am getting this error-
> INFO: JMX enabled. Using ManagedManagementStrategy.
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/springframework/aop/support/AopUtils
> 	at
> org.springframework.jmx.export.assembler.MetadataMBeanInfoAssembler.checkManagedBean(MetadataMBeanInfoAssembler.java:105)
> 	at
> org.springframework.jmx.export.assembler.AbstractMBeanInfoAssembler.getMBeanInfo(AbstractMBeanInfoAssembler.java:63)
> 	at
> org.apache.camel.management.DefaultManagementAgent.register(DefaultManagementAgent.java:220)
> 	at
> org.apache.camel.management.DefaultManagementAgent.register(DefaultManagementAgent.java:211)
> 	at
> org.apache.camel.management.ManagedManagementStrategy.manageNamedObject(ManagedManagementStrategy.java:75)
> 	at
> org.apache.camel.management.ManagedManagementStrategy.manageObject(ManagedManagementStrategy.java:68)
> 	at
> org.apache.camel.management.DefaultManagementLifecycleStrategy.onContextStart(DefaultManagementLifecycleStrategy.java:165)
> 	at
> org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1270)
> 	at
> org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1213)
> 	at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:65)
> 	at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:52)
> 	at
> org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1191)
> 	at com.cockpitconfig.schedulars.TestScheduler.main(TestScheduler.java:24)
> Caused by: java.lang.ClassNotFoundException:
> org.springframework.aop.support.AopUtils
> 	at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
> 	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
> 	... 13 more
> 
> Do you have an idea where I'm missing. Do I have to make changes in any
> other file except these 2.
> 


-----
Ben O'Day
IT Consultant -http://consulting-notes.com

--
View this message in context: http://camel.465427.n5.nabble.com/Using-Camel-with-Quartz-Schedular-tp4506527p4512343.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message