Re: PEM File for Authentication in route

2015-08-31 Thread anish.somadevan
Thanks for your suggestion. Am using PEM file for authentication purpose. I
did try using the Http4 component with SSLContextParameters as given below,






${body}




  

  



But i get an error,

JmsConsumer[ISEEOutboundQueue]) CamelOutboundAdapter exception: Failed to
create route JSON-XML at: >>>
To[https4://somedomain.com:443/topic?sslContextParametersRef=sslContextParameters]
<<< in route: Route[[From[direct:inter3]] -> [Log[Message Body ${body}],
S... because of Failed to resolve endpoint:
https4://somedomain.com:443/topic?sslContextParametersRef=sslContextParameters
due to: No bean could be found in the registry for: sslContextParameters of
type: org.apache.camel.util.jsse.SSLContextParameters

Am using Camel 2.10.3 JAR. Can you please let me know if am missing anything
here?

Thanks,
Anish





--
View this message in context: 
http://camel.465427.n5.nabble.com/PEM-File-for-Authentication-in-route-tp5771084p5771109.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: PEM File for Authentication in route

2015-08-31 Thread Raul Kripalani
It depends on what your PEM file contains and what the server is requesting
of you.

The PEM file may contain a private key for client SSL authentication, in
which case you need to use the camel-http4 [1] sslContextParameters option
to configure the keystore, key alias, keystore passwd, key passwd, etc.
using the Camel JSSE Configuration Utility (modelled after CXF SSL config
approach) as indicated in [2].

If the PEM file contains a certificate for the remote server which you need
to trust, then you're probably better off adding it to your server's
truststore and using the JVM options to pass in the location, password,
etc. If you don't want to add the certificate to the server-wide
truststore, you may use the JSSE Config Utility to configure it separately
in this particular endpoint.

[1] https://camel.apache.org/http4.html
[2]
https://camel.apache.org/http4.html#HTTP4-UsingtheJSSEConfigurationUtility

*Raúl Kripalani*
Apache Camel PMC Member & Committer | Enterprise Architect, Open Source
Integration specialist
http://about.me/raulkripalani | http://www.linkedin.com/in/raulkripalani
http://blog.raulkr.net | twitter: @raulvk

On Mon, Aug 31, 2015 at 11:47 PM, anish.somadevan 
wrote:

> Am trying to use Http4 or SSH components. Can you please let me know how to
> resolve this issue using these components?
>
> Thanks,
> Anish
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/PEM-File-for-Authentication-in-route-tp5771084p5771107.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


Re: PEM File for Authentication in route

2015-08-31 Thread anish.somadevan
Am trying to use Http4 or SSH components. Can you please let me know how to
resolve this issue using these components?

Thanks,
Anish



--
View this message in context: 
http://camel.465427.n5.nabble.com/PEM-File-for-Authentication-in-route-tp5771084p5771107.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Jetty -> AHC route producing a lot of threads

2015-08-31 Thread Les Novell
Hello, I am creating a simple route to test asynchronous message passing in
Camel.  When testing the route by creating 1000 simultaneous connections I
see that around 2000 threads are created to handle requests I'm forwarding
on using AHC component.  I am surprised, I thought that Jetty+AHC component
would use non-blocking asynchronous I/O, and a low number of threads.

Basic Route:
restConfiguration().component("jetty").host("localhost").port(8081);
rest("/ud").get("/wait/{timeout}")
.to("direct:mockEndpoint").bindingMode(RestBindingMode.off);
from("direct:mockEndpoint")
.removeHeaders("CamelHttpPath")
   
.toD("ahc:http://localhost:9000/wait/${headers.timeout}?bridgeEndpoint=true";);

It appears that the AHC component is creating worker threads to manage
outgoing connections to localhost:9000. One for every connection made to
localhost:9090.  Am I configuring something wrong, or is this a defect in
AHC?

Camel version is 2.16-SNAPSHOT

Thanks,
Les




--
View this message in context: 
http://camel.465427.n5.nabble.com/Jetty-AHC-route-producing-a-lot-of-threads-tp5771106.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Stream Cache / spool file deletion when marshaling to JSON with Jackson

2015-08-31 Thread Karts
Hi,

We just upgraded to Camel 2.15.3 but this issue still remains unfortunately.

Stack trace from 2.15.3 is below:

java.io.FileNotFoundException:
/tmp/camel/camel-tmp-3b981524-ca86-4989-b74e-1f5655381add/cos8487311535309884732.tmp
(No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(FileInputStream.java:146)
at
org.apache.camel.converter.stream.FileInputStreamCache.createInputStream(FileInputStreamCache.java:133)
at
org.apache.camel.converter.stream.FileInputStreamCache.getInputStream(FileInputStreamCache.java:127)
at
org.apache.camel.converter.stream.FileInputStreamCache.read(FileInputStreamCache.java:122)
at java.io.InputStream.read(InputStream.java:170)
at java.io.InputStream.read(InputStream.java:101)
at org.restlet.engine.io.IoUtils.copy(IoUtils.java:106)
at
org.restlet.representation.InputRepresentation.write(InputRepresentation.java:148)
at
org.restlet.engine.adapter.ServerCall.writeResponseBody(ServerCall.java:519)
at
org.restlet.engine.adapter.ServerCall.sendResponse(ServerCall.java:463)
at
org.restlet.ext.servlet.internal.ServletCall.sendResponse(ServletCall.java:430)
at
org.restlet.engine.adapter.ServerAdapter.commit(ServerAdapter.java:196)
at
org.restlet.engine.adapter.HttpServerHelper.handle(HttpServerHelper.java:153)
at
org.restlet.ext.servlet.ServerServlet.service(ServerServlet.java:1118)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at
org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)
at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118)
at
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at
org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at
org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at
org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at
org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:146)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at
org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:154)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at
org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at
org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:201)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at
org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:50)
at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at
org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at
org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
at
org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
at
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)
at
org.springframework.web.filter.DelegatingFilter

Re: File watcher and FTP using Camel

2015-08-31 Thread james lapointe
Camel is small and and can be run on it's own in containers - such  as OSGI
or web service containers like Tomcat.  Tomcat for windows has a launching
service if you need it.








On Wed, Aug 19, 2015 at 10:18 AM, Claus Ibsen  wrote:

> Hi
>
> There is a ftp example in the Camel distribution
> https://github.com/apache/camel/tree/master/examples
>
> On Wed, Aug 19, 2015 at 5:22 PM,   wrote:
> > Hello Camel Experts,
> > I am new to Camel, I would like implement File watcher and FTP using
> Camel, can someone point me to Camel tutorial how this can be achieved?
> >
> > Need is to watch or keep on polling a folder on Unix or windows and FTP
> files as they appear. This should happen 24/7 would need suggestion on what
> approaches can be used to keep it running on windows and Unix.
> >
> > If need to create a service on windows for this ? is there camel
> functionality for this?
> > Or is it a good idea to add a Cron job or entry in rc.sh ? I am not a
> Unix expert though.
> >
> > Thank you for your help
> >
> > -G
>
>
>
> --
> Claus Ibsen
> -
> http://davsclaus.com @davsclaus
> Camel in Action 2nd edition: http://www.manning.com/ibsen2
>


.camel folders contention

2015-08-31 Thread james lapointe
Greetings:
In my corporate environment - I had to run camel in web container.  I later
found out the environment is load balanced - meaning two instances of camel
will try and process the same file.  In looking the logs - I'm seeing some
contention errors are both routes are running and one has locked the camel
processing folder .camel.

At the moment, I'am of two minds about this - if it is a problem or not.
Part of me thinks the 1st server to get pick up the route will process and
the second will get errors - but it won't hurt anything.  The other part of
me thinks they will contend for the same resource and this will cause
problems.

Thus, my question is do I have a problem?  Any if so - what is some
guidance?

I realize I could set up/configure so it's only running on one server.


Best Regards:

jl


camel-hdfs2 in Apache Karaf

2015-08-31 Thread bdgould
Hi all!  I'm working on a camel route consuming from HDFS using camel-hdfs2
from within a Karaf (4) OSGi container.  I'm running into a strange
ClassNotFoundException, and was hoping maybe someone here could help me out. 
I have a stackoverflow question up  HERE
  .

Thanks,-Ben



--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-hdfs2-in-Apache-Karaf-tp5771099.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Camel quartz2 trigger.repeatInterval not working

2015-08-31 Thread snehal_jagtap
Hello,
 I have been using 'quartz2' for polling and try to poll message after every
40 seconds.

however files are polled every second.
If i use 'quartz' it is working fine.

Please help me on this and sorry if i missed any etiquette!

Snippet -


 






   














--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-quartz2-trigger-repeatInterval-not-working-tp5771095.html
Sent from the Camel - Users mailing list archive at Nabble.com.


kyro data format in camel

2015-08-31 Thread Felix Thomas
hello,

 I have used kyroformat for marshalling using a bean as below .

 



  I get the below message in the logs , not sure is its an issue or not
, since i see the messages marshalled  in the queue..Do i need to implement
something more

DEBUG 28-08 16:50:19,456[main]
[org.springframework.beans.factory.support.DefaultListableBeanFactory] |
Failed to convert bean 'kyroFormat' to required type
[org.apache.camel.model.DataFormatDefinition]

*org.springframework.beans.ConversionNotSupportedException*: Failed to
convert value of type 'com.XXX.camel.util.KyroDataFormat' to required type
'org.apache.camel.model.DataFormatDefinition'; nested exception is
*java.lang.IllegalStateException*: Cannot convert value of type
[com.XXX.camel.util.KyroDataFormat] to required type
[org.apache.camel.model.DataFormatDefinition]: no matching editors or
conversion strategy found

   at org.springframework.beans.TypeConverterSupport.doConvert(
*TypeConverterSupport.java:74*)



Rgrds
Felix T