Re: RestSwaggerProcessor causes NullPointerException

2016-02-26 Thread Claus Ibsen
Try with 2.16.3-SNAPSHOT. It works on the upcoming 2.17 release. On Sat, Feb 27, 2016 at 12:57 AM, kuro <962...@gmail.com> wrote: > Camel ver : 2.16.2 > > RestSwaggerProcessor causes NullPointerException when I access > `http://localhost:/api/api-doc` > > error log > -

Re: Why can't I use swagger java with spark rest?

2016-02-26 Thread Claus Ibsen
Hi I dont think we have implemented it for it, you are welcome to log a JIRA http://camel.apache.org/support.html On Sat, Feb 27, 2016 at 2:12 AM, John D. Ament wrote: > I'm really interested in using Camel's REST DSL and Swagger to provide > documentation on my API routes. I was hoping to use

Re: Bean instance is null. OGNL bean expressions requires bean instances.

2016-02-26 Thread Claus Ibsen
It was not designed primary to call utility methods, but methods on your existing message body and headers - where there is an instance. You are welcome to log a JIRA ticket to see if we can adjust it to use static methods only. http://camel.apache.org/support.html On Fri, Feb 26, 2016 at 11:07 P

Re: Can't shut down due to inflight and pending exchanges

2016-02-26 Thread Claus Ibsen
See this page http://camel.apache.org/advanced-configuration-of-camelcontext-using-spring.html And use the searchbox on the front page of the Camel website to type in keywords, such as "shutdown" and you can find those relevant links about graceful shutdown. And the link how to configure it in xml

Re: Set Header using xpath

2016-02-26 Thread krish_p
My XML does not have nay namespace !! -- View this message in context: http://camel.465427.n5.nabble.com/Set-Header-using-xpath-tp5778202p5778344.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: CXF server versus endpoints

2016-02-26 Thread Ranx
And is there a way to set that up so that the service interfaces/endpoints are just a list? -- View this message in context: http://camel.465427.n5.nabble.com/CXF-server-versus-endpoints-tp5778342p5778343.html Sent from the Camel - Users mailing list archive at Nabble.com.

CXF server versus endpoints

2016-02-26 Thread Ranx
We are in the process of creating a number of services that will share many characteristics such as security, logging and so on and it would be great if we didn't have to replicate a lot of it. Things like the SOAP binding version, logging interceptors, etc. will be common a

Why can't I use swagger java with spark rest?

2016-02-26 Thread John D. Ament
I'm really interested in using Camel's REST DSL and Swagger to provide documentation on my API routes. I was hoping to use spark as well, but I can't seem to get it to run. I receive this error java.lang.IllegalArgumentException: Component spark-rest is not a RestApiConsumerFactory at org.apache

RestSwaggerProcessor causes NullPointerException

2016-02-26 Thread kuro
Camel ver : 2.16.2 RestSwaggerProcessor causes NullPointerException when I access `http://localhost:/api/api-doc` error log -- [Camel (camel-1) thread #0 - NettyEventExecutorGroup] WARN org.apache.camel.swagger.RestSwaggerProcessor - Error rendering Swagger AP

Re: equivalent in Spring JavaConfig

2016-02-26 Thread Marcin Zajączkowski
On 2016-02-21 02:13, Marcin Zajączkowski wrote: > Hi, > > Recently I was migrating Camel configuration in one of my Spring-based > projects from XML to JavaConfig. The part that took me a while was the > ability to add routes. I was creating Spring bean(s) of RouteBuilder > with the route(s) defin

Bean instance is null. OGNL bean expressions requires bean instances.

2016-02-26 Thread Alex Soto
Hello, Running Camel 2.16.1, I am trying to invoke a static method as follows: However I get an exception with this message: Bean instance is null. OGNL bean expressions requires bean instances. Any idea why? Thanks and best regards, Alex soto

Re: ServiceFactory

2016-02-26 Thread Brad Johnson
Just a quick follow up to that question, the class is not proxied in CBTS but that may be an impedance mismatch between the test harness and an actual OSGi container and not indicative of how it will be handled by blueprint in Karaf. On Fri, Feb 26, 2016 at 3:23 PM, Ranx wrote: > If I create a s

ServiceFactory

2016-02-26 Thread Ranx
If I create a service factory instantiated in blueprint like this: And inside the factory just do a Class.forName to instantiate and return it, will the service reference itself be proxied? -- View this message in context: http://camel.46

Re: Can't shut down due to inflight and pending exchanges

2016-02-26 Thread David Hoffer
I found that link too but unfortunately little of it uses the XML configuration like we do. I got it to work...the bean is auto loaded via magic (wish there was less magic). I set our timeout to 30 which works great as when the problem occurs we only have to wait 30 seconds instead of 300 for the

Re: Can't shut down due to inflight and pending exchanges

2016-02-26 Thread Matt Sicker
There's a bit of info at this link: http://camel.apache.org/graceful-shutdown.html On 26 February 2016 at 14:20, David Hoffer wrote: > I found a doc that says I can add the following to my camel context. I > tried it and it worked but then took it out and it still works so this > problem is ra

Re: Can't shut down due to inflight and pending exchanges

2016-02-26 Thread David Hoffer
How do I inject the defaultShutdownStrategy bean into the camelContext? On Fri, Feb 26, 2016 at 1:20 PM, David Hoffer wrote: > I found a doc that says I can add the following to my camel context. I > tried it and it worked but then took it out and it still works so this > problem is random it d

Re: Can't shut down due to inflight and pending exchanges

2016-02-26 Thread David Hoffer
I found a doc that says I can add the following to my camel context. I tried it and it worked but then took it out and it still works so this problem is random it doesn't happen all the time, no idea what is triggering it yet. shutdownRoute="Default" shutdownRunningTask="CompleteCurrentTaskOnly"

Re: Can't shut down due to inflight and pending exchanges

2016-02-26 Thread Matt Sicker
Are you using camel-disruptor? I had a lot of problems like that. You could also configure your own DefaultShutdownStrategy and set a smaller timeout. For example: On 26 February 2016 at 13:55, David Hoffer wrote: > For some reason we are getting the following message from > the DefaultS

Can't shut down due to inflight and pending exchanges

2016-02-26 Thread David Hoffer
For some reason we are getting the following message from the DefaultShutdownStrategy "Waiting as there are still 1 inflight and pending exchanges to complete, timeout in 300 seconds." Which causes our app to not shut down for 5 minutes. This is happening although there was no work for the app to

Re: Using spring BridgePropertyPlaceholderConfigurer

2016-02-26 Thread Claus Ibsen
You can use the simple alternative syntax http://camel.apache.org/simple On Fri, Feb 26, 2016 at 4:38 PM, SHTherkildsen wrote: > Hi. > > I have started using BridgePropertyPlaceholderConfigurer to bridge Spring > and Camel property placeholders. > > However, when using log statements like the one

Using spring BridgePropertyPlaceholderConfigurer

2016-02-26 Thread SHTherkildsen
Hi. I have started using BridgePropertyPlaceholderConfigurer to bridge Spring and Camel property placeholders. However, when using log statements like the one below in a camel route I now get errors because the BridgePropertyPlaceholderConfigurer expects ${body} to be a spring placeholder. log

Re: IronMQ support?

2016-02-26 Thread John D. Ament
Hi Preben, That would be awesome. I created this ticket as well -> https://issues.apache.org/jira/browse/CAMEL-9648 I did take a look at your code (since it pops up when you search for camel ironmq in the google :-) and the code looks fine from a donation standpoint (from a very high level ASF s

Re: How do I access the SNI extension in HTTP4?

2016-02-26 Thread Ioannis Mavroukakis
I finally worked it out. For anyone else who might be interested, this is how it needs to be done @Override public void configureHttpClient(HttpClientBuilder clientBuilder) { try { SSLContext sslContext = getSSLContext(keyStore, password); SSLConnectionSocket

Re: Netty deadlock during connection interrupt

2016-02-26 Thread Leomar
Ahh ... thanks. Works. -- View this message in context: http://camel.465427.n5.nabble.com/Netty-deadlock-during-connection-interrupt-tp5778317p5778319.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Netty deadlock during connection interrupt

2016-02-26 Thread Claus Ibsen
Can you try with 2.16.2 On Fri, Feb 26, 2016 at 9:41 AM, Leomar wrote: > Hi there, > > i have a problem with a camel route using a netty consumer. > > There is a deadlock in case that the socket connection is lost while sending > data. > I made two little applications that can reproduce the probl

Re: Switch to route in case original route fails

2016-02-26 Thread mnl
Thanks !! Can someone please point me to the implementation of failover load balancer. All I could see is this https://github.com/apache/camel/blob/cc9924f41965885af25027fc053adaf21f15b5b4/camel-core/src/main/java/org/apache/camel/processor/loadbalancer/FailOverLoadBalancer.java but it no where u

Netty deadlock during connection interrupt

2016-02-26 Thread Leomar
Hi there, i have a problem with a camel route using a netty consumer. There is a deadlock in case that the socket connection is lost while sending data. I made two little applications that can reproduce the problem: Used Camel version is 2.16.1 *1. A Socket server that will close in the middle

How to insert Date String as date in MongoDB

2016-02-26 Thread Royamit
Hi all, I am trying out a sample in which I have used Apache camel component for MongoDB. Below is my route: //Below line queries MongoDB to get the result from("jetty:http://localhost:8181/dataByQuery";) .to("mongodb:myDb?database=DataDB&collection=data&operation=findOneByQuery"); //Bel