Re: jackson2

2013-03-05 Thread David Karlsen
Did a pull request: https://github.com/apache/camel/pull/13 2013/3/4 Claus Ibsen : > Hi David > > Can you attach either a patch file on the JIRA so its easy to patch > with the general patch command. > Or do a github pull request or something. > > > > On Mon, Mar 4, 2013 at 11:15 AM, David Karlsen

Re: Camel XQuery - Saxon

2013-03-05 Thread Phobos
Hi, Stack trace is as follows, i'm putting together a test case now; org.apache.camel.RuntimeExpressionException: net.sf.saxon.trans.XPathException: Prefix math has not been declared at org.apache.camel.component.xquery.XQueryBuilder.evaluate(XQueryBuilder.java:144) at org.apache

Re: @CsvRecord reject

2013-03-05 Thread Jean Francois LE BESCONT
Thanks Willem for the help. I used 2.10.3 passed in 2.10.4 verify my toString method. I finally create an other project for this test and it work fine in this new project ... Probably an import problem ... 2013/3/5 Willem jiang > Can you double check the AED toString method? > I tried to writ

Re: Opposite of split

2013-03-05 Thread Claus Ibsen
On Tue, Mar 5, 2013 at 9:36 AM, Jean Francois LE BESCONT wrote: > Christian, The stream file mecanism is awsome ! > But I have not found how to manage dynamic name with it something like > : > .to("stream:file?fileName=file.csv&encoding=UTF-8") > works but I would like to do : > .to("str

Re: Headers are disapearing in RoutePolicy.onExchangeDone

2013-03-05 Thread Claus Ibsen
Hi Please always tell us what Camel version you use as we say here http://camel.apache.org/support And have you tried upgrading Camel etc. On Mon, Mar 4, 2013 at 10:35 PM, garrydias wrote: > Hi, Friends > > #1) consider the route below: > > /routePolicyRef="myRoutePolicy"> >

Re: ActiveMQ - Request Reply

2013-03-05 Thread Alban Joly
My question was stupid ... sorry I used the pipeline functionnality to modify the body of my request after posting in the ActiveMQ and it works! ... ${header.accept} contains 'application/json' {{module.publication.mq.json.succes

Re: @CsvRecord reject

2013-03-05 Thread Jean Francois LE BESCONT
If the CSVRecord is in the same package than the route it doesnt work ( in my previous project) but if I put it in a sub package it works fine 2013/3/5 Jean Francois LE BESCONT > Thanks Willem for the help. > > I used 2.10.3 passed in 2.10.4 verify my toString method. I finally > create an oth

Re: @CsvRecord reject

2013-03-05 Thread lb
As today if you have more bind-annotated classes you have to place them in separate packages, I'm supposed to work on this issue as soon as I have a little time. https://issues.apache.org/jira/browse/CAMEL-5958 -- View this message in context: http://camel.465427.n5.nabble.com/CsvRecord-rej

Re: Opposite of split

2013-03-05 Thread Jean Francois LE BESCONT
Thanks for the link, but dynamic URI works great in classic to file : .to("file://" + OUT_DIR + "?fileName=${file:name}&fileExist=Append") But in my case : .from .split().tokenize("\n").streaming() .unmarsh .bindy .bean .marshal .bindy .to("stream:file?fileName="+ OUT_DIR +"OUT.csv&encoding=UTF-8

Re: @CsvRecord reject

2013-03-05 Thread Jean Francois LE BESCONT
OK ! Thanks Ib 2013/3/5 lb > > As today if you have more bind-annotated classes you have to place them in > separate packages, I'm supposed to work on this issue as soon as I have a > little time. > > https://issues.apache.org/jira/browse/CAMEL-5958 > > > > > > -- > View this message in context

Re: Opposite of split

2013-03-05 Thread Claus Ibsen
On Tue, Mar 5, 2013 at 11:03 AM, Jean Francois LE BESCONT wrote: > Thanks for the link, but dynamic URI works great in classic to file : > > .to("file://" + OUT_DIR + "?fileName=${file:name}&fileExist=Append") > > But in my case : > .from > .split().tokenize("\n").streaming() > .unmarsh > .bindy >

Re: File component/language: preMove only

2013-03-05 Thread vss123
Hi, We also tried using preMove to avoid multiple instances of Camel picking the same file. But that does not seem to work. When we run with more than one instance, We get following error. cannot begin processing file: GenericFile[sample1.xml] due to: Cannot rename file: GenericFile[sample1.xml]

Re: Headers are disapearing in RoutePolicy.onExchangeDone

2013-03-05 Thread Claus Ibsen
On Mon, Mar 4, 2013 at 10:35 PM, garrydias wrote: > Hi, Friends > > #1) consider the route below: > > /routePolicyRef="myRoutePolicy"> > > > > / > > when my app runs that route, my RoutePolic

Create CXFEndpoint using Java

2013-03-05 Thread helander
I have a route that starts with from("cxf:bean:foo ")i.e. Java DSL I need to create/register the bean "foo" from Java, is that possible? Where can I find a working example? Thanks Lars -- View this message in context: http://camel.465427.n5.nabble.com/Create-CXFEndpoint-using-

Re: Opposite of split

2013-03-05 Thread Jean Francois LE BESCONT
Thks claus ! I have made a little benkmark between aggregate : .aggregate(header(Exchange.FILE_NAME_ONLY), new BodyInAggregatingStrategy()).completionSize(750) .completionTimeout(1500) .to("file://" +

Re: Create CXFEndpoint using Java

2013-03-05 Thread Claus Ibsen
On Tue, Mar 5, 2013 at 12:41 PM, helander wrote: > I have a route that starts with > > from("cxf:bean:foo ")i.e. Java DSL > > I need to create/register the bean "foo" from Java, is that possible? > Where can I find a working example? > Yes just register the bean in the Camel registry.

Re: Create CXFEndpoint using Java

2013-03-05 Thread helander
Thanks Claus, since I am not using Spring what class shall I use for the bean? CxfEndpoint? Thanks Lars -- View this message in context: http://camel.465427.n5.nabble.com/Create-CXFEndpoint-using-Java-tp5728570p5728573.html Sent from the Camel - Users mailing list archive at Nabble.com.

Camel Cache Query

2013-03-05 Thread gilboy
Hi Folks, If I have a route A which reads data from a dynamic source (data changes every x mins) and places it into a cache using the camel-cache component. I now have a route B that reads from the cache and sends the exchange to a bean where certain properties are set on the bean. Route B execut

Redundant Camel Applications

2013-03-05 Thread Gershaw, Geoffrey
Hello All, I am using Camel primarily for distributing Market Data from the quickfixj component. If the instance of camel goes down, I would like a second instance of Camel on another box/datacenter to take over. I have seen a solution that centered around acquiring a lock on table in a D

Camel multiple (nested) routes in one context

2013-03-05 Thread ddewaele
Hi, I have a Camel Spring XML where I define a camelcontext containing 2 routes. The main route is embedded inside the camlContext. At some point in the main route, based on someCondition, I need to decide to do either * standard processing (here I just need trigger a single camel processor) *

Re: ClassNotFoundException: org.apache.xalan.xsltc.trax.DOM2SAX

2013-03-05 Thread Smith-John
Sorry. Camel 2.10.3. Route looks like: from("cxf:endpoint").unmarshal(jaxb).process(processorA).to("bean:myBean").process(processorB).marshal(jaxb) Bundles added: org.apache.servicemix.bundles.xalan-2.7.1_6.jar org.apache.servicemix.bundles.xerces-2.10.0_1.jar org.apache.servicemix.bundles.bcel-5.

AWS S3 Request/Reply

2013-03-05 Thread json99
Hi, I'm trying to build a cloud enabled Camel client. To be able to transfer large files (>65k) I first create a AWS S3 file with a UUID as filename. To be able to process the messages in order I also create a AWS SQS message containing the UUID of the file in S3. When I receive a SQS message I wo

Camel Http4 SSL/TLS configuring scheme port

2013-03-05 Thread santhosh
i run camel in karaf.I use Http4 component for https connection with custom connectionConfigurer Class connectionConfigurer{ . SchemeRegistry registry = new SchemeRegistry(); registry.register(new Scheme("https", 443, new SSLSocketFactory(keystore, "mypassword", truststore))); } So what happ

Re: How to pass decrypted value in from tag

2013-03-05 Thread Claus Ibsen
Hi Yeah see this page http://camel.apache.org/using-propertyplaceholder.html On Mon, Mar 4, 2013 at 5:28 PM, sarfaraj wrote: > I refer > http://camel.apache.org/how-do-i-use-spring-property-placeholder-with-camel-xml.html > > I able to achieve the same > > /Sarfaraj > > > > -- > View this mess

Re: Prolems with parametrized bean method call via simple

2013-03-05 Thread Claus Ibsen
On Mon, Mar 4, 2013 at 6:55 PM, garrydias wrote: > Hi, Claus > > I was using 2.9.2. The same problem happens even after updating to 2.10.3: > > /java.text.ParseException: Unexpected end of expression/. > > Thanx > > []s > Yeah its a bug. I logged a ticket https://issues.apache.org/jira/browse/CAM

Re: Update database using Java DSL JPA

2013-03-05 Thread Claus Ibsen
On Mon, Mar 4, 2013 at 8:14 PM, golivamsi84 wrote: > thanks, it worked. > > But this is my other question, is it ok to write that logic in the Entity > bean class? or should this logic be part of the class where the route is > defined. Asking, so that I am following best practices. > JPA is about

Re: File component/language: preMove only

2013-03-05 Thread Claus Ibsen
On Tue, Mar 5, 2013 at 11:16 AM, vss123 wrote: > Hi, > > We also tried using preMove to avoid multiple instances of Camel picking the > same file. But that does not seem to work. When we run with more than one > instance, We get following error. > > cannot begin processing file: GenericFile[sample

Re: Multiple file logging

2013-03-05 Thread Claus Ibsen
Hi What SMX and Camel version do you use? And what do you want to log where. Its a bit unclear. On Tue, Mar 5, 2013 at 3:56 PM, valerian.merkling wrote: > Hi everyone ! > > What is already done : > > One camel context deployed in one Jar. > > Two route inside, one reading files in /route1/in ,

Re: Camel XQuery - Saxon

2013-03-05 Thread Claus Ibsen
Hi Yeah this is likely not supported currently. Take a look in the XQueryBuilder and see what code it takes to register that prefix / function. Maybe we can improve the component to support that. The problem would also be find a good way to configure this in Java and XML DSLs. On Tue, Mar 5, 20

Re: Redundant Camel Applications

2013-03-05 Thread Raul Kripalani
You could leverage the Apache ZooKeeper - Camel integration to elect a master using ZooKeeper. Check out this post: http://www.systemmobile.com/?p=399. Regards, Raúl. On 5 Mar 2013 13:37, "Gershaw, Geoffrey" wrote: > Hello All, > > > > I am using Camel primarily for distributing Market Data fr

Sending a custom HTTP Response in case of exception

2013-03-05 Thread Alban Joly
Hi all, I am trying to send to the caller an http response with a fixed message in the body (an an error status code of course) My route is : ... In case of exception (ActiveMq not connected for example), I received an response with an error status code but with the stack trace in the body.

Re: Handle exception

2013-03-05 Thread boday
if you don't want the error to propagate back up, then set handled(true) in your doCatch() block... also, don't try to mix try/catch with onException handling of the same error class...just pick one or the other jeff wrote > Hey ! > > I am trying to catch exception from validation properly. >

Re: Redundant Camel Applications

2013-03-05 Thread boday
couple of options...if you want to use ActiveMQ as your deployment container, then you can use its master/slave HA setup (http://activemq.apache.org/shared-file-system-master-slave.html) otherwise, see this article for a camel specific implementation: http://www.liquid-reality.de/display/liquid/

Re: Handle exception

2013-03-05 Thread Jean Francois LE BESCONT
But the rejected line stay in the route ... I have in my output line not validated by the process. Do you know how to ignore / skip not validate element passed to my error direct route ? 2013/3/5 Jean Francois LE BESCONT > Thanks ! > > Very helpfull ! > > I would this way to handle businessExce

Error Handling and HTTP response

2013-03-05 Thread Alban
Hi all, I am trying to send to the caller (HTTP request) an http response with a fixed message in the body (and an error status code, of course) My route is : ... In case of exception (ActiveMq not connected for example), I received an response with an error status code but with the stac

Re: Update database using Java DSL JPA

2013-03-05 Thread Baalu
I looked at your example and it used Camel 2.11, but we are using 2.10.3 where we dont have a hibernate component. We are using JPA component, is there any way we can use consumer.query or consumer.nativequery or a namedquery on it to update the database. What is the best way to update one column

Re: Camel XQuery - Saxon

2013-03-05 Thread Raul Kripalani
Try this: XQueryBuilder.xquery("myScriptWhichUsesTheMathPrefix").namespace("math", "java:java.lang.Math"). For example, within a filter() DSL: .filter(XQueryBuilder.xquery("myScriptWhichUsesTheMathPrefix").namespace("math", "java:java.lang.Math")) You can also use this import to avoid

Camel - ActiveMQ

2013-03-05 Thread jdev.hari
Hi, I am trying a simple program to read from a queue and handle it. I have started active mq locally and is running === try { CamelContext context = new DefaultCamelContext(); context.addComponent("activemq", ActiveMQComponent.activeM

Re: Camel XQuery - Saxon

2013-03-05 Thread Phobos
In principle that would appear to work as a filter, however in this instance I am using the XQuery template as a transformer endpoint. For example; from("direct:transform-queue"). to("xquery:transform.xqy"). to("log:com.mydomain.TransformerRoute?level=INFO"

jcr component

2013-03-05 Thread sjdms265
hi someone could help me with this issue http://stackoverflow.com/questions/15233420/apache-camel-jcr-jackrabbit In that page you can watch the description of my problem in a friendly way ;) thanks in advance -- View

Re: Camel XQuery - Saxon

2013-03-05 Thread Raúl Kripalani
In theory, there should be nothing to configure at the Camel level if you declare the namespace in the Prolog of the template. The XQuery template should be self-sufficient and independent from the runtime. Have you tried placing the namespace URI inside quote marks? I think you're just missing

Re: Camel Cache Query

2013-03-05 Thread Christian Müller
I think it's not clear what you want, at least for me. Can you explain it more detailed? Sent from a mobile device Am 05.03.2013 06:36 schrieb "gilboy" : > Hi Folks, > > If I have a route A which reads data from a dynamic source (data changes > every x mins) and places it into a cache using the c

Re: Camel Cache Query

2013-03-05 Thread Raúl Kripalani
What happens inside the bean is up to the logic you develop inside the bean's method. Care to share some code so we get a better feel for what you're trying to achieve? In principle, A is a cache producer and B is a cache consumer. If they both interact with the same cache, B will receive notif

Re: Camel multiple (nested) routes in one context

2013-03-05 Thread Raúl Kripalani
Could you post some code to illustrate your case, so we can provide more accurate feedback? The way that onException handlers are set up depends on whether you use Java DSL or Spring DSL. Regards, Raúl. On Mar 5, 2013, at 13:43, ddewaele wrote: > Hi, > > I have a Camel Spring XML where I defi

Re: Sending a custom HTTP Response in case of exception

2013-03-05 Thread Christian Müller
In case something went wrong you want to return an HTTP status code not equal to 200 and custom message, right? We do this by using onException... What did you tried? Sent from a mobile device Am 05.03.2013 11:06 schrieb "Alban Joly" : > Hi all, > > > I am trying to send to the caller an http res

Re: Redundant Camel Applications

2013-03-05 Thread Christian Müller
Apache Karaf / ServiceMix offers this out of the box. Sent from a mobile device Am 05.03.2013 06:37 schrieb "Gershaw, Geoffrey" < geoffrey.gers...@credit-suisse.com>: > Hello All, > > > > I am using Camel primarily for distributing Market Data from the > quickfixj component. If the instance of c

Re: Writing files in mutiple names thru Camel

2013-03-05 Thread Raúl Kripalani
If you're trying to copy the same file to multiple locations, use the multicast() EIP with streamCaching enabled [1]. Also, if you need to decide/compute the output destination dynamically, use the choice() EIP if your decision criteria are limited, or the dynamicRouter() EIP if the decision is

Re: Enrich with data from SQL

2013-03-05 Thread Raúl Kripalani
Can we see the code of AggregationStrategyRessource? Regards, Raúl. On Mar 5, 2013, at 23:30, Jean Francois LE BESCONT wrote: > Hey, > > I have this > > http://camel.465427.n5.nabble.com/Enrich-message-with-data-from-dynamic-sql-query-td5329427.html > > But I haven't found a solution to my que

Re: ActiveMQ - Request Reply

2013-03-05 Thread Raúl Kripalani
Great that you figured it out by yourself! ;) Regards, Raúl. On Mar 5, 2013, at 09:16, Alban Joly wrote: > My question was stupid ... sorry > > > I used the pipeline functionnality to modify the body of my request after > posting in the ActiveMQ and it works! > ... > >

Re: Camel - ActiveMQ

2013-03-05 Thread Raúl Kripalani
Port 8161 tends to be the port to access the AMQ Web Console from a browser. You should make Camel connect to the transportConnector exposed by ActiveMQ, which by default listens on port 61616. Check the element of the AMQ broker XML configuration file. Does this help? Regards, Raúl. On Mar 5

Re: Error Handling and HTTP response

2013-03-05 Thread Raúl Kripalani
Can you set the Content-Type explicitly, before or after the transform? text/plain If you want to specify the HTTP response code, in camel-jetty you would set it like this: 500 Hopefully it's the same for camel-servlet. Regards, Raúl. On Mar 5, 2013, at 20:37, Alban wrote: > Hi all, > >

Re: Camel XQuery - Saxon

2013-03-05 Thread Willem jiang
I just checked the code of camel-xquery component, it supports to set the namespaces through the uri. myNamespace is map instance which you need to bind it into CamelContext Registry. from("direct:transform-queue"). to("xquery:transform.xqy?namespaces=#myNamespace"). to("log:com.mydomain.Trans

Re: direct-vm in OSGI

2013-03-05 Thread Raúl Kripalani
Blueprint starts bundles asynchronously, which leads to the start level not being honoured in most cases. And if it is honoured, it's by fluke and not by design. Aries Blueprint 0.4 introduces an option to make bundles start synchronously [1] & [2], but it seems to be available only from Karaf 3

Re: Multiple file logging

2013-03-05 Thread Christian Müller
You have to configure it in SMX. In our log "EIP" [1] you can configure the used log name. And in your "org.ops4j.pax.logging.cfg" config file you can configure in which file which appender should log. [1] http://camel.apache.org/logeip.html Best, Christian On Tue, Mar 5, 2013 at 3:56 PM, valer

Re: Camel XQuery - Saxon

2013-03-05 Thread Raul Kripalani
I suppose this declares the namespaces through the StaticContext. But according to the XQuery spec, declaring them in the Prolog (leading section of the XQuery expression file) should have the same effect. And it's easier to maintain in the long run. Regards, Raúl. On 6 Mar 2013 01:08, "Willem jia

Re: camel-smpp optional param issue ?

2013-03-05 Thread Michaelyap
@Christian is there an ETA to this. How long are your release cycles typically ? We unfortunately have a reasonably aggressive timeline to this project and need to plan ahead. -- View this message in context: http://camel.465427.n5.nabble.com/camel-smpp-optional-param-issue-tp5728376p5728591.ht

Camel Route Transaction Per Second so low

2013-03-05 Thread mari_yaguchi
Dear all, I use Camel Route to route some files with the target is located in the same disk as the source folder. My Camel Route is : http://camel.apache.org/schema/spring";> The file size is 1kb and there is 500 files i want to route in the Source236 folder. The environment I use is Cent

Re: Camel Route Transaction Per Second so low

2013-03-05 Thread Willem jiang
If you just copy the file from one place to other, I don't think it makes sense with such low TPS. I'm not sure if it relates to there are lots of files in the Source directory. Did you run some test with few files? BTW, did you check the log file to see if camel complain anything? -- Willem

Re: camel-smpp optional param issue ?

2013-03-05 Thread Christian Müller
We plan to cut Camel 2.11.0 soon - may be next week... If you can provide a fix with unit tests in the next days, I think we can make sure it will go into 2.11.0. Because I'm in vacation until beginning of next week, I cannot spend so much time on this issue. If it miss 2.11.0, it will take 6 - 8 w

Re: File component/language: preMove only

2013-03-05 Thread vss123
Sorry. The Camel version we use is 2.10.3. We have a drop-zone in a file system where the other systems drop xml files. With this project we use camel to pickup these files and do processing to communicate with few other systems. We want to run multiple instances of our project, so that we can pr

Re: Camel Route Transaction Per Second so low

2013-03-05 Thread Willem jiang
Are you using NFS or just mount the directory from other box ? -- Willem Jiang Red Hat, Inc. FuseSource is now part of Red Hat Web: http://www.fusesource.com | http://www.redhat.com Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English) http://jnn.iteye.c

Re: Enrich with data from SQL

2013-03-05 Thread Jean Francois LE BESCONT
thks Raul For the moment it's a simple : public class AggregationStrategyRessource implements AggregationStrategy { @Override public Exchange aggregate(Exchange original, Exchange resource) { return original; } } If I put a debug point on it, it is never fired 2013/3/

Re: Enrich with data from SQL

2013-03-05 Thread Jean Francois LE BESCONT
If i do: public class AggregationStrategyRessource implements AggregationStrategy { @Override public Exchange aggregate(Exchange original, Exchange resource) { int i = 1 / 0; return original; } } no exception are thows. 2013/3/6 Jean Francois LE BESCONT > thks Raul > > For t

Re: Camel Route Transaction Per Second so low

2013-03-05 Thread mari_yaguchi
I am sorry, but i dont really get you, what do you mean about mount the directory from other box? I route the files from folder Source236 to folder Target. That two folder are located in the same local disk. -- View this message in context: http://camel.465427.n5.nabble.com/Camel-Route-Transa

Re: Camel Route Transaction Per Second so low

2013-03-05 Thread Willem jiang
That is strange, did you try to run the test on the other box ? -- Willem Jiang Red Hat, Inc. FuseSource is now part of Red Hat Web: http://www.fusesource.com | http://www.redhat.com Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English) http://jnn.iteye.

Re: direct-vm in OSGI

2013-03-05 Thread Charles Moulliard
Thx for the response Raul. If that does not work, the alternative is to use the transversal camel-NMR component which is an OSGI service and will avoid that kind of issue. Exchanges will be asynchronous by default. Even if you can turn out the endpoint to synchronize the exchanges, this component s

Fwd: direct-vm in OSGI

2013-03-05 Thread Guillaume Nodet
On Wed, Mar 6, 2013 at 2:17 AM, Raúl Kripalani wrote: > Blueprint starts bundles asynchronously, which leads to the start level > not being honoured in most cases. And if it is honoured, it's by fluke and > not by design. > Aries Blueprint 0.4 introduces an option to make bundles start > synchron

Re: Camel Route Transaction Per Second so low

2013-03-05 Thread Claus Ibsen
Hi This user also posted the same question at this forum http://fusesource.com/forums/thread.jspa?threadID=4673&tstart=0 Just mind that this is being debated multiple places. @Steve, its good curtsy to mention that you have posted the same question at other places. On Wed, Mar 6, 2013 at 4:15

Re: camel-smpp optional param issue ?

2013-03-05 Thread Claus Ibsen
On Tue, Mar 5, 2013 at 7:57 PM, Michaelyap wrote: > @Christian is there an ETA to this. How long are your release cycles > typically ? We unfortunately have a reasonably aggressive timeline to this > project and need to plan ahead. > If you contribute patches to Camel then they are likely to get