camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mohammed Yousuff <mail2u...@gmail.com>
Subject Simple Camel Code inside JBOSS App
Date Sun, 22 Aug 2010 13:13:52 GMT
i am trying to execute a simple camel code, transferring file from one to
another inside my MDB calss. However i am getting following exception when
the addRouter method was called....


My friend was telling me that Camel cannot be loaded inside JBOSS 4.2
Server?. is it true??.... can you please let me know a simple code which can
be executed inside the MDB....

thanks again.

Code Snipped;

CamelContext context = new JbossCamelContext();

System.out.println(context.getName());

        // add our route to the CamelContext
        context.addRoutes(new RouteBuilder() {
            public void configure() {
                from("file:data/inbox?noop=true").to("file:data/outbox");
            }
        });



Exception:


18:32:58,750 INFO  [STDOUT] I am a NEW MDB-- Say Hello!!!
18:33:00,203 INFO  [DefaultCamelContext] JMX enabled. Using
InstrumentationLifecycleStrategy.
18:33:01,109 INFO  [STDOUT] camel-1
18:33:02,171 INFO  [STDOUT] java.lang.NoSuchMethodError:
org.apache.camel.CamelContext.addRoutes(Lorg/apache/camel/RoutesBuilder;)V
18:33:02,171 INFO  [STDOUT] at
com.passion4java.jms.ServerMDB.onMessage(ServerMDB.java:52)
18:33:02,171 INFO  [STDOUT] at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
18:33:02,187 INFO  [STDOUT] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
18:33:02,187 INFO  [STDOUT] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
18:33:02,187 INFO  [STDOUT] at
java.lang.reflect.Method.invoke(Method.java:592)
18:33:02,187 INFO  [STDOUT] at
org.jboss.invocation.Invocation.performCall(Invocation.java:345)
18:33:02,187 INFO  [STDOUT] at
org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:475)
18:33:02,203 INFO  [STDOUT] at
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:149)
18:33:02,203 INFO  [STDOUT] at
org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
18:33:02,203 INFO  [STDOUT] at
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106)
18:33:02,218 INFO  [STDOUT] at
org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:158)
18:33:02,218 INFO  [STDOUT] at
org.jboss.ejb.plugins.MessageDrivenTxInterceptorBMT.invoke(MessageDrivenTxInterceptorBMT.java:32)
18:33:02,234 INFO  [STDOUT] at
org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:101)
18:33:02,234 INFO  [STDOUT] at
org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:94)
18:33:02,250 INFO  [STDOUT] at
org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
18:33:02,250 INFO  [STDOUT] at
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
18:33:02,250 INFO  [STDOUT] at
org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:389)
18:33:02,250 INFO  [STDOUT] at
org.jboss.ejb.Container.invoke(Container.java:873)
18:33:02,265 INFO  [STDOUT] at
org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:1077)
18:33:02,265 INFO  [STDOUT] at
org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1379)
18:33:02,265 INFO  [STDOUT] at
org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:256)
18:33:02,265 INFO  [STDOUT] at
org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:904)
18:33:02,281 INFO  [STDOUT] at
org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:160)
18:33:02,281 INFO  [STDOUT] at
org.jboss.mq.SpySession.run(SpySession.java:333)
18:33:02,296 INFO  [STDOUT] at
org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:180)
18:33:02,296 INFO  [STDOUT] at
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743)
18:33:02,296 INFO  [STDOUT] at java.lang.Thread.run(Thread.java:595)




Regards,

Yousuff

My Tech Blog: http://passion4java.blogspot.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message