Stream-only reverse proxy with minimal memory footprint

2014-07-24 Thread rsteppac2
I am trying to implement a memory efficient http reverse proxy that is working on streams only to handle large HTTP requests and responses. This should be as easy as described here: http://camel.apache.org/how-to-use-camel-as-a-http-proxy-between-a-client-and-server.html The Jetty consumer plac

RE: Problem encrypting the password using Camel Jasypt component

2014-07-24 Thread Willem Jiang
I just create a JIRA[1] for it. [1]https://issues.apache.org/jira/browse/CAMEL-7637 -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On July 25, 2014 at 8:59:01 AM,

Re: Camel 2.13.1 MyBatis Batch Insert to Oracle 11g Table ORA-00933: SQL command not properly ended

2014-07-24 Thread Claus Ibsen
Hi See this page for how to get help faster http://camel.apache.org/support On Thu, Jul 24, 2014 at 10:56 PM, sandeepreddip wrote: > Can someone help me with the issue??? > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Camel-2-13-1-MyBatis-Batch-Insert-to-Oracle

Re: Camel AdviceWith issues

2014-07-24 Thread Gnanaguru S
Thanks Claus, Where I can raise a bug for the adviceWith issue while using Choice ? This will be a very useful feature for Camel Spring users! Cheers Guru -- View this message in context: http://camel.465427.n5.nabble.com/Camel-AdviceWith-issues-tp5752786p5754416.html Sent from the Camel -

RE: How to get all the properties in the exchange in spring configuration

2014-07-24 Thread Naveen Raj
I Agree. I was wondering that if there could be any like that . I checked all possibilities for this and found none. I wanted to cross check with community if I had missed any. It will be great that like ${headers} if ${properties} is also supported by simple Expression language. Thanks , Nave

Re: Set providers property on uri for cxfrs endpoint

2014-07-24 Thread Willem Jiang
Provides can only takes a list as the parameter, if you just have one provider you can use provider option instead of providers option. I also find something wrong in your spring configuration file. Please don’t set the bean id with the string which starts with “#”. Camel treats the string whic

Re: Camel 2.13.1 MyBatis Batch Insert to Oracle 11g Table ORA-00933: SQL command not properly ended

2014-07-24 Thread sandeepreddip
Can someone help me with the issue??? -- View this message in context: http://camel.465427.n5.nabble.com/Camel-2-13-1-MyBatis-Batch-Insert-to-Oracle-11g-Table-ORA-00933-SQL-command-not-properly-ended-tp5754248p5754410.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Sockets getting closed after 200 seconds

2014-07-24 Thread Matt Sicker
I don't think TCP/IP works like that. You have to keep reconnecting every so often. On 24 July 2014 12:35, ashwin74268 wrote: > After analysis, I found that the socket were getting closed because of > expiration of maxIdleTime in JettyHTTPServerEngine which is defaulted to > 200 > seconds. Is t

RE: Problem encrypting the password using Camel Jasypt component

2014-07-24 Thread Ravindra.Godbole
Enhancing the exception logging will help developer in such cases. " If detailed message is not provided by the exception, name of the exception should be printed in logs " . In this case FailedToCreateRouteException should check if cause.getMessage() is not null. In case it is null, name of ex

RE: Camel Java routes using Timer firing only once

2014-07-24 Thread Ravindra.Godbole
It looks like in the sample code which starts camel context, you are also stopping the context. If you want timer to run continuously, your context should always be up and running as well. Can you also add a very long sleep command just to ensure that and test the same ? -Ravi ___

Re: Unit test XA enabled route

2014-07-24 Thread user3152723
If you choose to run your integration (api) components in osgi (<- Karaf <- Fuse), you simply have to (that is: you have no alternative but) forget about TDD. May be not in theory, but take a dev team of Spring specialists, who can’t but start coding test cases to define required functionality…

Re: Not able to define processor in Camel

2014-07-24 Thread Claus Ibsen
And you are sure there is a file for the Camel route to pickup? On Thu, Jul 24, 2014 at 6:24 PM, nettome wrote: > I increased the time to 20 seconds still I my producer is not called. > I don't think that's the problem. > > > > -- > View this message in context: > http://camel.465427.n5.nabble.c

Re: Sockets getting closed after 200 seconds

2014-07-24 Thread ashwin74268
After analysis, I found that the socket were getting closed because of expiration of maxIdleTime in JettyHTTPServerEngine which is defaulted to 200 seconds. Is there a way to keep the socket connection alive forever? -- View this message in context: http://camel.465427.n5.nabble.com/Sockets-get

RE: Camel Java routes using Timer firing only once

2014-07-24 Thread mikes300
*Hi Ravi,* I tried, but same results. Runs once but not again. Here are the log entries for it. I even tried omitting the context.stop, no success... 7:32:12,460 INFO [org.apache.camel.impl.DefaultCamelContext] (default task-4) Apache Camel 2.13.1 (CamelContext: camel-1) is starting 07:32:12,4

Re: Not able to define processor in Camel

2014-07-24 Thread nettome
I increased the time to 20 seconds still I my producer is not called. I don't think that's the problem. -- View this message in context: http://camel.465427.n5.nabble.com/Not-able-to-define-processor-in-Camel-tp5754376p5754406.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: naming routes with setId doesn't work on a specific machine

2014-07-24 Thread dermoritz
ok i found the solution: the problem was - the config on production was slightly diferent - without throttle. Calling setId on a ThrottleDefinition simply doesn't work (or at least does not set the route id). So i changed the code to set the id before doing "routeDef = routeDef.throttle" (How to

Re: naming routes with setId doesn't work on a specific machine

2014-07-24 Thread Matt Sicker
In the from...to... you would do: from(foo).routeId("CustomId").to(...) On 24 July 2014 07:49, dermoritz wrote: > on which class i can found "setRouteId"? It seems not part of > RouteDefinition > ( > http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/model/RouteDefinitio

Re: Set providers property on uri for cxfrs endpoint

2014-07-24 Thread cdryst
Hi Claus, I was using 2.12.2 and upgraded to 2.13.2 -- View this message in context: http://camel.465427.n5.nabble.com/Set-providers-property-on-uri-for-cxfrs-endpoint-tp5754319p5754403.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Unit test XA enabled route

2014-07-24 Thread arnaudeprez
Hi, Christian Mueler did a great "camel in transaction" sample : https://github.com/muellerc/camel-in-transaction Thx to him. -- View this message in context: http://camel.465427.n5.nabble.com/Unit-test-XA-enabled-route-tp5754352p5754402.html Sent from the Camel - Users mailing list archive at

Re: Use Properties in a Predicate

2014-07-24 Thread arnoldmad
sorry forgot to mention but I'm also new to groovy :) so how do I need to change the when() line ? -- View this message in context: http://camel.465427.n5.nabble.com/Use-Properties-in-a-Predicate-tp5754392p5754398.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Use Properties in a Predicate

2014-07-24 Thread Claus Ibsen
Ah you are using groovy - you didnt tell. Or i didnt spot it. groovy thinks ${ } is a gstring. So use $simple{ xxx } to use the camel simple language syntax On Thu, Jul 24, 2014 at 3:33 PM, arnoldmad wrote: > Thats the same thing I already tried with the following problem afterwards: > route: >

Re: XSLT transformation produces junk charachters

2014-07-24 Thread vdhawan
Fixed it finally. I did not intend to use xalan for my transformations however Fuse was being forced to use this because of one the dependencies in my pom Saxon-HE. I upgraded to 9.5.1.1, and the maven dependency tree depicted that it no longer depended on xalan. I then used ?saxon=ture in my

Re: Use Properties in a Predicate

2014-07-24 Thread arnoldmad
Thats the same thing I already tried with the following problem afterwards: route: .when(simple("${properties:pix.iti9.url} != 'DISABLED'")) Caused by: groovy.lang.MissingPropertyException: No such property: pix for class: com.test.ClientRoute -- View this message in context: http://camel.46

Re: Use Properties in a Predicate

2014-07-24 Thread Claus Ibsen
Use .when(simple('${properties:comp1URI} != 'DISABLED')) On Thu, Jul 24, 2014 at 3:23 PM, arnoldmad wrote: > Hi ! > > I'm pretty new to camel and have the following Question: > > I have a route that uses multiple different components. based on the > availability of external systems I might want

Use Properties in a Predicate

2014-07-24 Thread arnoldmad
Hi ! I'm pretty new to camel and have the following Question: I have a route that uses multiple different components. based on the availability of external systems I might want to use a component or not. f.e. from('direct:startingPoint') .to('comp1:callToExternalComp1') .to('comp2:callToExterna

Re: Problem encrypting the password using Camel Jasypt component

2014-07-24 Thread Claus Ibsen
Hi There is also this ticket, maybe related to your issue https://issues.apache.org/jira/browse/CAMEL-7630 On Thu, Jul 24, 2014 at 3:07 PM, arvind wrote: > Thanks for your great help Ravi. I have regenerated the encrypted password > using the master password and reading it from properties file b

Re: Not able to define processor in Camel

2014-07-24 Thread Claus Ibsen
Hi You code had a sleep 4 sec that is not a lot of time. See how to keep running camel http://camel.apache.org/running-camel-standalone-and-have-it-keep-running.html On Thu, Jul 24, 2014 at 3:09 PM, nettome wrote: > Hi Claus, > I did that and that has removed the error, thanks! > > check the xm

RE: Problem encrypting the password using Camel Jasypt component

2014-07-24 Thread arvind
Thanks for your great help Ravi. I have regenerated the encrypted password using the master password and reading it from properties file but still the issue persists. Logs shows PropertiesComponent class parsing uri and properties but don't see JasyptPropertiesParser does any activity even if it

Re: Not able to define processor in Camel

2014-07-24 Thread nettome
Hi Claus, I did that and that has removed the error, thanks! check the xml below - http://camel.apache.org/schema/spring";> But, Now i face a new problem... the way the above route should work is that I read a file. do some processing on it and sa

Re: XSLT transformation produces junk charachters

2014-07-24 Thread vdhawan
Bingo!! Exactly what i am facing. . I am using camel 2.12. As per the bug definition, this issue is a known issue for Xalan 2.7.1. Just checked my maven dependency tree, i can see *xalan:xalan:jar:2.7.0:compile* net.sf.saxon:Saxon-HE:jar:9.4:compile [INFO] | +- org.jdom:jdom:jar:1.1:compile

Re: naming routes with setId doesn't work on a specific machine

2014-07-24 Thread dermoritz
on which class i can found "setRouteId"? It seems not part of RouteDefinition (http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/model/RouteDefinition.html) - i can't put it within route definition (from...to)?! but why to use another method here, until now this is work

Re: XSLT transformation produces junk charachters

2014-07-24 Thread Grzegorz Grzybek
Hello See this issue in CAMEL: https://issues.apache.org/jira/browse/CAMEL-7424 and this issue in CXF: https://issues.apache.org/jira/browse/CXF-5733 What version of Camel do you use? regards Grzegorz Grzybek 2014-07-24 14:34 GMT+02:00 vdhawan : > Thanks again Franz. > > Debugged a little bit

Re: Not able to define processor in Camel

2014-07-24 Thread Claus Ibsen
Ah you load routes from an xml file, then you cannot define spring beans etc. You can use the class component http://camel.apache.org/class And instead of then use where the uri is using the class component And then remove the On Thu, Jul 24, 2014 at 2:37 PM, nettome wrote: > Hi Claus, > I t

Re: Not able to define processor in Camel

2014-07-24 Thread nettome
Hi Claus, I tried that as below - http://camel.apache.org/schema/spring";> but then I'm getting the following error - unexpected element (uri:"", local:"bean"). Expected elements are <{http://camel.apache.org/schema/spring}aggregate>, -

Re: XSLT transformation produces junk charachters

2014-07-24 Thread vdhawan
Thanks again Franz. Debugged a little bit more and it doesnt look like a type conversion issue. If i pass just tinker with input xml to the xslt, it works in some cases. More specifically *does not* work and http://mynamespace> works. P.S - I am using xsl:copy-of select=*node()|@* in my XS

Re: Only one, but difrent endpoints in same route, is this the way ?

2014-07-24 Thread Claus Ibsen
Hi Maybe its this what you are looking for http://camel.apache.org/how-to-use-a-dynamic-uri-in-to.html On Thu, Jul 24, 2014 at 2:21 PM, Frankiboy wrote: > I have information in my header, where i look in a property fil, to get the > correct url. > > So in my SetRoutingKey.class i have this lin

Re: Not able to define processor in Camel

2014-07-24 Thread Claus Ibsen
Hi should be outside On Thu, Jul 24, 2014 at 2:22 PM, nettome wrote: > Hi, > I'm new to Camel and learning it step by step. > I have a scenario where i have to process a task in a route. I'm creating a > XML file and loading the routes from it. > Below is my xml file - > > http://camel.apache

Not able to define processor in Camel

2014-07-24 Thread nettome
Hi, I'm new to Camel and learning it step by step. I have a scenario where i have to process a task in a route. I'm creating a XML file and loading the routes from it. Below is my xml file - http://camel.apache.org/schema/spring";> Code to load the X

Only one, but difrent endpoints in same route, is this the way ?

2014-07-24 Thread Frankiboy
I have information in my header, where i look in a property fil, to get the correct url. So in my SetRoutingKey.class i have this line where i put the correct endpoint requestHeaders.put(CentralRouter.ENDPOINT, Util.getEndpoint()); but my .to(header(ENDPOINT).convertToString().toString())

Re: naming routes with setId doesn't work on a specific machine

2014-07-24 Thread Claus Ibsen
Hi Use .setRouteId to set the route id On Thu, Jul 24, 2014 at 2:00 PM, dermoritz wrote: > We encountered a very strange behavior. In our camel app we set the id of all > routes via "setId(id)". This is working fine so far. > One of our route builders generates n routes in a for loop and uses >

Re: XSLT transformation produces junk charachters

2014-07-24 Thread Franz Paul Forsthofer
Hi, then you should try to find out how the DOMSource is transformed to String. I guess it is transfomed first to a Stream and then to String. In this case you need the correct encoding. Regards Franz On Thu, Jul 24, 2014 at 2:02 PM, vdhawan wrote: > Thanks for response Franz. > > Bean returns

Re: XSLT transformation produces junk charachters

2014-07-24 Thread vdhawan
Thanks for response Franz. Bean returns an object of javax.xml.transform.Source. Source s = new DOMSource(myObj) exchange.getOut().setBody(s); Thanks -- View this message in context: http://camel.465427.n5.nabble.com/XSLT-transformation-produces-junk-charachters-tp5754357p5754366.html Sent

naming routes with setId doesn't work on a specific machine

2014-07-24 Thread dermoritz
We encountered a very strange behavior. In our camel app we set the id of all routes via "setId(id)". This is working fine so far. One of our route builders generates n routes in a for loop and uses + as route id. Here set Route is called on a ThrottleDefinition. This is working fin on mot of our

Re: XSLT transformation produces junk charachters

2014-07-24 Thread Franz Paul Forsthofer
Hi, what format does return the bean, if it is a byte array or stream then you have to specify the encoding in the step: Regards Franz On Thu, Jul 24, 2014 at 12:17 PM, vdhawan wrote: > Hello, > > In my camel context, i invoke a java bean (which does some processing) and > returns the body in

XSLT transformation produces junk charachters

2014-07-24 Thread vdhawan
Hello, In my camel context, i invoke a java bean (which does some processing) and returns the body in the exchange. So far so good. The second log message prints shows the XSLT transformation results in some junk charachters like and i can see an error in the logs javax.xml.transform.Tr

Re: Adding HTTP Headers to All Jetty Routes

2014-07-24 Thread Claus Ibsen
Hi You can use a custom http binding. See about this at http://camel.apache.org/jetty eg just extend the default, and add those headers in the writeResponse method, and call its super to do the actual writing. On Tue, Jul 22, 2014 at 9:20 PM, Gavagai wrote: > Hi all - > > I am trying to add som

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

2014-07-24 Thread Claus Ibsen
Use a processor instead of a bean if you want to mutate the exchange, or make the bean return exchange On Wed, Jul 23, 2014 at 5:13 PM, bocamel wrote: > I have the following in my camel context: > > > org.apache.cxf.binding.soap.SoapFault > true > > > > > It does not matter what I set

Re: Unit test XA enabled route

2014-07-24 Thread user3152723
Third try to fix it right : db connetion with JDBC, not odbc . -- View this message in context: http://camel.465427.n5.nabble.com/Unit-test-XA-enabled-route-tp5754352p5754354.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Unit test XA enabled route

2014-07-24 Thread user3152723
... tutorial on how to set up junit test for Camel route with jms and odbc endpoints (connetion pools) Thanks . osgi novice -- View this message in context: http://camel.465427.n5.nabble.com/Unit-test-XA-enabled-route-tp5754352p5754353.html Sent from the Camel - Users mailing list archive

Unit test XA enabled route

2014-07-24 Thread user3152723
Hello, Could someone please help me to get started: I’m looking for (working) example / tutorial on how to set up junit test for Camel route with jms and odbc endpoints (connetion pools) - USING BLUEPRINT OSGi (Karaf) and XA required. (Solution can be Fuse specific.) As an alternative, would it b

Re: How to restart the route if no response is returned from the web service call

2014-07-24 Thread Claus Ibsen
Hi I would write a java bean that controls the retry and whatnot as it seems you have a special need. And from the java bean you can use Camel's ProducerTemplate to easily call a Camel route / send a message to an endpoint. Then you can control the retry logic from java code which gives you the

Re: How to restart the route if no response is returned from the web service call

2014-07-24 Thread Jaishankar
This is my code.. This is properly executing but if no response then need to retry. Need some help Please -- View this message in context: http://camel.465427.n5.nabble.com/How-to-restart-the-route-if-no-response-is-returned-from-the-web-service-call-tp5754330p5754346.html Sent from the Camel -