camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gert Villemos <gville...@yahoo.de>
Subject Re: Camel and Tomcat
Date Wed, 16 Feb 2011 21:20:30 GMT

I must be doing something wrong.

I configure a servlet component in a route. I use an applicationContext.xml
file to load the application / routes. The route is defined as (an extract);

<route>
	<from uri="servlet:///humsat/commands?servletName=CamelServlet"/>
	<to uri="bean:commandgenerator" />
</route>



The web.xml is as shown below;

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID"
version="2.5">
	<display-name>Humsat (Example Hummingbird Satellite)</display-name>
	
	<listener>
	
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
	</listener>
	
	 <servlet>
	    <servlet-name>CamelServlet</servlet-name>
	    <servlet-class>
	        org.apache.camel.component.servlet.CamelHttpTransportServlet
	    </servlet-class>	    
	  </servlet>
	
	  <servlet-mapping>
	    <servlet-name>CamelServlet</servlet-name>
	    <url-pattern>/humsat/*</url-pattern>
	  </servlet-mapping>
	
</web-app>


When I deploy the WAR in tomcat I get the exception shown below. I'm not
sure which part of the stack trace is really of relevance. I have checked
that the library containing the Spring JmsUtil (spring-jms 3.0.2) is
included in the libs of the deployed WAR, and when I extract the jar the
class is there. I have tried to copy the spring-jms library into the Tomcat
library folder, but to no wain.

What am I doing wrong?



---- Tomcat stdout ------------------



2011-02-16 21:54:34 Commons Daemon procrun stdout initialized
INFO - ContextLoader.initWebApplicationContext(187) | Root
WebApplicationContext: initialization started
INFO - AbstractApplicationContext.prepareRefresh(454) | Refreshing Root
WebApplicationContext: startup date [Wed Feb 16 22:00:25 CET 2011]; root of
context hierarchy
INFO - XmlBeanDefinitionReader.loadBeanDefinitions(315) | Loading XML bean
definitions from ServletContext resource [/WEB-INF/applicationContext.xml]
INFO - XmlBeanDefinitionReader.loadBeanDefinitions(315) | Loading XML bean
definitions from class path resource [humsat-parameters.xml]
INFO - CamelNamespaceHandler.init(131) |
camel-osgi.jar/camel-spring-osgi.jar not detected in classpath
INFO - XmlBeanDefinitionReader.loadBeanDefinitions(315) | Loading XML bean
definitions from class path resource [humsat-validator.xml]
INFO - XmlBeanDefinitionReader.loadBeanDefinitions(315) | Loading XML bean
definitions from class path resource [humsat-commands.xml]
INFO - XmlBeanDefinitionReader.loadBeanDefinitions(315) | Loading XML bean
definitions from class path resource [commandgenerator.xml]
INFO - XmlBeanDefinitionReader.loadBeanDefinitions(315) | Loading XML bean
definitions from class path resource [commandreleaser.xml]
INFO - XmlBeanDefinitionReader.loadBeanDefinitions(315) | Loading XML bean
definitions from class path resource [taskexecutor.xml]
INFO - XmlBeanDefinitionReader.loadBeanDefinitions(315) | Loading XML bean
definitions from class path resource [logging.xml]
INFO - XmlBeanDefinitionReader.loadBeanDefinitions(315) | Loading XML bean
definitions from class path resource [jsonpublish.xml]
INFO - DefaultListableBeanFactory.preInstantiateSingletons(538) |
Pre-instantiating singletons in
org.springframework.beans.factory.support.DefaultListableBeanFactory@ba679e:
defining beans
[org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,temperature.at.cpu.board,voltage.of.battery,state.of.video.stream,state.of.payload,state.of.payload.deployment,main.satellite.switch,state.of.transmitter,longitude,latitude,elevation,time,delta.time,simulatorRoutes,temperature.at.cpu.board.warning,temperature.at.cpu.board.error,state.of.battery.error,state.of.video.stream.error,state.of.payload.error,validatorRoutes,deploy.payload,deploypayload.check.disable,deploypayload.check.limit,deploypayload.initial.value,deploypayload.check.enable,set.payload.state,payloadstate.argument,payloadstate.check.disable,payloadstate.check.limit,payload.initial.value,payloadstate.check.enable,set.transmitter.state,transmitterstate.argument,transmitterstate.check.disable,transmitterstate.check.limit,transmitterstate.initial.value,transmitterstate.check.enable,send.diagnosis.report,set.time,argument.time,definitions,commandgenerator,springloader,buffer,commandgeneratorRoutes,commandreleaser,stateBuffer,commandreleaserRoutes,taskexecutor,taskexecutorRoutes,loggingRoutes,jsonmapper,jsonPublishRoutes,producer,consumerTemplate,context:beanPostProcessor,context];
root of factory hierarchy
INFO - DefaultCamelContext.doStart(983) | Apache Camel 2.4.0 (CamelContext:
context) is starting
INFO - DefaultCamelContext.createManagementStrategy(1699) | JMX enabled.
Using ManagedManagementStrategy.
INFO - AnnotationTypeConverterLoader.load(66) | Found 5 packages with 17
@Converter classes to load
INFO - DefaultTypeConverter.loadTypeConverters(394) | Loaded 155 type
converters in 0.583 seconds
INFO - Slf4jLog.info(55) | jetty-7.1.4.v20100610
INFO - Slf4jLog.info(55) | JSONCommented is deprecated
INFO - Slf4jLog.info(55) | timeout=240000
INFO - Slf4jLog.info(55) | interval=0
INFO - Slf4jLog.info(55) | maxInterval=30000
INFO - Slf4jLog.info(55) | multiFrameInterval=1500
INFO - Slf4jLog.info(55) | filters=null
INFO - Slf4jLog.info(55) | Started SelectChannelConnector@0.0.0.0:8086
INFO - Slf4jLog.info(55) | JSONCommented is deprecated
INFO - FailoverTransport.doReconnect(756) | Successfully connected to
tcp://localhost:61616
INFO - FailoverTransport.doReconnect(756) | Successfully connected to
tcp://localhost:61616
INFO - FailoverTransport.doReconnect(756) | Successfully connected to
tcp://localhost:61616
INFO - FailoverTransport.doReconnect(756) | Successfully connected to
tcp://localhost:61616
ERROR - ContextLoader.initWebApplicationContext(220) | Context
initialization failed
org.apache.camel.RuntimeCamelException: java.lang.IllegalArgumentException:
Cannot find the deployed servlet, please configure the ServletComponent or
configure a org.apache.camel.component.servlet.CamelHttpTransportServlet
servlet in web.xml 
	at
org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1126)
	at
org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:103)
	at
org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:231)
	at
org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97)
	at
org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:301)
	at
org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:888)
	at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:426)
	at
org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
	at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
	at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
	at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4350)
	at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4816)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:140)
	at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:810)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:788)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:558)
	at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:934)
	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:529)
	at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1377)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at
org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown
Source)
	at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown Source)
	at
org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1470)
	at
org.apache.catalina.manager.HTMLManagerServlet.upload(HTMLManagerServlet.java:318)
	at
org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:191)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at
org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:186)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:242)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:203)
	at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:562)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:108)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
	at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:379)
	at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:242)
	at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:259)
	at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:281)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalArgumentException: Cannot find the deployed
servlet, please configure the ServletComponent or configure a
org.apache.camel.component.servlet.CamelHttpTransportServlet servlet in
web.xml 
	at
org.apache.camel.component.servlet.ServletComponent.getCamelServlet(ServletComponent.java:55)
	at
org.apache.camel.component.servlet.ServletComponent.connect(ServletComponent.java:109)
	at
org.apache.camel.component.http.HttpEndpoint.connect(HttpEndpoint.java:148)
	at
org.apache.camel.component.http.HttpConsumer.doStart(HttpConsumer.java:51)
	at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:56)
	at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:53)
	at
org.apache.camel.impl.DefaultCamelContext.startServices(DefaultCamelContext.java:1189)
	at
org.apache.camel.impl.DefaultCamelContext.doStartRoutes(DefaultCamelContext.java:1357)
	at
org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:1261)
	at
org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:952)
	at
org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:203)
	at
org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:101)
	... 47 more
Exception in thread "DefaultMessageListenerContainer-1"
java.lang.NoClassDefFoundError: org/springframework/jms/support/JmsUtils
	at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.clearResources(DefaultMessageListenerContainer.java:1039)
	at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:907)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException:
org.springframework.jms.support.JmsUtils
	at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1672)
	at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1517)
	... 3 more
Exception in thread "DefaultMessageListenerContainer-1"
java.lang.NoClassDefFoundError: org/springframework/jms/support/JmsUtils
	at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.clearResources(DefaultMessageListenerContainer.java:1039)
	at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:907)
	at java.lang.Thread.run(Unknown Source)
Exception in thread "DefaultMessageListenerContainer-1"
java.lang.NoClassDefFoundError: org/springframework/jms/support/JmsUtils
	at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.clearResources(DefaultMessageListenerContainer.java:1039)
	at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:907)
	at java.lang.Thread.run(Unknown Source)
Exception in thread "DefaultMessageListenerContainer-1"
java.lang.NoClassDefFoundError: org/springframework/jms/support/JmsUtils
	at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.clearResources(DefaultMessageListenerContainer.java:1039)
	at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:907)
	at java.lang.Thread.run(Unknown Source)
Exception in thread "InactivityMonitor WriteCheck"
java.lang.NoClassDefFoundError:
org/apache/activemq/transport/InactivityMonitor$3
	at
org.apache.activemq.transport.InactivityMonitor.writeCheck(InactivityMonitor.java:136)
	at
org.apache.activemq.transport.InactivityMonitor$2.run(InactivityMonitor.java:110)
	at
org.apache.activemq.thread.SchedulerTimerTask.run(SchedulerTimerTask.java:33)
	at java.util.TimerThread.mainLoop(Unknown Source)
	at java.util.TimerThread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException:
org.apache.activemq.transport.InactivityMonitor$3
	at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1672)
	at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1517)
	... 5 more
Exception in thread "ActiveMQ Transport: tcp://localhost/127.0.0.1:61616"
java.lang.NoClassDefFoundError: org/apache/activemq/util/ServiceStopper
	at org.apache.activemq.util.ServiceSupport.stop(ServiceSupport.java:67)
	at
org.apache.activemq.transport.tcp.TcpTransport.stop(TcpTransport.java:500)
	at
org.apache.activemq.transport.InactivityMonitor.stop(InactivityMonitor.java:121)
	at
org.apache.activemq.transport.TransportFilter.stop(TransportFilter.java:64)
	at
org.apache.activemq.transport.WireFormatNegotiator.stop(WireFormatNegotiator.java:91)
	at org.apache.activemq.util.ServiceSupport.dispose(ServiceSupport.java:43)
	at
org.apache.activemq.transport.failover.FailoverTransport.handleTransportFailure(FailoverTransport.java:202)
	at
org.apache.activemq.transport.failover.FailoverTransport$3.onException(FailoverTransport.java:174)
	at
org.apache.activemq.transport.TransportFilter.onException(TransportFilter.java:99)
	at
org.apache.activemq.transport.WireFormatNegotiator.onException(WireFormatNegotiator.java:160)
	at
org.apache.activemq.transport.InactivityMonitor.onException(InactivityMonitor.java:254)
	at
org.apache.activemq.transport.TransportSupport.onException(TransportSupport.java:97)
	at
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:190)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException:
org.apache.activemq.util.ServiceStopper
	at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1672)
	at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1517)
	... 14 more
Exception in thread "ActiveMQ Transport: tcp://localhost/127.0.0.1:61616"
java.lang.NoClassDefFoundError: org/apache/activemq/util/ServiceStopper
	at org.apache.activemq.util.ServiceSupport.stop(ServiceSupport.java:67)
	at
org.apache.activemq.transport.tcp.TcpTransport.stop(TcpTransport.java:500)
	at
org.apache.activemq.transport.InactivityMonitor.stop(InactivityMonitor.java:121)
	at
org.apache.activemq.transport.TransportFilter.stop(TransportFilter.java:64)
	at
org.apache.activemq.transport.WireFormatNegotiator.stop(WireFormatNegotiator.java:91)
	at org.apache.activemq.util.ServiceSupport.dispose(ServiceSupport.java:43)
	at
org.apache.activemq.transport.failover.FailoverTransport.handleTransportFailure(FailoverTransport.java:202)
	at
org.apache.activemq.transport.failover.FailoverTransport$3.onException(FailoverTransport.java:174)
	at
org.apache.activemq.transport.TransportFilter.onException(TransportFilter.java:99)
	at
org.apache.activemq.transport.WireFormatNegotiator.onException(WireFormatNegotiator.java:160)
	at
org.apache.activemq.transport.InactivityMonitor.onException(InactivityMonitor.java:254)
	at
org.apache.activemq.transport.TransportSupport.onException(TransportSupport.java:97)
	at
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:190)
	at java.lang.Thread.run(Unknown Source)
Exception in thread "ActiveMQ Transport: tcp://localhost/127.0.0.1:61616"
java.lang.NoClassDefFoundError: org/apache/activemq/util/ServiceStopper
	at org.apache.activemq.util.ServiceSupport.stop(ServiceSupport.java:67)
	at
org.apache.activemq.transport.tcp.TcpTransport.stop(TcpTransport.java:500)
	at
org.apache.activemq.transport.InactivityMonitor.stop(InactivityMonitor.java:121)
	at
org.apache.activemq.transport.TransportFilter.stop(TransportFilter.java:64)
	at
org.apache.activemq.transport.WireFormatNegotiator.stop(WireFormatNegotiator.java:91)
	at org.apache.activemq.util.ServiceSupport.dispose(ServiceSupport.java:43)
	at
org.apache.activemq.transport.failover.FailoverTransport.handleTransportFailure(FailoverTransport.java:202)
	at
org.apache.activemq.transport.failover.FailoverTransport$3.onException(FailoverTransport.java:174)
	at
org.apache.activemq.transport.TransportFilter.onException(TransportFilter.java:99)
	at
org.apache.activemq.transport.WireFormatNegotiator.onException(WireFormatNegotiator.java:160)
	at
org.apache.activemq.transport.InactivityMonitor.onException(InactivityMonitor.java:254)
	at
org.apache.activemq.transport.TransportSupport.onException(TransportSupport.java:97)
	at
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:190)
	at java.lang.Thread.run(Unknown Source)
Exception in thread "ActiveMQ Transport: tcp://localhost/127.0.0.1:61616"
java.lang.NoClassDefFoundError: org/apache/activemq/util/ServiceStopper
	at org.apache.activemq.util.ServiceSupport.stop(ServiceSupport.java:67)
	at
org.apache.activemq.transport.tcp.TcpTransport.stop(TcpTransport.java:500)
	at
org.apache.activemq.transport.InactivityMonitor.stop(InactivityMonitor.java:121)
	at
org.apache.activemq.transport.TransportFilter.stop(TransportFilter.java:64)
	at
org.apache.activemq.transport.WireFormatNegotiator.stop(WireFormatNegotiator.java:91)
	at org.apache.activemq.util.ServiceSupport.dispose(ServiceSupport.java:43)
	at
org.apache.activemq.transport.failover.FailoverTransport.handleTransportFailure(FailoverTransport.java:202)
	at
org.apache.activemq.transport.failover.FailoverTransport$3.onException(FailoverTransport.java:174)
	at
org.apache.activemq.transport.TransportFilter.onException(TransportFilter.java:99)
	at
org.apache.activemq.transport.WireFormatNegotiator.onException(WireFormatNegotiator.java:160)
	at
org.apache.activemq.transport.InactivityMonitor.onException(InactivityMonitor.java:254)
	at
org.apache.activemq.transport.TransportSupport.onException(TransportSupport.java:97)
	at
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:190)
	at java.lang.Thread.run(Unknown Source)

-- 
View this message in context: http://camel.465427.n5.nabble.com/Camel-and-Tomcat-tp3386793p3388420.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message