You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Don Doffe <fo...@gmail.com> on 2011/06/18 05:24:38 UTC

JBoss 5.1.0, Camel, Spring, Servlet endpoint - Anyone succeded?

Hi,

Just wanted to double check if anyone is actually running Camel in JBoss
5.1.0 using Spring DSL and servlet endpoints.

I have an opportunity to introduce camel as an integration technology used
in our corporation but I'm having troubles with the simplest scenario
(albeit the real one).

JBoss 5.1.0 is a hard constraint.

What I have tried:

Camel 2.7.2. Problem with slf4j. I was not able to solve it.
Camel 2.5.0. Problem with Spring context being initialized prior
instantiating a servlet, thus the set up fails.

Has anyone succeeded with running camel in JBoss 5.1.0?

Thank you.

--
View this message in context: http://camel.465427.n5.nabble.com/JBoss-5-1-0-Camel-Spring-Servlet-endpoint-Anyone-succeded-tp4500558p4500558.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: JBoss 5.1.0, Camel, Spring, Servlet endpoint - Anyone succeded?

Posted by jazinner <ja...@jasonshepherd.net>.
When trying to use camel-jboss with camel-core 2.7.2, also got the error you
described, [1].

I managed to resolve the issue by changing the camel-jboss source code, and
dependencies in the pom.

I changed this part of the pom.xml:

		<dependency>
			<groupId>org.apache.camel</groupId>
			<artifactId>camel-core</artifactId>
			<version>${camel-version}</version>
			<scope>provided</scope>
		</dependency>

to

		<dependency>
			<groupId>org.apache.camel</groupId>
			<artifactId>camel-core</artifactId>
			<version>2.7.2</version>
			<scope>provided</scope>
		</dependency>

And in JBossPackageScanClassResolver.java:

I changed the find() method to use log.isDebugEnabled(), and log.debug(),
instead of log.isTraceEnabled(), and log.trace().

See this JIRA issue I raised for this:
https://issues.apache.org/jira/browse/CAMEL-4127

[1] Caused by: java.lang.NoSuchFieldError: log
        at
org.apache.camel.jboss.JBossPackageScanClassResolver.find(JBossPackageScanClassResolver.java:23

--
View this message in context: http://camel.465427.n5.nabble.com/JBoss-5-1-0-Camel-Spring-Servlet-endpoint-Anyone-succeded-tp4500558p4508968.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: JBoss 5.1.0, Camel, Spring, Servlet endpoint - Anyone succeded?

Posted by Don Doffe <fo...@gmail.com>.
Jean-Baptiste,

I have tried camel 2.6.0, but as Richard noted it depends on the Spring 3,
hence the issue with the Servlet loading order.


--
View this message in context: http://camel.465427.n5.nabble.com/JBoss-5-1-0-Camel-Spring-Servlet-endpoint-Anyone-succeded-tp4500558p4501033.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: JBoss 5.1.0, Camel, Spring, Servlet endpoint - Anyone succeded?

Posted by Don Doffe <fo...@gmail.com>.
Jean Baptiste,

thank you very much for that, much obliged.
Attaching the project.
http://camel.465427.n5.nabble.com/file/n4501000/camel-prototype-1.zip
camel-prototype-1.zip 

Don.

--
View this message in context: http://camel.465427.n5.nabble.com/JBoss-5-1-0-Camel-Spring-Servlet-endpoint-Anyone-succeded-tp4500558p4501000.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: JBoss 5.1.0, Camel, Spring, Servlet endpoint - Anyone succeded?

Posted by Claus Ibsen <cl...@gmail.com>.
On Mon, Jun 20, 2011 at 1:36 AM, Don Doffe <fo...@gmail.com> wrote:
> Thanks.
>
> I guess in my situation using Fuse distribution is more preferrable
> (enterprise affiliation is an important question for our management).
>
> Do you think you could find time to look if anything can be done about
> https://issues.apache.org/jira/browse/CAMEL-3549 CAMEL-3549 ?
>

I have created a ticket to track this request
http://fusesource.com/issues/browse/MR-472

> --
> View this message in context: http://camel.465427.n5.nabble.com/JBoss-5-1-0-Camel-Spring-Servlet-endpoint-Anyone-succeded-tp4500558p4504646.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Re: JBoss 5.1.0, Camel, Spring, Servlet endpoint - Anyone succeded?

Posted by Don Doffe <fo...@gmail.com>.
Thanks.

I guess in my situation using Fuse distribution is more preferrable
(enterprise affiliation is an important question for our management).

Do you think you could find time to look if anything can be done about 
https://issues.apache.org/jira/browse/CAMEL-3549 CAMEL-3549 ?

--
View this message in context: http://camel.465427.n5.nabble.com/JBoss-5-1-0-Camel-Spring-Servlet-endpoint-Anyone-succeded-tp4500558p4504646.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: JBoss 5.1.0, Camel, Spring, Servlet endpoint - Anyone succeded?

Posted by Claus Ibsen <cl...@gmail.com>.
On Sat, Jun 18, 2011 at 2:59 PM, Don Doffe <fo...@gmail.com> wrote:
> Claus,
>
> I got it downloaded and deployed. It seems to present the same issue with
> the servlets - i.e. Spring Context being instantiated by a listener before
> the CamelServlet is available.
>
> Searching the database for the JIRA number.
>
> BTW, does Fuse 2.7 use slf4j ?
>

Yes Fuse 2.7 is based on Apache Camel 2.7.
Thats the idiom, eg aligning versions between Apache and Fuse.


> --
> View this message in context: http://camel.465427.n5.nabble.com/JBoss-5-1-0-Camel-Spring-Servlet-endpoint-Anyone-succeded-tp4500558p4501283.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Re: JBoss 5.1.0, Camel, Spring, Servlet endpoint - Anyone succeded?

Posted by Don Doffe <fo...@gmail.com>.
Claus,

I got it downloaded and deployed. It seems to present the same issue with
the servlets - i.e. Spring Context being instantiated by a listener before
the CamelServlet is available.

Searching the database for the JIRA number.

BTW, does Fuse 2.7 use slf4j ?

--
View this message in context: http://camel.465427.n5.nabble.com/JBoss-5-1-0-Camel-Spring-Servlet-endpoint-Anyone-succeded-tp4500558p4501283.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: JBoss 5.1.0, Camel, Spring, Servlet endpoint - Anyone succeded?

Posted by Don Doffe <fo...@gmail.com>.
I believe the issue is  https://issues.apache.org/jira/browse/CAMEL-3549
CAMEL-3549 

--
View this message in context: http://camel.465427.n5.nabble.com/JBoss-5-1-0-Camel-Spring-Servlet-endpoint-Anyone-succeded-tp4500558p4501295.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: JBoss 5.1.0, Camel, Spring, Servlet endpoint - Anyone succeded?

Posted by Claus Ibsen <cl...@gmail.com>.
On Sat, Jun 18, 2011 at 12:14 PM, Don Doffe <fo...@gmail.com> wrote:
> Claus,
>
> I'm not sure JBoss 6 is an option for us. Our project goes live before 6.0
> confirmed as the commercially supported platform and for me to introduce a
> technology it got to have vendor support.
>
> That brings me to the next question - what would be the best way to obtain a
> quote on technical and production support from fusesource? Is it just the
> "Buy Now" option?
>

There is also a FuseSource Camel release that is based on the 2.6
release but with a lot of fixes and improvements backported.
If the bug you need is already fixed in Fuse MR 2.6 you may look that
as an option to use. Its free and open source.

Fuse MR 2.6 branch is using the commons-logging so that works out of
the box with JBoss. And its also still supporting JDK 1.5.
We will continue to keep it as that.

You can grab the release straight from the maven repo:
http://repo.fusesource.com/nexus/content/groups/public/org/apache/camel/apache-camel/2.6.0-fuse-01-15/

The release notes is here
http://fusesource.com/wiki/display/ProdInfo/FUSE+Mediation+Router+v2.6+Release+Notes

btw if you have a list of JIRAs you need to be in the Camel release,
then you can post it here.
And we can check which has already been backported, and if some is
missing we can look into what it would take to backport those as well.


> Thank you.
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/JBoss-5-1-0-Camel-Spring-Servlet-endpoint-Anyone-succeded-tp4500558p4501077.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Re: JBoss 5.1.0, Camel, Spring, Servlet endpoint - Anyone succeded?

Posted by Claus Ibsen <cl...@gmail.com>.
On Sat, Jun 18, 2011 at 12:14 PM, Don Doffe <fo...@gmail.com> wrote:
> Claus,
>
> I'm not sure JBoss 6 is an option for us. Our project goes live before 6.0
> confirmed as the commercially supported platform and for me to introduce a
> technology it got to have vendor support.
>

Yeah I assume upgrading a major release of JBoss isn't something
that's always possible.
But it would maybe be nice to know what the situation is on JBoss 6.x.

Unfortunately its slf4j to blame a bit to do a binary incompatible
releases of 1.5/1.6. Would IMHO be better if they did a slf4j 2.0
instead.

At least with log4j thinks just works :)
But unfortunately someone started to crate logging abstractions and we
end up with the bit of mess we are today.
Okay thats just my personal rant.

And since Camel 2.7 all (well mos of them) the Camel components is
build against sfl4j 1.6, then it would take to re compile all the
source code against slf4j 1.5.

> That brings me to the next question - what would be the best way to obtain a
> quote on technical and production support from fusesource? Is it just the
> "Buy Now" option?
>

I suggest to use the contact us form
http://fusesource.com/contact

And you will be contacted and can discuss about what you are looking for.



> Thank you.
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/JBoss-5-1-0-Camel-Spring-Servlet-endpoint-Anyone-succeded-tp4500558p4501077.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Re: JBoss 5.1.0, Camel, Spring, Servlet endpoint - Anyone succeded?

Posted by Don Doffe <fo...@gmail.com>.
Claus,

I'm not sure JBoss 6 is an option for us. Our project goes live before 6.0
confirmed as the commercially supported platform and for me to introduce a
technology it got to have vendor support.

That brings me to the next question - what would be the best way to obtain a
quote on technical and production support from fusesource? Is it just the
"Buy Now" option?

Thank you.

--
View this message in context: http://camel.465427.n5.nabble.com/JBoss-5-1-0-Camel-Spring-Servlet-endpoint-Anyone-succeded-tp4500558p4501077.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: JBoss 5.1.0, Camel, Spring, Servlet endpoint - Anyone succeded?

Posted by Claus Ibsen <cl...@gmail.com>.
On Sat, Jun 18, 2011 at 11:55 AM, Don Doffe <fo...@gmail.com> wrote:
> Richard,
>
> thank you.
>
> I downgraded to camel 2.2.0/ spring 2.5.6 and prototype works now.
>
> I'll continue with it to see if I can implement what's required and
> introduce it internally.
>
> Would be nice though to get the latest and greatest at some point.
>

I wonder if JBoss 6.x provides slf4j 1.6 ?
Notice you need to use camel-jboss6 JAR when using JBoss 6.x.

Also I suggest to contact JBoss and see if they want to provide a
JBoss 5.1.x that supports SLF4j 1.6.x.


> --
> View this message in context: http://camel.465427.n5.nabble.com/JBoss-5-1-0-Camel-Spring-Servlet-endpoint-Anyone-succeded-tp4500558p4501054.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Re: JBoss 5.1.0, Camel, Spring, Servlet endpoint - Anyone succeded?

Posted by Don Doffe <fo...@gmail.com>.
Richard,

thank you.

I downgraded to camel 2.2.0/ spring 2.5.6 and prototype works now.

I'll continue with it to see if I can implement what's required and
introduce it internally.

Would be nice though to get the latest and greatest at some point.

--
View this message in context: http://camel.465427.n5.nabble.com/JBoss-5-1-0-Camel-Spring-Servlet-endpoint-Anyone-succeded-tp4500558p4501054.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: JBoss 5.1.0, Camel, Spring, Servlet endpoint - Anyone succeded?

Posted by Richard Kettelerij <ri...@gmail.com>.
Correction: ContextLoaderServlet is removed in Spring 3.x, not Camel 3.x :)

On Sat, Jun 18, 2011 at 11:05 AM, Richard Kettelerij <
richardkettelerij@gmail.com> wrote:

> 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.
>>>
>>
>

Re: JBoss 5.1.0, Camel, Spring, Servlet endpoint - Anyone succeded?

Posted by Richard Kettelerij <ri...@gmail.com>.
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.
>>
>

Re: JBoss 5.1.0, Camel, Spring, Servlet endpoint - Anyone succeded?

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
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.AbstractCamelContextFactoryBean] (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.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.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.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.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
> Sent from the Camel - Users mailing list archive at Nabble.com.

Re: JBoss 5.1.0, Camel, Spring, Servlet endpoint - Anyone succeded?

Posted by Don Doffe <fo...@gmail.com>.
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.AbstractCamelContextFactoryBean] (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.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.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.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.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
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: JBoss 5.1.0, Camel, Spring, Servlet endpoint - Anyone succeded?

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Don,

Could you try the following:

1/ in your JBoss server directory (for instance server/default), go to 
deployers/jbossweb.deployer
2/ edit META-INF/war-deployers-jboss-beans.xml
3/ search for a bean named WarClassLoaderDeployer
4/ add org.slf4j in the filteredPackages property

Regards
JB

On 06/18/2011 08:18 AM, Don Doffe wrote:
> Thank you for your prompt answer.
>
> I have seen the link and tried to implement this. I did not manage to fix
> it.
>
> Recompiling is out of question as it goes against some of the internal
> requirements I need to satisfy.
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/JBoss-5-1-0-Camel-Spring-Servlet-endpoint-Anyone-succeded-tp4500558p4500712.html
> Sent from the Camel - Users mailing list archive at Nabble.com.

Re: JBoss 5.1.0, Camel, Spring, Servlet endpoint - Anyone succeded?

Posted by Don Doffe <fo...@gmail.com>.
Thank you for your prompt answer.

I have seen the link and tried to implement this. I did not manage to fix
it.

Recompiling is out of question as it goes against some of the internal
requirements I need to satisfy.



--
View this message in context: http://camel.465427.n5.nabble.com/JBoss-5-1-0-Camel-Spring-Servlet-endpoint-Anyone-succeded-tp4500558p4500712.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: JBoss 5.1.0, Camel, Spring, Servlet endpoint - Anyone succeded?

Posted by Taariq Levack <ta...@gmail.com>.
Hi

I haven't used jboss in some time now and none of these components together yet. 
I just want to point out that getting slf4j to work in an app server that ships a different version of slf4j takes a little bit of fiddling.
What works on glassfish is to exclude slf4j in maven and add the jars manually to lib/endorsed  or whatever. I think jboss' is common/lib or something like that. 

I also quickly found a tut[1] for you getting lockback and jboss working together, I'm sure you can find others if you need to and I'm sure it will run there.
Probably worst case you have to build camel yourself with the version jboss likes. Fast install will help a lot, but I would look around at how others got slf4j working in jboss first.

[1] http://jaitechwriteups.blogspot.com/2010/04/eclipse-logback-plugin-with-jboss-as.html

On 18 Jun 2011, at 5:24 AM, Don Doffe <fo...@gmail.com> wrote:

> Hi,
> 
> Just wanted to double check if anyone is actually running Camel in JBoss
> 5.1.0 using Spring DSL and servlet endpoints.
> 
> I have an opportunity to introduce camel as an integration technology used
> in our corporation but I'm having troubles with the simplest scenario
> (albeit the real one).
> 
> JBoss 5.1.0 is a hard constraint.
> 
> What I have tried:
> 
> Camel 2.7.2. Problem with slf4j. I was not able to solve it.
> Camel 2.5.0. Problem with Spring context being initialized prior
> instantiating a servlet, thus the set up fails.
> 
> Has anyone succeeded with running camel in JBoss 5.1.0?
> 
> Thank you.
> 
> --
> View this message in context: http://camel.465427.n5.nabble.com/JBoss-5-1-0-Camel-Spring-Servlet-endpoint-Anyone-succeded-tp4500558p4500558.html
> Sent from the Camel - Users mailing list archive at Nabble.com.