camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Abhijith <abhiteju2...@gmail.com>
Subject Deploying Camel in Jboss
Date Wed, 17 Aug 2011 13:18:25 GMT
Hi,

I am new to camel apache, I was able to create prototype in tomcat.
But I need to deploy the same in Jboss 5.1.0 GA, JDK 1.5 and I am using
Camel 2.6.0 with camel-jboss-2.3.0.jar:
I am getting following error:
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:61)
        at
org.apache.camel.component.servlet.ServletComponent.disconnect(ServletComponent.java:147)
        at
org.apache.camel.component.http.HttpEndpoint.disconnect(HttpEndpoint.java:153)
        at
org.apache.camel.component.http.HttpConsumer.doStop(HttpConsumer.java:58)
        at org.apache.camel.impl.ServiceSupport.stop(ServiceSupport.java:98)
        at
org.apache.camel.impl.ServiceSupport.stop(ServiceSupport.java:122)
        at
org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:108)
        at
org.apache.camel.util.ServiceHelper.stopAndShutdownService(ServiceHelper.java:162)
        at
org.apache.camel.impl.RouteService.stopChildService(RouteService.java:244)
        at org.apache.camel.impl.RouteService.doStop(RouteService.java:186)
        at org.apache.camel.impl.ServiceSupport.stop(ServiceSupport.java:98)
        at
org.apache.camel.impl.ServiceSupport.stop(ServiceSupport.java:122)
        at
org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:108)
        at
org.apache.camel.util.ServiceHelper.stopAndShutdownService(ServiceHelper.java:162)
        at
org.apache.camel.impl.DefaultCamelContext.shutdownServices(DefaultCamelContext.java:1551)
        at
org.apache.camel.impl.DefaultCamelContext.shutdownServices(DefaultCamelContext.java:1573)
        at
org.apache.camel.impl.DefaultCamelContext.shutdownServices(DefaultCamelContext.java:1561)

So I tried upgrading Camel to 2.8 and JDK to 1.6 and tried deploying in
JBoss server, but got following error:
java.lang.NoSuchFieldError: log
 at
org.apache.camel.jboss.JBossPackageScanClassResolver.find(JBossPackageScanClassResolver.java:23)[jar:file:/servers/jboss-5.1.0.GA/server/default/deploy/SpringCamelDemo.war!/WEB-INF/lib/camel-jboss-2.3.0.jar:2.2.0]
 at
org.apache.camel.impl.DefaultPackageScanClassResolver.find(DefaultPackageScanClassResolver.java:209)[jar:file:/servers/jboss-5.1.0.GA/server/default/deploy/SpringCamelDemo.war!/WEB-INF/lib/camel-core-2.8.0.jar:2.8.0]
 at
org.apache.camel.impl.DefaultPackageScanClassResolver.findAnnotated(DefaultPackageScanClassResolver.java:137)[jar:file:/servers/jboss-5.1.0.GA/server/default/deploy/SpringCamelDemo.war!/WEB-INF/lib/camel-core-2.8.0.jar:2.8.0]
 at
org.apache.camel.impl.converter.AnnotationTypeConverterLoader.load(AnnotationTypeConverterLoader.java:114)[jar:file:/servers/jboss-5.1.0.GA/server/default/deploy/SpringCamelDemo.war!/WEB-INF/lib/camel-core-2.8.0.jar:2.8.0]
 at
org.apache.camel.impl.converter.BaseTypeConverterRegistry.loadTypeConverters(BaseTypeConverterRegistry.java:406)[jar:file:/servers/jboss-5.1.0.GA/server/default/deploy/SpringCamelDemo.war!/WEB-INF/lib/camel-core-2.8.0.jar:2.8.0]
 at
org.apache.camel.impl.converter.DefaultTypeConverter.doStart(DefaultTypeConverter.java:42)[jar:file:/servers/jboss-5.1.0.GA/server/default/deploy/SpringCamelDemo.war!/WEB-INF/lib/camel-core-2.8.0.jar:2.8.0]
 at
org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:67)[jar:file:/servers/jboss-5.1.0.GA/server/default/deploy/SpringCamelDemo.war!/WEB-INF/lib/camel-core-2.8.0.jar:2.8.0]
 at
org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:54)[jar:file:/servers/jboss-5.1.0.GA/server/default/deploy/SpringCamelDemo.war!/WEB-INF/lib/camel-core-2.8.0.jar:2.8.0]
 at
org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:56)[jar:file:/servers/jboss-5.1.0.GA/server/default/deploy/SpringCamelDemo.war!/WEB-INF/lib/camel-core-2.8.0.jar:2.8.0]
 at
org.apache.camel.impl.DefaultCamelContext.startServices(DefaultCamelContext.java:1629)[jar:file:/servers/jboss-5.1.0.GA/server/default/deploy/SpringCamelDemo.war!/WEB-INF/lib/camel-core-2.8.0.jar:2.8.0]
 at
org.apache.camel.impl.DefaultCamelContext.addService(DefaultCamelContext.java:911)[jar:file:/servers/jboss-5.1.0.GA/server/default/deploy/SpringCamelDemo.war!/WEB-INF/lib/camel-core-2.8.0.jar:2.8.0]
 at
org.apache.camel.impl.DefaultCamelContext.getTypeConverter(DefaultCamelContext.java:994)[jar:file:/servers/jboss-5.1.0.GA/server/default/deploy/SpringCamelDemo.war!/WEB-INF/lib/camel-core-2.8.0.jar:2.8.0]
 at
org.apache.camel.impl.DefaultCamelContext.getTypeConverterRegistry(DefaultCamelContext.java:1011)[jar:file:/servers/jboss-5.1.0.GA/server/default/deploy/SpringCamelDemo.war!/WEB-INF/lib/camel-core-2.8.0.jar:2.8.0]
 at
org.apache.camel.impl.DefaultCamelContext.forceLazyInitialization(DefaultCamelContext.java:1957)[jar:file:/servers/jboss-5.1.0.GA/server/default/deploy/SpringCamelDemo.war!/WEB-INF/lib/camel-core-2.8.0.jar:2.8.0]
 at
org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1433)[jar:file:/servers/jboss-5.1.0.GA/server/default/deploy/SpringCamelDemo.war!/WEB-INF/lib/camel-core-2.8.0.jar:2.8.0]
 at
org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1346)[jar:file:/servers/jboss-5.1.0.GA/server/default/deploy/SpringCamelDemo.war!/WEB-INF/lib/camel-core-2.8.0.jar:2.8.0]
 at
org.apache.camel.spring.SpringCamelContext.doStart(SpringCamelContext.java:160)[jar:file:/servers/jboss-5.1.0.GA/server/default/deploy/SpringCamelDemo.war!/WEB-INF/lib/camel-spring-2.8.0.jar:2.8.0]
 at
org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:67)[jar:file:/servers/jboss-5.1.0.GA/server/default/deploy/SpringCamelDemo.war!/WEB-INF/lib/camel-core-2.8.0.jar:2.8.0]
 at
org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:54)[jar:file:/servers/jboss-5.1.0.GA/server/default/deploy/SpringCamelDemo.war!/WEB-INF/lib/camel-core-2.8.0.jar:2.8.0]
 at
org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1324)[jar:file:/servers/jboss-5.1.0.GA/server/default/deploy/SpringCamelDemo.war!/WEB-INF/lib/camel-core-2.8.0.jar:2.8.0]
 at
org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:204)[jar:file:/servers/jboss-5.1.0.GA/server/default/deploy/SpringCamelDemo.war!/WEB-INF/lib/camel-spring-2.8.0.jar:2.8.0]
 at
org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:99)[jar:file:/servers/jboss-5.1.0.GA/server/default/deploy/SpringCamelDemo.war!/WEB-INF/lib/camel-spring-2.8.0.jar:2.8.0]
 at
org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:240)[jar:file:/servers/jboss-5.1.0.GA/server/default/deploy/SpringCamelDemo.war!/WEB-INF/lib/camel-spring-2.8.0.jar:2.8.0]
 at
org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97)[jar:file:/servers/jboss-5.1.0.GA/server/default/deploy/SpringCamelDemo.war!/WEB-INF/lib/spring-context-3.0.5.RELEASE.jar:3.0.5.RELEASE]
 at
org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:303)[jar:file:/servers/jboss-5.1.0.GA/server/default/deploy/SpringCamelDemo.war!/WEB-INF/lib/spring-context-3.0.5.RELEASE.jar:3.0.5.RELEASE]
 at
org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:911)[jar:file:/servers/jboss-5.1.0.GA/server/default/deploy/SpringCamelDemo.war!/WEB-INF/lib/spring-context-3.0.5.RELEASE.jar:3.0.5.RELEASE]
 at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:428)[jar:file:/servers/jboss-5.1.0.GA/server/default/deploy/SpringCamelDemo.war!/WEB-INF/lib/spring-context-3.0.5.RELEASE.jar:3.0.5.RELEASE]
 at
org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)[jar:file:/servers/jboss-5.1.0.GA/server/default/deploy/SpringCamelDemo.war!/WEB-INF/lib/spring-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
 at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)[jar:file:/servers/jboss-5.1.0.GA/server/default/deploy/SpringCamelDemo.war!/WEB-INF/lib/spring-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
 at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)[jar:file:/servers/jboss-5.1.0.GA/server/default/deploy/SpringCamelDemo.war!/WEB-INF/lib/spring-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
 at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3910)[jar:file:/servers/jboss-5.1.0.GA/server/default/deploy/jbossweb.sar/jbossweb.jar!/:5.1.0.GA
(build: SVNTag=JBoss_5_1_0_GA date=200905221053)]
 at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4393)[jar:file:/servers/jboss-5.1.0.GA/server/default/deploy/jbossweb.sar/jbossweb.jar!/:5.1.0.GA
(build: SVNTag=JBoss_5_1_0_GA date=200905221053)]
 at
org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:310)[jar:file:/servers/jboss-5.1.0.GA/server/default/deploy/jbossweb.sar/jboss-web-service.jar!/:5.1.0.GA
(build: SVNTag=JBoss_5_1_0_GA date=200905221053)]
 at
org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)[jar:file:/servers/jboss-5.1.0.GA/server/default/deploy/jbossweb.sar/jboss-web-service.jar!/:5.1.0.GA
(build: SVNTag=JBoss_5_1_0_GA date=200905221053)]
 at
org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)[jar:file:/servers/jboss-5.1.0.GA/common/lib/jboss.jar!/:5.1.0.GA
(build: SVNTag=JBoss_5_1_0_GA date=200905221053)]
 at
org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)[jar:file:/servers/jboss-5.1.0.GA/common/lib/jboss.jar!/:5.1.0.GA
(build: SVNTag=JBoss_5_1_0_GA date=200905221053)]
 at
org.jboss.web.deployers.WebModule.start(WebModule.java:97)[jar:file:/servers/jboss-5.1.0.GA/common/lib/jboss.jar!/:5.1.0.GA
(build: SVNTag=JBoss_5_1_0_GA date=200905221053)]
 at sun.reflect.NativeMet

Please let me know the dependencies of Camel using JDK 1.5 and JBoss 5.1.0
GA.
Here is my application context:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:camel="http://camel.apache.org/schema/spring"
        xsi:schemaLocation="
         http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
         http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd">


       
                <bean id="jbossResolver"
class="org.apache.camel.jboss.JBossPackageScanClassResolver" />

        <bean id="urlProcessor" class="URLProcessor" />
       

        <camelContext xmlns="http://camel.apache.org/schema/spring">
                <dataFormats>
                        <json id="addressVO" library="Jackson"
                                unmarshalTypeName="AddressServiceRequestVO"
/>
                        <json id="mapUrlResponseVO" library="Jackson"
                                unmarshalTypeName="MapURLResponseVO" />
                </dataFormats>
               

   
       
                <route>
               
                        <from uri="servlet:///mapUrl" />
                        <unmarshal ref="addressVO" />
                        <process ref="urlProcessor" />
                        <marshal ref="mapUrlResponseVO" />
                </route>
               
       
        </camelContext>


</beans>


Thanks,
Abhi 

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

Mime
View raw message