Re: Managing the Camel libraries and Setting up the Camel Classpath

2012-08-14 Thread Henryk Konsek
Hi guys. > and I think no for 2) (Classes in WAR 2 should not see classes in WAR 1). 100% no. Each web application has it's own classloader [1]. Guru, you want to send this message to some Tomcat user group. You basically ask us how to deploy large application on Tomcat. I'm sure that people at

problem in aggregation

2012-08-14 Thread vasukfuse
Hi All i have to aggregate two XML files which are available at different times.but i am getting error in out put file. here i am providing my code error details public void configure() { try { DataFormat bindy = new

Re: Managing the Camel libraries and Setting up the Camel Classpath

2012-08-14 Thread Christian Schneider
Hi Guru, you can move the camel dependencies to the tomcat classloader so they are available to all wars. Quite often though this leads to problems. For example if you want to update a war file to a newer versionof some libs it can get very complex very soon. So I think you should also look

Re: Managing the Camel libraries and Setting up the Camel Classpath

2012-08-14 Thread Gnanaguru S
Thank you Christian, I was caught up with out of memory error in tomcat. /* " SEVERE: Error waiting for multi-thread deployment of WAR files to complete java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: Java heap space "*/ *It was resolved by setting up JAVA_OPTS as 128m -X

Re: Managing the Camel libraries and Setting up the Camel Classpath

2012-08-14 Thread Gnanaguru S
Thanks Henry, I wont go with the thought of Inter WAR. I will get back with a solution once I find it with Tomcat forums. Regards Guru @gnanagurus -- View this message in context: http://camel.465427.n5.nabble.com/Managing-the-Camel-libraries-and-Setting-up-the-Camel-Classpath-in-Tomcat-tp

Re: Managing the Camel libraries and Setting up the Camel Classpath

2012-08-14 Thread Gnanaguru S
Hi Christian, Thanks for your effort of getting this elaborate answer. And gladly I am using Camel seriously with ServiceMix. Karaf provides a great console to manage features, And I love that model. I started with Camel & Tomcat to test it, And most Interestingly this issue came up and I thoug

Re: Http4 component throws useless NPE if request body is String (instead of InputStream)

2012-08-14 Thread pmcb55
Hi Claus - we're using the latest version 2.10.0. Simply running the JUnit test I provided should illustrate the problem - the 'System.out.println()' displays 'null' for both the exception description, and the exception cause - not particularly helpful, obviously! Cheers, Pat. -- View this m

Re: Managing the Camel libraries and Setting up the Camel Classpath

2012-08-14 Thread Henryk Konsek
> you can move the camel dependencies to the tomcat classloader so they are > available to all wars. Quite often though this leads to problems. For > example if you want to update > a war file to a newer versionof some libs it can get very complex very soon. I would say even more - putting applica

Re: Http4 component throws useless NPE if request body is String (instead of InputStream)

2012-08-14 Thread Willem jiang
You should get the response code from the exception message if the server send the status code back. -- Willem Jiang FuseSource Web: http://www.fusesource.com (http://www.fusesource.com/) Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English) http://jnn.j

Re: Http4 component throws useless NPE if request body is String (instead of InputStream)

2012-08-14 Thread pmcb55
Hi Willem, If you look again at the source code I attached (it will run as a very simple JUnit test) - you'll see that the code gets the exception information, but that information is a useless NullPointerException. This exception gives no clue to the fact that the actual exception is a type-conve

Using Simple header notation to define where to send a message

2012-08-14 Thread AlanFoster
Hi, I'm wondering if it's possible to define a header to set up where an exchange should be send to, then access it through simple within the "to" uri. For instance I have one route which sets up what service I need to send a message to. Then the other message sends it to the required service, th

Re: Using Simple header notation to define where to send a message

2012-08-14 Thread Claus Ibsen
Hi See the FAQ http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html On Tue, Aug 14, 2012 at 1:52 PM, AlanFoster wrote: > Hi, > > I'm wondering if it's possible to define a header to set up where an > exchange should be send to, then access it through simple within the "to" > uri. > > For

delay on Exception is not working

2012-08-14 Thread Sri
Hi, I am using camel onException() cluase with redeliveries(3).delay(1000). How ever I can see in the logs that it is retrying but its not considering the delay. Here is my route. onException(RestClient500SeriesException.class) .maximumRedeliver

Re: delay on Exception is not working

2012-08-14 Thread Claus Ibsen
Maybe its the AMQ broker the retrys. Are you sure its Camel, and that the onException is being triggered. We got a zillion tests in camel, so I think its something wrong on your end. On Tue, Aug 14, 2012 at 4:31 PM, Sri wrote: > Hi, > > I am using camel onException() cluase with redeliveries(3).

Exception in Exchange is null

2012-08-14 Thread Hilde
Hello Readers! Inside the route combined with the DefaultErrorHandler we are using exception policies. When an exception is thrown that part is even called but the exception object is null: .onException(Exception.class).handled(true) .process(new Processor() { @Override

Re: Exception in Exchange is null

2012-08-14 Thread Claus Ibsen
The exception is null because you use handled(true). If you want to get the caused exception, then its stored as a property on the exchange. Exception cause = exchange.getProperty(Exchange.CAUGHT_EXCEPTION, Exception.class); On Tue, Aug 14, 2012 at 4:35 PM, Hilde wrote: > Hello Readers! > > I

Re: delay on Exception is not working

2012-08-14 Thread Sri
is there any other way that I can use delay , I am trying to use redelivery policy and I am using spring java Configuration for instatiating beans @Bean RedeliveryPolicy dispatcherRedeliveryPolicy(){ return policy; } onException(RestClient500SeriesException.class).redeliveryPolicyRef(dispatcher

Re: Exception in Exchange is null

2012-08-14 Thread Hilde
Thanks you Claus, but I have just checked that the exception object is still null even though handled(false) [default]. -- View this message in context: http://camel.465427.n5.nabble.com/Exception-in-Exchange-is-null-tp5717324p5717329.html Sent from the Camel - Users mailing list archive at Na

Re: Exception in Exchange is null

2012-08-14 Thread Claus Ibsen
On Tue, Aug 14, 2012 at 4:58 PM, Hilde wrote: > Thanks you Claus, but I have just checked that the exception object > is still null even though handled(false) [default]. > Yeah its null in both situations, as the error handler is kicking in. handled = false, just mean that when the error handler

Is this routing behaviour as expected?

2012-08-14 Thread Babak Vahdat
Hi I'm still a bit confused regarding a question by another thread and would like to ask you about the point I'm missing here. The following test passes (e.g. using the trunk code or 2.10.0 release) which I can follow and understand: public class TwoRoutesTest extends CamelTestSupport { @Te

Re: delay on Exception is not working

2012-08-14 Thread Sri
Its redeliveryDelay() on Exception not delay() the following routes works onException(RestClient500SeriesException.class) .maximumRedeliveries(retries).redeliveryDelay(retryDelay) .process(dispatch5

Re: Exception in Exchange is null

2012-08-14 Thread Hilde
Thanks for you patient. Could you please give me some advice how we can log the stack trace subsequently? We are using the camel log component after the exchange was gone through JMS: log:errorLog?level=ERROR&showAll=true&multiline=true&showStackTrace=true However the output inside the file look

Re: Exception in Exchange is null

2012-08-14 Thread Claus Ibsen
Hi The log component has many options http://camel.apache.org/log See the showCaughtException option. On Tue, Aug 14, 2012 at 5:28 PM, Hilde wrote: > Thanks for you patient. > > Could you please give me some advice how we can log the stack trace > subsequently? We > are using the camel log com

Re: Is this routing behaviour as expected?

2012-08-14 Thread Raul Kripalani
Yes, it is working as expected. If you don't set a custom Aggregation Strategy on the Splitter, as of Camel 2.3, it will return the original body by default. Regards, *Raúl Kripalani* *Principal Consultant | FuseSource Corp. r...@fusesource.com | fusesource.com skype

JSON - Jackson return list rather than POJO

2012-08-14 Thread ychawla
Hello All, I am unmarshalling data using Jackson. My dataFormats bean is set up as such: However, my return value isn't a simple POJO, it is a list of POJO's. For example this is a sample stripped down JSON response: [{"last_name":"xxx",,"first_name":"Heather

Re: Using Simple header notation to define where to send a message

2012-08-14 Thread ychawla
Hello, You can also try using a recipient list and only have a single recipient on it. It can function as a dynamic router when you dynamically set a header. Thanks, Yogesh -- View this message in context: http://camel.465427.n5.nabble.com/Using-Simple-header-notation-to-define-where-to-send-

Re: Is this routing behaviour as expected?

2012-08-14 Thread Babak Vahdat
Am 14.08.12 19:45 schrieb "Raul Kripalani" unter : >Yes, it is working as expected. > >If you don't set a custom Aggregation Strategy on the Splitter, as of >Camel >2.3, it will return the original body by default. Thanks for the clarification, which I missed by the Splitter documentation of Wik

Re: exposing different operations under same service in camel + cxf routing.

2012-08-14 Thread anupamsen
http://camel.465427.n5.nabble.com/file/n5717345/camel-example-cxf-proxy.rar camel-example-cxf-proxy.rar Hi There, Thanks for the reply. My goal is to expose a WS as an endpoint in Camel-CXF and based on the WS operation triggered by an external WS consumer I need to trigger the route/workflow. I

Re: exposing different operations under same service in camel + cxf routing.

2012-08-14 Thread ychawla
Hi, Have you tried turning on the tracer to see what headers are on your exchange? A simple filter such as this should work: ${in.headers.operationName} == 'SearchRequest' Try looki

Re: JSON - Jackson return list rather than POJO

2012-08-14 Thread ychawla
A simple workaround for this is a custom bean processor like so: public void processPersonSearchResponseJSON(Exchange exchange) throws JsonParseException, JsonMappingException, IOException { ObjectMapper mapper = new ObjectMapper();

Re: problem in aggregation

2012-08-14 Thread ychawla
Hi, Can you add some debug statements to your aggregator: newIn.setBody(oldBody + newBody); For example, what is oldBody and what is newBody? Based on the error you are receiving, you might be concatenating two XML documents like this: This will not create a valid XML document bec

Proof of concept for Camel Web Interface

2012-08-14 Thread helander
Hi, I would like to share with anyone interested a prototype I have made for a Web interface to Camel. It is based on Jolokia (http://jolikia.org) which is a JMX agent that provides access via http. Along with jolokia comes client interface libraries for Javascript and Java. The Jolokia agent is d

Unit test failing onException clause

2012-08-14 Thread Sri
Hi , I have a route with OnException, when I try to create unit test for the route it actually faliling and saying it does not find any route java.lang.IllegalArgumentException: There are no outputs which matches: ProcessorDefinition in the route: Route[[From[activemq:queue:dispatch]] -> [OnExce

Re: Is this routing behaviour as expected?

2012-08-14 Thread Babak Vahdat
For other users who maybe interested it's documented here: http://camel.apache.org/splitter.html#Splitter-WhattheSplitterreturns And the corresponding JIRA: https://issues.apache.org/jira/browse/CAMEL-2682 Babak Am 14.08.12 20:57 schrieb "Babak Vahdat" unter : > >Am 14.08.12 19:45 schrieb "R

Multiple paramater with cxf:end point

2012-08-14 Thread camelraj
Hi, I am developing some camel , here is my camel context. Pls let me know how can I configure the parameter if I want to call 'complexParameters' which has two parameter. http://localhost:8080/test-service/TestService"; serviceClass="service.TestService"/> http://camel.apache.org/schema/spr

cxfrs: GET and POST handling in bean

2012-08-14 Thread paramjyotsingh
I am trying to expose restful service using camel:cxfrs http://localhost:8080"; id="rsServer" serviceClass="mypackage.ServiceClass"/> @Path("/path") public class ServiceClass { @GET @Path("{id}") public String getName(@PathParam("id") int id){ // logic to get Name and return }

Re: Exception in Exchange is null

2012-08-14 Thread Hilde
Thanks, as I can read the camel log component exists in the first place to log out the exchange object and not to log stack traces. -- View this message in context: http://camel.465427.n5.nabble.com/Exception-in-Exchange-is-null-tp5717324p5717337.html Sent from the Camel - Users mailing list ar

Re: Unit test failing onException clause

2012-08-14 Thread Babak Vahdat
Hi you should do: weaveByType(ProcessDefinition.class) instead of: weaveByType(ProcessorDefinition.class) Babak -- View this message in context: http://camel.465427.n5.nabble.com/Unit-test-failing-onException-clause-tp5717350p5717356.html Sent from the Camel - Users mailing list archiv

Re: Splitter + aggregator + dynamic timeout

2012-08-14 Thread Babak Vahdat
Hi I WAS WRONG with my bug assumption, see the answer here: http://camel.465427.n5.nabble.com/Is-this-routing-behaviour-as-expected-td5717331.html Sorry for the noise & confusion. Babak Aleksander Pena wrote > > Henryk, > > thanks for another way of resolving my requirements it works perfec

Re: cxfrs: GET and POST handling in bean

2012-08-14 Thread Willem jiang
Hi, You can find the same example here[1], basic camel-cxfrs consumer just put the operation name and invocation parameters into the message, camel route can do the transformation as you want. If you just want to use bean to provide the service, you can use CXF directly. [1]http://camel.apac

Re: Multiple paramater with cxf:end point

2012-08-14 Thread Willem jiang
If you want camel-cxf producer invoke the service with this two parameter, you can put the parameter into a list like this List parameterList = new ArrayList(); parameterList.add(part1); parameterList.add(part2); Then you just need to put the parameterList into the message body. -- Willem Jia

Re: cxfrs: GET and POST handling in bean

2012-08-14 Thread paramjyotsingh
Is it not possible to handle it somehow in camel routes. Is there any way Camel identifies the request type like GET, POST, PUT or DELETE as we have for restful service and invoke the annotated method. I know i can use JAX-RS to handle calls to implementation bean, but is it possible to have simil