camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shing Hing Man <>
Subject Re: Problem with smtps when is set
Date Sun, 01 Jun 2014 19:54:24 GMT
After some goolging, I have found a solution to my problem, which has nothing to do with Camel.

Basically, I need to add the Google mail ssl certificate to selfSigned.jks .
There is a  more detail explanation below :


On Wednesday, 28 May 2014, 20:59, Shing Hing Man <> wrote:

  I am using Camel  2.12.1.

The following route sends email to my gmail account.


But when I added the following piece code before the above route,
 String userHome=System.getProperty("user.home");
   String keyStoreFile=userHome + "/keystore/selfSigned.jks";

sending email no longer works. 

[                          main] DefaultCamelContext           
INFO  Apache Camel 2.12.1 (CamelContext: camel-1) is starting
[                          main] ManagedManagementStrategy     
INFO  JMX is enabled
[                          main] DefaultTypeConverter          
INFO  Loaded 226 type converters
[                          main] DefaultCamelContext           
INFO  StreamCaching is not in use. If using streams then its recommended to enable stream
caching. See more details at
DEBUG: setDebug: JavaMail version 1.4.7
[                          main]
 DefaultCamelContext            INFO  Route: route1 started and consuming from:
[                          main] DefaultCamelContext           
INFO  Total 1 routes, of which 1 is started.
[                          main] DefaultCamelContext           
INFO  Apache Camel 2.12.1 (CamelContext: camel-1) started in 0.393 seconds
DEBUG: setDebug: JavaMail version 1.4.7
DEBUG: getProvider() returning
DEBUG SMTP: useEhlo true, useAuth true
DEBUG SMTP: trying to connect to host "", port 465, isSSL true
[                          main] DefaultErrorHandler           
ERROR Failed delivery for (MessageId: ID-gauss-site-38332-1401306585164-0-1 on ExchangeId:
ID-gauss-site-38332-1401306585164-0-2). Exhausted after delivery attempt: 1 caught: javax.mail.MessagingException:
Could not connect to SMTP host:, port: 465;
  nested exception is: PKIX
path building failed: unable to find valid certification
path to requested target

selfSigned.jks is derived from a self-signed certificated. 

I get the same error even if selfSigned.jks is replaced by a jks that is derived from a certificate
signed by GoDaddy.

The above set up is in my test cases, so that I can send https messages to a local https server.

What I need is to able to send https mesage and also send email using the above email route.

Thanks in advance for any assistance !
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message