Re: onException not getting called - only newly added onException does

2017-03-24 Thread bocamel
Never mind, just realized that the onException is per RouteBuilder. -- View this message in context: http://camel.465427.n5.nabble.com/onException-not-getting-called-only-newly-added-onException-does-tp5796106p5796107.html Sent from the Camel - Users mailing list archive at Nabble.com.

onException not getting called - only newly added onException does

2017-03-24 Thread bocamel
In my app, I need to inject some new routes. I do this by running a groovy script as a Camel processor that adds new routes to the existing context (exchange.context.addRoutes(new RouteBuilder(){...})). Everything works fine except that the existing context-level onException's, that were added be

Running Camel 2.18.0 in Karaf - java.lang.ClassNotFoundException: org.springframework.beans.factory.BeanCreationException not found by org.apache.camel.camel-spring-dm

2016-10-26 Thread bocamel
Tried to run the latest 2.18.0 in Karaf 4.0.7. Installed the feature camel-spring-dm. When loading my bundles (which all worked fine in 2.17.3 and Karaf 4.0.7), I received the following error. I remembered a similar situation with 2.17.0 but later the issue went away (at least in 2.17.3). Knowi

Installing feature camel-sql (2.17.0) into karaf 4.0.4 caused karaf to hang

2016-04-22 Thread bocamel
After a clean start of karaf 4.0.4, tried to install cxf and camel: feature:repo-add cxf 3.1.6 feature:install cxf cxf-rt-security feature:repo-add camel 2.17.0 feature:install camel-core camel-spring camel-cxf camel-sql camel-jdbc camel-velocity camel-quartz2 camel-mail camel-groovy The last ste

RE: How to return early from a direct: subroute?

2016-04-22 Thread bocamel
-node+s465427n5781523...@n5.nabble.com] Sent: Thursday, April 21, 2016 11:53 PM To: bocamel Subject: Re: How to return early from a direct: subroute? Is there a reason you don't want to throw an exception? If you have multiple processors in a row like that all of which might throw excep

Re: How to return early from a direct: subroute?

2016-04-21 Thread bocamel
Thank you all very much for responding to my question and for offering solutions. I have implemented my application using a combination of headers and . But I also concluded that there is not a simple and elegant way to do what I intended to do. I wish the great Camel team will add such a featur

RE: How to return early from a direct: subroute?

2016-04-02 Thread bocamel
, 2016 10:43 PM To: bocamel Subject: Re: How to return early from a direct: subroute? What about using a filter? I think that can do what you’re after. > On Apr 2, 2016, at 8:40 PM, bocamel <[hidden email]> wrote: > > Taariq, > > > > Thank you very much

RE: How to return early from a direct: subroute?

2016-04-02 Thread bocamel
. Thanks again! From: taariq [via Camel] [mailto:ml-node+s465427n5780271...@n5.nabble.com] Sent: Friday, April 1, 2016 3:36 PM To: bocamel Subject: Re: How to return early from a direct: subroute? Did you already look at the dynamic router and routing slip patterns? > On 01 Apr 2

How to return early from a direct: subroute?

2016-04-01 Thread bocamel
I have two routes: What should I do if, in proc1, I want to - for certain exchanges - return back to route1 without completing the entire route2? I know the ROUTE_STOP property, but that would stop the exchange completely (without going back to route1). I can also set som

java.lang.IndexOutOfBoundsException in DefaultCxfBinding.java when receiving null HTTP header

2016-03-22 Thread bocamel
I am running Camel 2.15.5 and CXF 3.1.5. I have a CXF consumer endpoint that receives requests in MESSAGE data format. I ran into the following error whenever a client sent in a request with a null HTTP header (i.e. a header name is specified but there is no value. It can be any header, e.g. SOA

SOAP web services issues with 2.16.x

2016-02-18 Thread bocamel
Awhile ago, I posted about a payload parsing issue with 2.16.x. Aki Yoshida kindly told me that streamCache needs to be set if the content is to be read more than once. I tested it in a standalone Camel process, it worked perfectly. Then I tried to deploy it to Karaf (4.0.4). It failed. The er

cxf server basic authentication (using interceptor) does not protect wsdl browsing

2016-02-11 Thread bocamel
Thanks to Chris Dail, we have been using his BasicAuthAuthorizationInterceptor to enforce basic authentication on a Camel CXF consumer endpoint (server), say, http://www.acme.com/test.svc. We noticed that the enforcement does not apply to the WSDL browsing (http://www.acme.com/test.svc?wsdl). Tha

Re: DirectVmConsumerNotAvailableException cannot be caught by onException?

2015-12-16 Thread bocamel
Claus, Thank you very much for the quick response which makes a lot of sense. But how can I mark the original exception (1st error) as "handled" to prevent the exchange from being processed again and again. Thanks, John -- View this message in context: http://camel.465427.n5.nabble.com/Direc

DirectVmConsumerNotAvailableException cannot be caught by onException?

2015-12-16 Thread bocamel
I have the following context level OnException. After it catches an error, it would send out an email alert using a direct-vm route. But to avoid infinite loop, the email alert is only sent if the OnException is not entered due to a nested exception. When the direct-vm consumer is not started an

cxfendpoint consumer fails for certain WS soap calls (2.16.0) - nullpoint exception

2015-11-12 Thread bocamel
After upgrade to 2.16.0, certain WS soap calls fail with the error below. This works with all the combinations of 2.15.x and CXF 3.1.x. But it does not work for 2.16.0 and CXF 3.1.x. Is there any change I need to make for the CXF endpoint (consumer or producer) for 2.16.0? Using IDE, I could se

Can Camel VM be used in Karaf cross contexts in different bundles?

2015-11-03 Thread bocamel
I am running a few bundles in Karaf, each has its own Camel context. I tried to use VM to communicate between them, i.e. one bundle (B1) is a producer to a VM endpoint, and another (B2) is the consumer of the VM endpoint. In the Camel route in B2, the route first tests a properties value in a .

RE: Camel CXF cannot be loaded to Karaf 4.0.0

2015-08-10 Thread bocamel
Sent: Monday, August 10, 2015 4:02 PM To: bocamel Subject: Re: Camel CXF cannot be loaded to Karaf 4.0.0 Apache Camel 2.15.2 was build and tested with CXF 3.0.4 [1] - and not 3.1.1. Any reason why you have to use CXF 3.1.1? Camel 2.16.0 will use CXF 3.1.2 (or later) [2]. [1] https://g

Camel CXF cannot be loaded to Karaf 4.0.0

2015-08-10 Thread bocamel
Just a heads up. Tried the latest Karaf 4.0.0. Cannot load camel-cxf feature (Camel 2.15.2/CXF 3.1.1). Below is the error - looks like someone needs to bump up Jetty dependency. karaf@root()> feature:repo-add cxf 3.1.1 Adding feature url mvn:org.apache.cxf.karaf/apache-cxf/3.1.1/xml/features k

Re: @BeanInject ignored in Groovy when called as a script

2015-05-06 Thread bocamel
Claus, What you suggested worked beautifully, as always! Thank you all very much for being so helpful. -- View this message in context: http://camel.465427.n5.nabble.com/BeanInject-ignored-in-Groovy-when-called-as-a-script-tp5766708p5766783.html Sent from the Camel - Users mailing list arch

@BeanInject ignored in Groovy when called as a script

2015-05-05 Thread bocamel
Because groovy script called by Camel cannot be debugged under IDE, I created my script as a hybrid so I can easily switch it between the bean mode and script mode: //== class GroovyProc4 { @BeanInject('myConfig') MyConfig myConfig public void proces

Re: setBody(Object body, Class type) does not seem to set the body type

2014-07-28 Thread bocamel
Hi Willem, You are absolutely right! After I switched to use Out message, it worked! Furthermore, I did not even need to copy the headers from the In message to the Out message, they were already there. This link http://camel.apache.org/using-getin-or-getout-methods-on-exchange.html taught me t

Re: setBody(Object body, Class type) does not seem to set the body type

2014-07-26 Thread bocamel
Thanks Claus! I tried a Processor, but the same error occurred. I do not know whether the fact that this is on an OnException path made any difference. What I am trying to do is to replace the soap fault from a web services server (CxfPayload) with some meaningful response message (a string).

setBody(Object body, Class type) does not seem to set the body type

2014-07-23 Thread bocamel
I have the following in my camel context: org.apache.cxf.binding.soap.SoapFault true It does not matter what I set in the body (the something above), the file would be empty. I noticed that the body type is still CxfPayload after I did the setBody(something, String.class). However,

RE: Any harm of sending messages to a SEDA endpoint that is not started

2014-07-14 Thread bocamel
So that is a no-no then. Thanks! From: Claus Ibsen-2 [via Camel] [mailto:ml-node+s465427n5753795...@n5.nabble.com] Sent: Monday, July 14, 2014 2:27 PM To: bocamel Subject: Re: Any harm of sending messages to a SEDA endpoint that is not started The messages are stored in-memory when using

Any harm of sending messages to a SEDA endpoint that is not started

2014-07-14 Thread bocamel
I use a seda endpoint route to send out email alerts (using smtps inside the route). The easiest way I can turn off all email alerts is to leave this seda endpoint unstarted (i.e. autoStartup="false"). I tested it and it does work. But I wonder if there is any harm in doing this (e.g. whether Ca

Re: How to abort retry in onRedelivery processor?

2014-07-08 Thread bocamel
Of course, Claus. I should have thought about it - but got my mind stuck in the onRedelivery thing :-). Thank you very much! It works beautifully. -- View this message in context: http://camel.465427.n5.nabble.com/How-to-abort-retry-in-onRedelivery-processor-tp5753554p5753560.html Sent from

How to abort retry in onRedelivery processor?

2014-07-08 Thread bocamel
I have an OnException for SocketTimeoutException, at context level. The OnException has a redeliveryPolicy that does a number of retries. But I would like to choose whether to retry based on the message that fails. Is it possible to implement this control in an onRedelivery processor? That is,

Re: Cannot supply CamelHttpPath to a call to a CXF endpoint

2014-06-23 Thread bocamel
Hi Willem, Thanks for the response! What we are trying to do is to send some test messages from another component (inside our application) to the cxf endpoint which uses the path to determine what logic to apply. It would be nice if we can send test messages using different path to drive the dif

Cannot supply CamelHttpPath to a call to a CXF endpoint

2014-06-21 Thread bocamel
I have a cxf web services endpoint (cxf:bean:myservice) that expects to receive requests to localhost/myservice, i.e. address = https://0.0.0.0/myservice. Of course, it will also receive anything under this path, e.g. localhost/myservice/*. I want to send requests to this cxf endpoint with a dyna

Re: camel-mail and camel-cxf incompatible?

2014-04-20 Thread bocamel
Willem, thank you very much for the quick response! Your suggestion worked perfectly. -- View this message in context: http://camel.465427.n5.nabble.com/camel-mail-and-camel-cxf-incompatible-tp5750386p5750393.html Sent from the Camel - Users mailing list archive at Nabble.com.

camel-mail and camel-cxf incompatible?

2014-04-20 Thread bocamel
I am having a problem with a camel project that uses both camel-mail and camel-cxf. If only camel-mail is used, it can successfully consume emails from an IMAP endpoint. But if camel-cxf maven dependency is included, even if there is no cxfendpoint route defined in Camel Context, the IMAP consume

Re: Is Camel affected by the OpenSSL heart bleed bug?

2014-04-11 Thread bocamel
Thank you very much for the quick response! -- View this message in context: http://camel.465427.n5.nabble.com/Is-Camel-affected-by-the-OpenSSL-heart-bleed-bug-tp5750006p5750131.html Sent from the Camel - Users mailing list archive at Nabble.com.

Is Camel affected by the OpenSSL heart bleed bug?

2014-04-09 Thread bocamel
We are using Camel (with CXF and Karaf). Does anyone know if we should be concerned with this new OpenSSL security bug? Thanks! -- View this message in context: http://camel.465427.n5.nabble.com/Is-Camel-affected-by-the-OpenSSL-heart-bleed-bug-tp5750006.html Sent from the Camel - Users mailin

RE: Dead letter queue and onException

2014-03-10 Thread bocamel
Thank you for the explanation. From: Claus Ibsen-2 [via Camel] [mailto:ml-node+s465427n5748500...@n5.nabble.com] Sent: Sunday, March 9, 2014 10:02 AM To: bocamel Subject: Re: Dead letter queue and onException Hi This is by design. If onException is triggered then it does it work, an

RE: How to set a message header to an object in spring?

2014-02-18 Thread bocamel
Thanks! The suggestion worked beautifully. From: Claus Ibsen-2 [via Camel] [mailto:ml-node+s465427n5747460...@n5.nabble.com] Sent: Tuesday, February 18, 2014 1:46 AM To: bocamel Subject: Re: How to set a message header to an object in spring? On Tue, Feb 18, 2014 at 5:26 AM, bocamel

How to set a message header to an object in spring?

2014-02-17 Thread bocamel
I am trying to pass a DAO object to a processor through message header. But I cannot find out how to do this in Spring DSL. The following XML does not work (complaining that no expression found in registry for myDao): ... myDao Any help will be greatly appreciated. Thanks! -- View this m

Re: Permission denied with Camel-FTP when configuring jail+chroot+sftp only with openssh

2014-01-29 Thread bocamel
lleclerc, Did you find the answer to this issue? I am having a similar issue. In my case, this "permission denied" error occurs intermittently when I send files to a SFTP server using Camel. After each occurrence of the error, JSCH would disconnect and reconnect to the SFTP server. Since I con

Re: Dead letter queue and onException

2014-01-23 Thread bocamel
Hi Claus, Thank you for your response. The version being tested is 2.12.2. -- View this message in context: http://camel.465427.n5.nabble.com/Dead-letter-queue-and-onException-tp5746362p5746402.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Dead letter queue and onException

2014-01-23 Thread bocamel
Hi Charles, thank you very much for the response. I assume what you meant was to reference the DLC in because the Spring DSL does not allow definition within . I tried to move the errorHandlerRef in the . It did not help. The failed message was only written to the dead queue if the error was

Dead letter queue and onException

2014-01-22 Thread bocamel
It seems that whenever an error is caught by onException, regardless whether handled is set to true or false, the failed message would not be written to the dead letter queue. Here is a sample project to demonstrate this: http://www.springframework.org/schema/beans"; xmlns:xsi="http://www.

Is there a way to debug in Eclipse Groovy scripts in Camel-Language component?

2014-01-05 Thread bocamel
Using groovy scripts in Camel Language component (uri="language://groovy:resource:classpath:x.groovy") turned out to be a very powerful and flexible way to add business logic into a production Camel route. One can do just about anything in the groovy scripts without having to rebuild the appli

Why does ConsumerTemplate.receiveBody receive more than one message at a time from SEDA queue?

2014-01-05 Thread bocamel
When using a consumer template to receive messages from seda queue, a single receiveBody (or receiveBodyNoWait) seems to consume more than one message from the queue. Here is a sample processor: SedaEndpoint queueEp = (SedaEndpoint) exchange.getContext().getEndpoint("seda:test"); ConsumerTemplat

Re: "Singleton bean creation not allowed while the singletons of this factory are in destruction" during shutdown

2013-11-13 Thread bocamel
Hi Claus, I ran into a similar issue as Pascal did. I followed your suggestion and added depends-on="myCamel" to my Spring . But then I got the following error when I terminated Camel (Ctrl-c). It looks like, instead of complaining about my bean, Spring is now complaining about "myCamel".

Re: Dead Letter Channel problem

2013-11-02 Thread bocamel
I am having a similar problem that the failed message was not moved to the dead letter queue (regardless whether the dead letter queue is a jms endpoint or file endpoint). I experienced this problem in both Camel 2.11.1 and 2.12.1. The redelivery part works, just the failed message was not moved.

Re: Message headers and HTTP

2013-10-29 Thread bocamel
bibryam, HeaderFilterStrategy worked out beautifully. I simply extended the CxfHeaderFilterStrategy. Thank you! -- View this message in context: http://camel.465427.n5.nabble.com/Message-headers-and-HTTP-tp5742364p5742374.html Sent from the Camel - Users mailing list archive at Nabble.com.

Message headers and HTTP

2013-10-29 Thread bocamel
In my routes, I use custom message headers to keep track some data. But when one of the steps in the route is a HTTP call (for example calling a web services), all my headers are sent as HTTP headers to the remote HTTP server. This causes the remote HTTP server (which is not under my control) to

Re: File renaming problems under Windows

2013-09-16 Thread bocamel
Done... JIRA Camel-6756 was opened. -- View this message in context: http://camel.465427.n5.nabble.com/File-renaming-problems-under-Windows-tp5719484p5739555.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: File renaming problems under Windows

2013-09-12 Thread bocamel
Christian, I am afraid my celebration of the fix might be a little premature. :-). This failure of renaming/deleting a consumed file error still occurs when I forced a org.apache.camel.component.bean.AmbiguousMethodCallException in the route. In other words, if the route receives a file from fi

Re: File renaming problems under Windows

2013-09-10 Thread bocamel
Christian, I tested this under Camel 2.12.0 and the issue that I reported did not occur. Thank you very much for fixing it! FYI. This is the first time I tried Camel 2.12.0. Eclipse complained about " The method getTextContent() is undefined for the type Node” (org.w3c.dom.Node) unless I move

Re: File renaming problems under Windows

2013-09-05 Thread bocamel
I ran into a similar problem. My use case is slightly different and I am using Camel 2.11.1 and JDK 1.7. But the result is that Camel cannot delete the file from the input folder and keeps processing it indefinitely. I have two routes. The first route reads in XML files from a directory then pu

Where can I find an example of specifying a custom resequence comparator in Spring

2013-08-14 Thread bocamel
I try to keep all my routes in Spring, but I cannot find any example about how to define the following in Spring: .resequence(header("seqnum")).stream().capacity(500).timeout(1).comparator(myComparator) or .resequence(header("seqnum")).stream(myConfig) where myComparator is a custom Expres

RE: Limit concurrency to messages with different headers

2013-08-13 Thread bocamel
Claus, Thanks! This is a perfect solution to my requirements! From: Claus Ibsen-2 [via Camel] [mailto:ml-node+s465427n573697...@n5.nabble.com] Sent: Thursday, August 8, 2013 5:17 AM To: bocamel Subject: Re: Limit concurrency to messages with different headers Sounds like JMS message

Limit concurrency to messages with different headers

2013-08-07 Thread bocamel
I need to process orders from multiple companies and then send them out. The logic for processing is almost identical but I need to send all messages from a company out in the exact sequence as they are received.Therefore, I would like to have concurrency but need to apply concurrency only whe

RE: Validate Xml

2013-08-01 Thread bocamel
After I updated all Maven dependencies to the most recent version of Camel and ActiveMQ (in my attempt to get rid of any incompatible servlet api jar), the exception that happened after the return of my OutFaultInterceptor no longer happens. The proper soap fault was returned to the client. Thank

RE: Validate Xml

2013-08-01 Thread bocamel
Camel] [mailto:ml-node+s465427n5736622...@n5.nabble.com] Sent: Thursday, August 1, 2013 2:29 AM To: bocamel Subject: Re: Validate Xml Hi I think there is 2 other CXF options you can use to turn of exception message and/or stacktraces in the response message. They are turned off by default to

RE: Validate Xml

2013-07-31 Thread bocamel
fault message. If that is the case, any CXF out fault interceptor probably would not get control anyway. Any suggestion? Thanks! From: Raul Kripalani [via Camel] [mailto:ml-node+s465427n5736589...@n5.nabble.com] Sent: Wednesday, July 31, 2013 1:37 PM To: bocamel Subject: Re: Validate Xml

Re: Validate Xml

2013-07-31 Thread bocamel
Thanks Claus! Using what you suggested, CXF threw an error with much better information about the actual error with the input XML PAYLOAD message. But there is a little problem - the response sent back to the client is a simple HTTP 500 message without any explanation. In fact, in this case HTTP

Re: Validate Xml

2013-07-31 Thread bocamel
Hi Christian, Do you have some examples handy for how to use CXF to validate a PAYLOAD request? Thanks! John -- View this message in context: http://camel.465427.n5.nabble.com/Validate-Xml-tp472122p5736583.html Sent from the Camel - Users mailing list archive at Nabble.com.

RE: Validate Xml

2013-07-30 Thread bocamel
+s465427n5736507...@n5.nabble.com] Sent: Tuesday, July 30, 2013 3:42 PM To: bocamel Subject: Re: Validate Xml Try converting the body to a Document.class explicitly (before calling the validator) and handling the InvalidPayloadException. For example: onException

Re: Validate Xml

2013-07-30 Thread bocamel
I recently ran into this scenario. My Camel route acts as a web services server that receives an XML message in PAYLOAD format. The very next step in the route after receiving the message is to validate the message using . However, if the input XML message is not well formed, Camel generates a C

RE: Cannot access CamelLoopIndex in route using spel

2013-07-14 Thread bocamel
Thanks Willem. Your suggestion worked beautifully. From: Willem.Jiang [via Camel] [mailto:ml-node+s465427n5735642...@n5.nabble.com] Sent: Sunday, July 14, 2013 10:19 PM To: bocamel Subject: Re: Cannot access CamelLoopIndex in route using spel Hi, If you want to access the

Cannot access CamelLoopIndex in route using spel

2013-07-14 Thread bocamel
I need to access CamelLoopIndex within a route. According to http://camel.apache.org/loop.html, CamelLoopIndex is a property in the Exchange while in the loop. I tried this simple test route: Count 5 #{body + ':' + property(CamelLoopIndex)}

Re: Camel retries a message after the message has been completed successfully

2013-05-05 Thread bocamel
I can avoid this issue by throttling the file polling by adding the following options to the file uri: initialDelay=3000&delay=1000&maxMessagesPerPoll=20. It seems that the exception occurs in one of the following two situations: 1. When Camel polls the folder immediately after being started wh

Re: Camel retries a message after the message has been completed successfully

2013-05-03 Thread bocamel
Claus, Thank you very much for your prompt response. I tried to load the messages in memory as you suggested. But the same exception (system cannot find the file, see below) still occurs. Could you please share what you think might be the cause for this? It seems that the locking mechanism of

Camel retries a message after the message has been completed successfully

2013-05-02 Thread bocamel
Hello, I was testing a Camel CXF web services application. I ran into this problem. In my Camel web services test application, I have two routes: First route reads messages from a folder (src/data/in), sends the messages to my web services, and then writes the response to another folder (src/dat