RE: sftp without passward, unable to connect

2013-10-30 Thread Siano, Stephan
Hi,

Are you using sftp or ftps? The ftpClient.keyStore.file is a Java keystore for 
using client certificate based authentication with ftps (ftp over SSL), and 
your file is a private client key for SSH (in a completely different format 
(that's why you get the error). For sftp (an ftp-like protocol over ssh) you 
need to set the parameter privateKeyFile instead.

Best regards
Stephan

-Original Message-
From: kalber [mailto:karlheinz.al...@swslt.com] 
Sent: Mittwoch, 30. Oktober 2013 16:54
To: users@camel.apache.org
Subject: RE: sftp without passward, unable to connect

Hi,

yes i'm using private key to authenticate to the server. I add how you
suggest the uri options from ftps component as 
follow :
1. ftpClient.keyStore.file=/home/kalber/xx/id_rsa
2. ftpClient.keyStore.password=password ( only to avoid null pointer, no
password need )

After this i get a java.io.IOException: Invalid keystore format.

Have i to configure out ftpClient.keyStore.type or 
ftpClient.keyStore.algorithm ?
I tried it with RSA but nothing works.





-
kh
--
View this message in context: 
http://camel.465427.n5.nabble.com/sftp-without-passward-unable-to-connect-tp5742397p5742412.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Component Resolution, Camel/SMX Race Condition?

2013-10-30 Thread Willem jiang
As the cxfbeanReference wasn’t used by Camel as an OSGi service, so you setting 
cannot block the loading of the CamelContext.
How about adding the Required-Bundle of camel-cxf in your application bundle?


--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) 
(English)
  http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem





On Thursday, October 31, 2013 at 5:44 AM, Calvert, Zach (Zach)** CTR ** wrote:

> This is somewhat of a cross post between here and the ApacheServiceMix 
> mailing list, but I'm thinking I should have fired this email to camel in the 
> first place. I apologize for the cross post in advance.
>  
> I'm making use of the cxfbean component in Apache ServiceMix 4.5.3. I have 
> reviewed the source and OSGI services being exposed here to try to get around 
> the race condition I am experiencing, but while the service is up and 
> running, ServiceMix/Camel does not yet recognize the component and I'm not 
> sure who to direct this question/problem to.
>  
> Breakdown:
> I have a bundle which has the following route:
>  
> 
> http://0.0.0.0:9089/health/?matchOnUriPrefix=true"; />
> 
> 
>  
> The health service implementation is a standard javax.ws.rs annotated class. 
> The cxfbean component is exposed in the camel-cxf feature under the 
> camel-cxf-2.10.7 bundle (I have confirmed). To try to enforce that the 
> cxfbean service really, really is running, I have added
>  interface="org.apache.camel.spi.ComponentResolver"
> filter="(component=cxfbean)" />
> to my bundle. This osgi reference is met and fully populated, however I still 
> get
> "
> Caused by: org.apache.camel.FailedToCreateRouteException: Failed to create
> route route1 at: >>> To[cxfbean:healthService] <<< in route:
> Route[[From[jetty:http://0.0.0.0:9089... because of Failed to resolve
> endpoint: cxfbean://healthService due to: No component found with scheme:
> cxfbean
> ---"
> in my ServiceMix startup. Note that this bundle is deployed in the
> apache-servicemix-4.5.3/deploy directory on a Linux machine.
>  
> This issue can be resolved simply by waiting for ServiceMix to be started
> for a few minutes and then run
> touch 
> ./apache-servicemix-4.5.3/deploy/ecs.bundles.health-2.3.0.25-SNAPSHOT.jar
>  
> I would like to have the bundle block until the "cxfbean" component is fully 
> started. Again this is a race condition and functionality is fully restored 
> by waiting a couple of minutes and then running touch on the bundle that 
> exposes this camel route.
>  
> Is there a way to say "Really wait on starting this bundle until the cxfbean 
> component is fully started and ready to go"?
>  
>  
> Thank you,
> Zach Calvert





Re: Including newlines towards stream/file endpoint

2013-10-30 Thread Henryk Konsek
Hi Robert,

> How would one add a newline for each message being sent through this route?

Keep in mind that newlines are automatically appended to the string
messages. Appropriate excerpt from our documentation [1]:

// Send String payload to the standard output.
// Message will be followed by the newline.
template.sendBody("direct:in", "Hello Text World");

// Send byte[] payload to the standard output.
// No newline will be added after the message.
template.sendBody("direct:in", "Hello Bytes World".getBytes());

In your case you seems to receive non-String messages from the topic
(which are automatically converted to the byte[] messages by the
producer). What about converting [2] them to the Strings then before
they hit the producer endpoint? Strings will be automatically appended
by the newline.

Cheers.

[1] http://camel.apache.org/stream.html
[2] http://camel.apache.org/convertbodyto.html

-- 
Henryk Konsek
http://henryk-konsek.blogspot.com


Component Resolution, Camel/SMX Race Condition?

2013-10-30 Thread Calvert, Zach (Zach)** CTR **
This is somewhat of a cross post between here and the ApacheServiceMix mailing 
list, but I'm thinking I should have fired this email to camel in the first 
place.  I apologize for the cross post in advance.

I'm making use of the cxfbean component in Apache ServiceMix 4.5.3.  I have 
reviewed the source and OSGI services being exposed here to try to get around 
the race condition I am experiencing, but while the service is up and running, 
ServiceMix/Camel does not yet recognize the component and I'm not sure who to 
direct this question/problem to.

Breakdown:
I have a bundle which has the following route:


http://0.0.0.0:9089/health/?matchOnUriPrefix=true"; />



The health service implementation is a standard javax.ws.rs annotated class.  
The cxfbean component is exposed in the camel-cxf feature under the 
camel-cxf-2.10.7 bundle (I have confirmed).  To try to enforce that the cxfbean 
service really, really is running, I have added

to my bundle.  This osgi reference is met and fully populated, however I still 
get
"
Caused by: org.apache.camel.FailedToCreateRouteException: Failed to create
route route1 at: >>> To[cxfbean:healthService] <<< in route:
Route[[From[jetty:http://0.0.0.0:9089... because of Failed to resolve
endpoint: cxfbean://healthService due to: No component found with scheme:
cxfbean
---"
in my ServiceMix startup.  Note that this bundle is deployed in the
apache-servicemix-4.5.3/deploy directory on a Linux machine.

This issue can be resolved simply by waiting for ServiceMix to be started
for a few minutes and then run
touch ./apache-servicemix-4.5.3/deploy/ecs.bundles.health-2.3.0.25-SNAPSHOT.jar

I would like to have the bundle block until the "cxfbean" component is fully 
started.  Again this is a race condition and functionality is fully restored by 
waiting a couple of minutes and then running touch on the bundle that exposes 
this camel route.

Is there a way to say "Really wait on starting this bundle until the cxfbean 
component is fully started and ready to go"?


Thank you,
Zach Calvert



Re: Camel-HTTP4:2.11.2:ContentType does not returns "multipart/form-data;boundary=---------------------------j2radvtrk"

2013-10-30 Thread Claus Ibsen
Hi

Can you log a JIRA ticket?
Also if you have a fix then you are welcome to provide a patch.
http://camel.apache.org/support


On Wed, Oct 30, 2013 at 3:09 PM, Amit  wrote:
> I found the issue in camel-http4 component. The
> HttpProducer.createRequestEntity method has been changed to parse the
> contentType. The ContentType.parse method returns "multipart/form-data"
> instead of
> "multipart/form-data;boundary=---j2radvtrk". If you
> change HttpProducer.createRequestEntity to use ContentType.create method it
> works fine.
>
>
> We have below test routes does not work because of above issue.
>
> http://camel.apache.org/schema/spring"; trace="true">
>   
> 
> 
> 
> import org.apache.commons.lang.RandomStringUtils;
>
> String charset = (('a'..'z') + ('0'..'9')).join();
> Integer length = 9;
> return "---" +
> RandomStringUtils.random(length, charset.toCharArray());
> 
> 
> 
> multipart/form-data;boundary=${property.boundary}
> 
> 
> http4://httpbin.org/post
> 
> 
> POST
> 
> 
> 
>
> 
> 
>  uri="http4://httpbin?httpClient.cookiePolicy=ignoreCookies&httpClient.soTimeout=3&httpClient.connectionTimeout=3"/>
> 
> 
> application/json
> 
> 
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Camel-HTTP4-2-11-2-ContentType-does-not-returns-multipart-form-data-boundary-j2radvtrk-tp5742407.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
Red Hat, Inc.
Email: cib...@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: Waiting for a bean to finish before continuing route

2013-10-30 Thread geoffreydv
The reason I created the persistence route is that there will be other routes
calling this one that do not have to perform any actions afterwards. Do you
have any example on what you mean with publishing an event to signal the
persisting is completed?



--
View this message in context: 
http://camel.465427.n5.nabble.com/Waiting-for-a-bean-to-finish-before-continuing-route-tp5742398p5742422.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: createRegistry() No longer Called in CamelTestSupport, Docs Wrong

2013-10-30 Thread Claus Ibsen
Hi

What Camel version do you use from -> to in the upgrade.

What test case do you use. Can you post some code.
createRegistry is called in the Java CamelTestSupport class which works fine.


On Wed, Oct 30, 2013 at 5:29 PM, kraythe .  wrote:
> In reading this url  it says that
> we should override createRegistry() in order to bind additional objects
> into the registry in a test. unfortunately this doesn't work as the old
> startup has been changed in favor of the option to initialize per class or
> per method. Now I have to do the following code to get something in the
> registry. In my createRouteBuilder method I write:
>
> *final* SimpleRegistry reg = (SimpleRegistry)
> ((PropertyPlaceholderDelegateRegistry)
> getContext().getRegistry()).getRegistry();
>
> reg.put("testdb", dataSource);
>
> The documentation needs to be updated or, better yet, createRegistry needs
> to be put back into the loop. If you override it now and put inside a trace
> println, it will never get printed.
>
> *Robert Simmons Jr. MSc. - Lead Java Architect @ EA*
> *Author of: Hardcore Java (2003) and Maintainable Java (2012)*
> *LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39*



-- 
Claus Ibsen
-
Red Hat, Inc.
Email: cib...@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: Timeouts in CXFRS

2013-10-30 Thread Nils Andermo
Yes, the timeout configuration works when I add the endpoint configuration to
the config file 
http://${keysRestServer}/licensekey/batch"; />

and change my route to
.to("cxfrs://bean://rsKeysBatch")



--
View this message in context: 
http://camel.465427.n5.nabble.com/Timeouts-in-CXFRS-tp5741142p5742415.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: cxf proxy

2013-10-30 Thread Aki Yoshida
you need to create a response soap message and set to it to the camel
message body. Basically, this is the reverse operation of what you are
doing in your processor that reads the soap message from the camel's
message body.



2013/10/24 cbuxbaum :
> Hi all,
>
> I have successfully implemented a proxy web service, and now have another
> question.
>
> If I expose my proxy web service, and then use Camel Processors to do some
> processing of the input like using the input xml to make  Web Service calls
> (outside of the cxf context), is there a simple way of attaching the result
> to the outbound CXF message?  Basically, I want to get my response and then
> wrap it in whatever CXF needs to be understood.  Here is my example route,
> wherte I have commented out the CXF bean to call the real webservice, and am
> instead using my getquotewebserviceClient to make a WS post end retrieve the
> response.  Now I want to return that response in the context of CXF.:
>
>
>   http://camel.apache.org/schema/spring";>
>  uri="{{webserviceproxy.realwsurl}}?throwExceptionOnFailure=false"/>
>
> 
>
>   
>
>   
>   
>
>   
>
>
>   
> 
>   
>
> Thanks,
>
> Carl
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/cxf-proxy-tp5742132.html
> Sent from the Camel - Users mailing list archive at Nabble.com.


createRegistry() No longer Called in CamelTestSupport, Docs Wrong

2013-10-30 Thread kraythe .
In reading this url  it says that
we should override createRegistry() in order to bind additional objects
into the registry in a test. unfortunately this doesn't work as the old
startup has been changed in favor of the option to initialize per class or
per method. Now I have to do the following code to get something in the
registry. In my createRouteBuilder method I write:

*final* SimpleRegistry reg = (SimpleRegistry)
((PropertyPlaceholderDelegateRegistry)
getContext().getRegistry()).getRegistry();

reg.put("testdb", dataSource);

The documentation needs to be updated or, better yet, createRegistry needs
to be put back into the loop. If you override it now and put inside a trace
println, it will never get printed.

*Robert Simmons Jr. MSc. - Lead Java Architect @ EA*
*Author of: Hardcore Java (2003) and Maintainable Java (2012)*
*LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39*


Re: Waiting for a bean to finish before continuing route

2013-10-30 Thread Christian Posta
Well using queues is typically used for asynchronous (or non-blocking)
conversations.
The route doing the persistence would have to publish an event that
signifies "persistence has completed" ... and your first route block until
you've received that (a sort of "request-reply" of sorts).


On Wed, Oct 30, 2013 at 3:29 AM, geoffreydv  wrote:

> Hello,
>
> I was wondering if something I have in mind is possible using Camel.
>
> Our projects needs a route to listen for jms messages, then persist
> something to the database in a custom bean using another route and only
> continue the first route once the item has been successfully persisted.
>
> I was hoping something like this would work:
>
> 
> 
> 
> 
> 
> 
>
> 
> 
> 
> 
>
> What I need is the itemPersistedActivator bean's method to only be called
> when the request has been persisted to the database. I have simulated a
> waiting time in the requestPersister (5 seconds). Currently the route
> continues as the message has been dispatched.
>
> Any ideas on this?
> Thanks
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Waiting-for-a-bean-to-finish-before-continuing-route-tp5742398.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta


RE: sftp without passward, unable to connect

2013-10-30 Thread kalber
Hi,

yes i'm using private key to authenticate to the server. I add how you
suggest the uri options from ftps component as 
follow :
1. ftpClient.keyStore.file=/home/kalber/xx/id_rsa
2. ftpClient.keyStore.password=password ( only to avoid null pointer, no
password need )

After this i get a java.io.IOException: Invalid keystore format.

Have i to configure out ftpClient.keyStore.type or 
ftpClient.keyStore.algorithm ?
I tried it with RSA but nothing works.





-
kh
--
View this message in context: 
http://camel.465427.n5.nabble.com/sftp-without-passward-unable-to-connect-tp5742397p5742412.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Apache Camel and Synchronized methods in processor

2013-10-30 Thread Christian Posta
if you have multiple threads running the route (maybe show the full route,
and explain how it gets invoked) and you're sharing state in your beans,
then you'll probably want some kind of locking/mutex. adding a synchronized
keyword to the java method could help. maybe you could explain a little
more about the myMethod/myBean and what it does/looks like?


On Wed, Oct 30, 2013 at 4:48 AM, M314  wrote:

> In my routing messages pass myBean twice. Once I have:
>
> ... //some code
> .process(myBean)
> ... //some code
> .method("myBean", "myMethod")
> ... //some code
>
> This bean have to be synchronized. I whould like just to add key word:
> 'synchronized' to methods: 'myMethod' and 'process', but those mehods are
> invoked by framewok itself (Camel), so I'm a bit afraid if I can do that
> without any consequences. I do not know how exaclly Camel works. So can I
> add to those methods word 'synchronized', and what problems can I come
> across?
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Apache-Camel-and-Synchronized-methods-in-processor-tp5742401.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta


Re: Reusing definition of Data Formats

2013-10-30 Thread Cristiano Costantini
Thank you!
I will search the ticket on JIRA and follow the evolution from there.

bye,
Cristiano


2013/10/30 Claus Ibsen 

> Yeah there is a ticket about allow to configure other stuff than
> routes in  so someday in Camel we will support this more
> easily.
>
>
>
>
> On Wed, Oct 30, 2013 at 11:54 AM, Cristiano Costantini
>  wrote:
> > Hi All,
> >
> > I'm using happily the  elements to define routes once and
> > then use them multiple times.
> > Well, I actually need to basically use the routes twice:
> > -  in the tests, with local endpoints and mocks
> > -  in production, inside karaf, where here are osgi service references I
> > don't have in tests
> >
> > Today I needed to use a  but this break my strategy.
> >
> >
> > I use 3 spring beans xml files, "routes.xml", "test.xml" and "osgi.xml":
> > - "routes.xml" contains 
> > - "test.xml" contains a  for development and testing
> > - "osgi.xml" contains a  for deployment
> >
> > in tests I run "routes.xml" and "test.xml", while in production I deploy
> > "routes.xml" and "osgi.xml"
> >
> > I like this strategy because I change often the camel routes and in this
> > way I don't have to align the ones in the tests and the one deployed to
> > karaf.
> >
> >
> > However  can't be used in , so I have to
> > define it in the , this mean I have to define a
> dataformat
> > in both "test.xml" and "osgi.xml"...
> >
> > Anyone have an idea on how I can re-use a dataformat defined somewhere
> > else?
> > In practice I would like to define the  in "routes.xml" or
> > similar so I don't have to repeat that definition...
> >
> > Thank you
> > Cristiano
>
>
>
> --
> Claus Ibsen
> -
> Red Hat, Inc.
> Email: cib...@redhat.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
>


How to stop URLDecoding on *path* of URI (*NOT* query parameters)?

2013-10-30 Thread pmcb55
Hi,

Using Camel 2.11.0, we have an unusual requirement of needing to invoke this
type of URI:

*http://www.example.com/service/hello%3Fworld/*

Note the '%3F' in the *path* of the URI, which is the encoding for '?'. 

This is very different than handling query parameters, for which we
successfully use the latest 'RAW()' feature of Camel (thankfully 'RAW()' was
implemented just in time for us to use it!), i.e.

*http://www.example.com/service?query=RAW(hello?world)*

So if I attempt the following Camel code:

 
*from("direct:test").to("http4://www.example.com/service/hello%3Fworld/");*

...Camel URLDecodes this URI to instead invoke on:
http4://www.example.com/service/hello?world/, which HTTP interprets as a URI
having a query parameter of 'world/'.

If I use a browser to invoke our URI:
'http://www.example.com/service/hello%3Fworld/', it works fine. So I guess
we need something like 'RAW()' for the URI path (and obviously '?' is not
the only character we need to work with, we need '/', '\', '&', '#' etc.
too!).

Does anyone know if this is possible with Camel??

Thanks,

Pat.




--
View this message in context: 
http://camel.465427.n5.nabble.com/How-to-stop-URLDecoding-on-path-of-URI-NOT-query-parameters-tp5742409.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Reusing definition of Data Formats

2013-10-30 Thread Claus Ibsen
Yeah there is a ticket about allow to configure other stuff than
routes in  so someday in Camel we will support this more
easily.




On Wed, Oct 30, 2013 at 11:54 AM, Cristiano Costantini
 wrote:
> Hi All,
>
> I'm using happily the  elements to define routes once and
> then use them multiple times.
> Well, I actually need to basically use the routes twice:
> -  in the tests, with local endpoints and mocks
> -  in production, inside karaf, where here are osgi service references I
> don't have in tests
>
> Today I needed to use a  but this break my strategy.
>
>
> I use 3 spring beans xml files, "routes.xml", "test.xml" and "osgi.xml":
> - "routes.xml" contains 
> - "test.xml" contains a  for development and testing
> - "osgi.xml" contains a  for deployment
>
> in tests I run "routes.xml" and "test.xml", while in production I deploy
> "routes.xml" and "osgi.xml"
>
> I like this strategy because I change often the camel routes and in this
> way I don't have to align the ones in the tests and the one deployed to
> karaf.
>
>
> However  can't be used in , so I have to
> define it in the , this mean I have to define a dataformat
> in both "test.xml" and "osgi.xml"...
>
> Anyone have an idea on how I can re-use a dataformat defined somewhere
> else?
> In practice I would like to define the  in "routes.xml" or
> similar so I don't have to repeat that definition...
>
> Thank you
> Cristiano



-- 
Claus Ibsen
-
Red Hat, Inc.
Email: cib...@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Camel-HTTP4:2.11.2:ContentType does not returns "multipart/form-data;boundary=---------------------------j2radvtrk"

2013-10-30 Thread Amit
I found the issue in camel-http4 component. The
HttpProducer.createRequestEntity method has been changed to parse the
contentType. The ContentType.parse method returns "multipart/form-data"
instead of
"multipart/form-data;boundary=---j2radvtrk". If you
change HttpProducer.createRequestEntity to use ContentType.create method it
works fine. 


We have below test routes does not work because of above issue.

http://camel.apache.org/schema/spring"; trace="true">
  



import org.apache.commons.lang.RandomStringUtils;

String charset = (('a'..'z') + ('0'..'9')).join();
Integer length = 9;
return "---" +
RandomStringUtils.random(length, charset.toCharArray());



multipart/form-data;boundary=${property.boundary}


http4://httpbin.org/post


POST









application/json






--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-HTTP4-2-11-2-ContentType-does-not-returns-multipart-form-data-boundary-j2radvtrk-tp5742407.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Apache Camel and Synchronized methods in processor

2013-10-30 Thread M314
In my routing messages pass myBean twice. Once I have:

... //some code
.process(myBean)
... //some code
.method("myBean", "myMethod")
... //some code

This bean have to be synchronized. I whould like just to add key word:
'synchronized' to methods: 'myMethod' and 'process', but those mehods are
invoked by framewok itself (Camel), so I'm a bit afraid if I can do that
without any consequences. I do not know how exaclly Camel works. So can I
add to those methods word 'synchronized', and what problems can I come
across?



--
View this message in context: 
http://camel.465427.n5.nabble.com/Apache-Camel-and-Synchronized-methods-in-processor-tp5742401.html
Sent from the Camel - Users mailing list archive at Nabble.com.


RE: sftp without passward, unable to connect

2013-10-30 Thread Siano, Stephan
Hi,

If you are doing command line sftp without a password that usually means that 
you are using a private key to authenticate to the server. There are parameters 
for this private key (and the passphrase) in Camel's sftp component (see the 
documentation for details). If you are using the sftp client of openssh from 
the command line (e.g. if you are doing this from a Linux box) the private key 
is in ~/.ssh/id_dsa or ~/.ssh/id_rsa. If you don't know about a passphrase and 
it works anyway there is probably no passphrase for this file.

Best regards
Stephan

-Original Message-
From: kalber [mailto:karlheinz.al...@swslt.com] 
Sent: Mittwoch, 30. Oktober 2013 11:24
To: users@camel.apache.org
Subject: sftp without passward, unable to connect

I try to download files via sftp from a server. This works fine from command
line , here the command

sftp dat2...@tim.mbus:sasa/ftp/orario*.* /tmp

Trying to use ftp camels ftp component, a connection is not established.

What must i configure to connect with the server via sftp ?

Below the log output.

30-10-2013 11:18:29 INFO   JSCH -> Connecting to tim.mbus.sad.it port 22
30-10-2013 11:18:29 INFO   JSCH -> Connection established
30-10-2013 11:18:29 INFO   JSCH -> Remote version string:
SSH-2.0-OpenSSH_5.0
30-10-2013 11:18:29 INFO   JSCH -> Local version string: SSH-2.0-JSCH-0.1.49
30-10-2013 11:18:29 INFO   JSCH -> CheckCiphers:
aes256-ctr,aes192-ctr,aes128-ctr,aes256-cbc,aes192-cbc,aes128-cbc,3des-ctr,arcfour,arcfour128,arcfour256
30-10-2013 11:18:29 INFO   JSCH -> aes256-ctr is not available.
30-10-2013 11:18:29 INFO   JSCH -> aes192-ctr is not available.
30-10-2013 11:18:29 INFO   JSCH -> aes256-cbc is not available.
30-10-2013 11:18:29 INFO   JSCH -> aes192-cbc is not available.
30-10-2013 11:18:29 INFO   JSCH -> arcfour256 is not available.
30-10-2013 11:18:29 INFO   JSCH -> CheckKexes: diffie-hellman-group14-sha1
30-10-2013 11:18:29 INFO   JSCH -> diffie-hellman-group14-sha1 is not
available.
30-10-2013 11:18:29 INFO   JSCH -> SSH_MSG_KEXINIT sent
30-10-2013 11:18:29 INFO   JSCH -> SSH_MSG_KEXINIT received
30-10-2013 11:18:29 INFO   JSCH -> kex: server:
diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
30-10-2013 11:18:29 INFO   JSCH -> kex: server: ssh-rsa,ssh-dss
30-10-2013 11:18:29 INFO   JSCH -> kex: server:
aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes192-cbc,aes256-cbc,rijndael-...@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
30-10-2013 11:18:29 INFO   JSCH -> kex: server:
aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes192-cbc,aes256-cbc,rijndael-...@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
30-10-2013 11:18:29 INFO   JSCH -> kex: server:
hmac-md5,hmac-sha1,umac...@openssh.com,hmac-ripemd160,hmac-ripemd...@openssh.com,hmac-sha1-96,hmac-md5-96
30-10-2013 11:18:29 INFO   JSCH -> kex: server:
hmac-md5,hmac-sha1,umac...@openssh.com,hmac-ripemd160,hmac-ripemd...@openssh.com,hmac-sha1-96,hmac-md5-96
30-10-2013 11:18:29 INFO   JSCH -> kex: server: none,z...@openssh.com
30-10-2013 11:18:29 INFO   JSCH -> kex: server: none,z...@openssh.com
30-10-2013 11:18:29 INFO   JSCH -> kex: server: 
30-10-2013 11:18:29 INFO   JSCH -> kex: server: 
30-10-2013 11:18:29 INFO   JSCH -> kex: client:
diffie-hellman-group1-sha1,diffie-hellman-group-exchange-sha1
30-10-2013 11:18:29 INFO   JSCH -> kex: client: ssh-rsa,ssh-dss
30-10-2013 11:18:29 INFO   JSCH -> kex: client:
aes128-ctr,aes128-cbc,3des-ctr,3des-cbc,blowfish-cbc
30-10-2013 11:18:29 INFO   JSCH -> kex: client:
aes128-ctr,aes128-cbc,3des-ctr,3des-cbc,blowfish-cbc
30-10-2013 11:18:29 INFO   JSCH -> kex: client:
hmac-md5,hmac-sha1,hmac-sha2-256,hmac-sha1-96,hmac-md5-96
30-10-2013 11:18:29 INFO   JSCH -> kex: client:
hmac-md5,hmac-sha1,hmac-sha2-256,hmac-sha1-96,hmac-md5-96
30-10-2013 11:18:29 INFO   JSCH -> kex: client: none
30-10-2013 11:18:29 INFO   JSCH -> kex: client: none
30-10-2013 11:18:29 INFO   JSCH -> kex: client: 
30-10-2013 11:18:29 INFO   JSCH -> kex: client: 
30-10-2013 11:18:29 INFO   JSCH -> kex: server->client aes128-ctr hmac-md5
none
30-10-2013 11:18:29 INFO   JSCH -> kex: client->server aes128-ctr hmac-md5
none
30-10-2013 11:18:29 INFO   JSCH -> SSH_MSG_KEXDH_INIT sent
30-10-2013 11:18:29 INFO   JSCH -> expecting SSH_MSG_KEXDH_REPLY
30-10-2013 11:18:30 INFO   JSCH -> ssh_rsa_verify: signature true
30-10-2013 11:18:30 WARN   JSCH -> Permanently added 'tim.mbus.sad.it' (RSA)
to the list of known hosts.
30-10-2013 11:18:30 INFO   JSCH -> SSH_MSG_NEWKEYS sent
30-10-2013 11:18:30 INFO   JSCH -> SSH_MSG_NEWKEYS received
30-10-2013 11:18:30 INFO   JSCH -> SSH_MSG_SERVICE_REQUEST sent
30-10-2013 11:18:30 INFO   JSCH -> SSH_MSG_SERVICE_ACCEPT received
30-10-2013 11:18:30 INFO   JSCH -> Authentications that can continue:
publickey,keyboard-interactive,password
30-10-2013 11:18:30 INFO   JSCH -> Next authentication method: publickey
30-10-2013 11:18:30 INFO  

Reusing definition of Data Formats

2013-10-30 Thread Cristiano Costantini
Hi All,

I'm using happily the  elements to define routes once and
then use them multiple times.
Well, I actually need to basically use the routes twice:
-  in the tests, with local endpoints and mocks
-  in production, inside karaf, where here are osgi service references I
don't have in tests

Today I needed to use a  but this break my strategy.


I use 3 spring beans xml files, "routes.xml", "test.xml" and "osgi.xml":
- "routes.xml" contains 
- "test.xml" contains a  for development and testing
- "osgi.xml" contains a  for deployment

in tests I run "routes.xml" and "test.xml", while in production I deploy
"routes.xml" and "osgi.xml"

I like this strategy because I change often the camel routes and in this
way I don't have to align the ones in the tests and the one deployed to
karaf.


However  can't be used in , so I have to
define it in the , this mean I have to define a dataformat
in both "test.xml" and "osgi.xml"...

Anyone have an idea on how I can re-use a dataformat defined somewhere
else?
In practice I would like to define the  in "routes.xml" or
similar so I don't have to repeat that definition...

Thank you
Cristiano


Waiting for a bean to finish before continuing route

2013-10-30 Thread geoffreydv
Hello,

I was wondering if something I have in mind is possible using Camel.

Our projects needs a route to listen for jms messages, then persist
something to the database in a custom bean using another route and only
continue the first route once the item has been successfully persisted.

I was hoping something like this would work:













What I need is the itemPersistedActivator bean's method to only be called
when the request has been persisted to the database. I have simulated a
waiting time in the requestPersister (5 seconds). Currently the route
continues as the message has been dispatched.

Any ideas on this?
Thanks




--
View this message in context: 
http://camel.465427.n5.nabble.com/Waiting-for-a-bean-to-finish-before-continuing-route-tp5742398.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Performance degradation on consumer side when switching Camel from 2.11.0 to 2.12.1v

2013-10-30 Thread marioradev
Thanks for the prompt reply. I am going to attach a project that could
reproduce the degradation. Will need some time to do such project and
isolate it from our current scenario.

Regards, Mario.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Performance-degradation-on-consumer-side-when-switching-Camel-from-2-11-0-to-2-12-1v-tp5742125p5742395.html
Sent from the Camel - Users mailing list archive at Nabble.com.


sftp without passward, unable to connect

2013-10-30 Thread kalber
I try to download files via sftp from a server. This works fine from command
line , here the command

sftp dat2...@tim.mbus:sasa/ftp/orario*.* /tmp

Trying to use ftp camels ftp component, a connection is not established.

What must i configure to connect with the server via sftp ?

Below the log output.

30-10-2013 11:18:29 INFO   JSCH -> Connecting to tim.mbus.sad.it port 22
30-10-2013 11:18:29 INFO   JSCH -> Connection established
30-10-2013 11:18:29 INFO   JSCH -> Remote version string:
SSH-2.0-OpenSSH_5.0
30-10-2013 11:18:29 INFO   JSCH -> Local version string: SSH-2.0-JSCH-0.1.49
30-10-2013 11:18:29 INFO   JSCH -> CheckCiphers:
aes256-ctr,aes192-ctr,aes128-ctr,aes256-cbc,aes192-cbc,aes128-cbc,3des-ctr,arcfour,arcfour128,arcfour256
30-10-2013 11:18:29 INFO   JSCH -> aes256-ctr is not available.
30-10-2013 11:18:29 INFO   JSCH -> aes192-ctr is not available.
30-10-2013 11:18:29 INFO   JSCH -> aes256-cbc is not available.
30-10-2013 11:18:29 INFO   JSCH -> aes192-cbc is not available.
30-10-2013 11:18:29 INFO   JSCH -> arcfour256 is not available.
30-10-2013 11:18:29 INFO   JSCH -> CheckKexes: diffie-hellman-group14-sha1
30-10-2013 11:18:29 INFO   JSCH -> diffie-hellman-group14-sha1 is not
available.
30-10-2013 11:18:29 INFO   JSCH -> SSH_MSG_KEXINIT sent
30-10-2013 11:18:29 INFO   JSCH -> SSH_MSG_KEXINIT received
30-10-2013 11:18:29 INFO   JSCH -> kex: server:
diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
30-10-2013 11:18:29 INFO   JSCH -> kex: server: ssh-rsa,ssh-dss
30-10-2013 11:18:29 INFO   JSCH -> kex: server:
aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes192-cbc,aes256-cbc,rijndael-...@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
30-10-2013 11:18:29 INFO   JSCH -> kex: server:
aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes192-cbc,aes256-cbc,rijndael-...@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
30-10-2013 11:18:29 INFO   JSCH -> kex: server:
hmac-md5,hmac-sha1,umac...@openssh.com,hmac-ripemd160,hmac-ripemd...@openssh.com,hmac-sha1-96,hmac-md5-96
30-10-2013 11:18:29 INFO   JSCH -> kex: server:
hmac-md5,hmac-sha1,umac...@openssh.com,hmac-ripemd160,hmac-ripemd...@openssh.com,hmac-sha1-96,hmac-md5-96
30-10-2013 11:18:29 INFO   JSCH -> kex: server: none,z...@openssh.com
30-10-2013 11:18:29 INFO   JSCH -> kex: server: none,z...@openssh.com
30-10-2013 11:18:29 INFO   JSCH -> kex: server: 
30-10-2013 11:18:29 INFO   JSCH -> kex: server: 
30-10-2013 11:18:29 INFO   JSCH -> kex: client:
diffie-hellman-group1-sha1,diffie-hellman-group-exchange-sha1
30-10-2013 11:18:29 INFO   JSCH -> kex: client: ssh-rsa,ssh-dss
30-10-2013 11:18:29 INFO   JSCH -> kex: client:
aes128-ctr,aes128-cbc,3des-ctr,3des-cbc,blowfish-cbc
30-10-2013 11:18:29 INFO   JSCH -> kex: client:
aes128-ctr,aes128-cbc,3des-ctr,3des-cbc,blowfish-cbc
30-10-2013 11:18:29 INFO   JSCH -> kex: client:
hmac-md5,hmac-sha1,hmac-sha2-256,hmac-sha1-96,hmac-md5-96
30-10-2013 11:18:29 INFO   JSCH -> kex: client:
hmac-md5,hmac-sha1,hmac-sha2-256,hmac-sha1-96,hmac-md5-96
30-10-2013 11:18:29 INFO   JSCH -> kex: client: none
30-10-2013 11:18:29 INFO   JSCH -> kex: client: none
30-10-2013 11:18:29 INFO   JSCH -> kex: client: 
30-10-2013 11:18:29 INFO   JSCH -> kex: client: 
30-10-2013 11:18:29 INFO   JSCH -> kex: server->client aes128-ctr hmac-md5
none
30-10-2013 11:18:29 INFO   JSCH -> kex: client->server aes128-ctr hmac-md5
none
30-10-2013 11:18:29 INFO   JSCH -> SSH_MSG_KEXDH_INIT sent
30-10-2013 11:18:29 INFO   JSCH -> expecting SSH_MSG_KEXDH_REPLY
30-10-2013 11:18:30 INFO   JSCH -> ssh_rsa_verify: signature true
30-10-2013 11:18:30 WARN   JSCH -> Permanently added 'tim.mbus.sad.it' (RSA)
to the list of known hosts.
30-10-2013 11:18:30 INFO   JSCH -> SSH_MSG_NEWKEYS sent
30-10-2013 11:18:30 INFO   JSCH -> SSH_MSG_NEWKEYS received
30-10-2013 11:18:30 INFO   JSCH -> SSH_MSG_SERVICE_REQUEST sent
30-10-2013 11:18:30 INFO   JSCH -> SSH_MSG_SERVICE_ACCEPT received
30-10-2013 11:18:30 INFO   JSCH -> Authentications that can continue:
publickey,keyboard-interactive,password
30-10-2013 11:18:30 INFO   JSCH -> Next authentication method: publickey
30-10-2013 11:18:30 INFO   JSCH -> Authentications that can continue:
keyboard-interactive,password
30-10-2013 11:18:30 INFO   JSCH -> Next authentication method:
keyboard-interactive
30-10-2013 11:18:30 INFO   JSCH -> Authentications that can continue:
password
30-10-2013 11:18:30 INFO   JSCH -> Next authentication method: password
30-10-2013 11:18:30 INFO   JSCH -> Disconnecting from tim.mbus.sad.it port
22
30-10-2013 11:18:31 INFO   JSCH -> Connecting to tim.mbus.sad.it port 22
30-10-2013 11:18:31 INFO   JSCH -> Connection established
30-10-2013 11:18:31 INFO   JSCH -> Remote version string:
SSH-2.0-OpenSSH_5.0
30-10-2013 11:18:31 INFO   JSCH -> Local version string: SSH-2.0-JSCH-0.1.49
30-10-2013 11:18:31 INFO   JSCH -> CheckCiphers:
aes256-ctr,aes192-ctr,aes128-ctr,aes25