camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Kettelerij <richardkettele...@gmail.com>
Subject Re: JBoss 5.1.0, Camel, Spring, Servlet endpoint - Anyone succeded?
Date Sat, 18 Jun 2011 09:05:56 GMT
Hi Don,

I'm running Camel in JBoss 5.1.0 with multiple servlet
endpoints. Although not with the latest Camel release (we're currently on
2.2.0 but plan to upgrade) so I can't comment on the SLF4J issue. Please
keep us posted on this issue though, once resolved we can add some
documentation describing the solution to the website. This benefits other
users as well. Also have you tried the SLF4J mailing list (
http://www.slf4j.org/mailing-lists.html)?

Concerning the servlet and Spring context issue: this is a know problem.
It's fixed in Camel 2.7 (by https://issues.apache.org/jira/browse/CAMEL-3549).
However older versions of Camel require a different approach. This approach
is described on http://camel.apache.org/servlet under "Sample when using
Spring 2.x". This requires the use of Spring 2.x though, since it depends
on ContextLoaderServlet which is removed in Camel 3.x.

Regards,
Richard

On Sat, Jun 18, 2011 at 9:42 AM, Jean-Baptiste Onofré <jb@nanthrax.net>wrote:

> Hi Don,
>
> just to be sure, could you try with Camel 2.6.0 ?
> Could you provide the code (at least where you define the CamelContext and
> RouteBuilder) of your camel-prototype-1-0.1 ?
>
> I'm gonna make a try on my side (deploying a camel route into JBoss using
> war packaging).
>
> Regards
> JB
>
>
> On 06/18/2011 09:33 AM, Don Doffe wrote:
>
>> Jean-Baptiste,
>>
>> Thank you for the suggestion. I have done that. Though I no longer get
>> complaints about the version mismatch it fails with
>>
>> NoSuchFieldError: log
>>
>> Despite the fact that that I have following jar in the lib dir:
>>
>> log4j-1.2.16.jar
>> slf4j-api-1.6.1.jar
>> slf4j-log4j12-1.6.1.jar
>>
>> The detailed knowledge of the JBoss deloyers indicate that you might be
>> using Camel with JBoss yourself. Is it so?
>>
>> Here is the log excerpt:
>>
>> 2011-06-18 17:22:29,292 INFO
>> [org.jboss.web.tomcat.service.**deployers.TomcatDeployment] (main)
>> deploy,
>> ctxPath=/camel-prototype-1-0.1
>> 2011-06-18 17:22:29,370 INFO
>> [org.apache.catalina.core.**ContainerBase.[jboss.web].[**
>> localhost].[/camel-prototype-**1-0.1]]
>> (main) Initializing Spring root WebApplicationContext
>> 2011-06-18 17:22:29,604 INFO
>> [org.apache.camel.spring.**handler.CamelNamespaceHandler] (main) OSGi
>> environment not detected.
>> 2011-06-18 17:22:30,072 INFO
>> [org.apache.camel.core.xml.**AbstractCamelContextFactoryBea**n] (main)
>> Using
>> custom PackageScanClassResolver:
>> org.apache.camel.jboss.**JBossPackageScanClassResolver@**19bfff0b
>> 2011-06-18 17:22:30,259 INFO  [STDOUT] (main) [
>> main] ContextLoader                  ERROR Context initialization failed
>> org.springframework.beans.**factory.BeanCreationException: Error creating
>> bean
>> with name 'template': Initialization of bean failed; nested exception is
>> org.springframework.beans.**factory.BeanCreationException: Error creating
>> bean
>> with name 'camel-1': Invocation of init method failed; nested exception is
>> java.lang.NoSuchFieldError: log
>>        at
>> org.springframework.beans.**factory.support.**
>> AbstractAutowireCapableBeanFac**tory.doCreateBean(**
>> AbstractAutowireCapableBeanFac**tory.java:527)[jar:file:/C:/**
>> opt/jboss-eap-5.1.0/jboss-eap-**5.1/jboss-as/server/default/**
>> deploy/camel-prototype-1-0.1.**war!/WEB-INF/lib/spring-beans-**
>> 3.0.5.RELEASE.jar:3.0.5.**RELEASE]
>>        at
>> org.springframework.beans.**factory.support.**
>> AbstractAutowireCapableBeanFac**tory.createBean(**
>> AbstractAutowireCapableBeanFac**tory.java:456)[jar:file:/C:/**
>> opt/jboss-eap-5.1.0/jboss-eap-**5.1/jboss-as/server/default/**
>> deploy/camel-prototype-1-0.1.**war!/WEB-INF/lib/spring-beans-**
>> 3.0.5.RELEASE.jar:3.0.5.**RELEASE]
>>
>>
>> --
>> View this message in context: http://camel.465427.n5.nabble.**
>> com/JBoss-5-1-0-Camel-Spring-**Servlet-endpoint-Anyone-**
>> succeded-tp4500558p4500794.**html<http://camel.465427.n5.nabble.com/JBoss-5-1-0-Camel-Spring-Servlet-endpoint-Anyone-succeded-tp4500558p4500794.html>
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>

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