You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "Krishna.aradhya" <kr...@cognizant.com> on 2013/03/14 08:22:23 UTC

Failed to resolve endpoint: smtp://krishna.aradhya@cognizant.com due to: No component found with scheme: smtp

   Hello folks,

               I am running the below code but its giving the error like
"Failed to resolve endpoint: smtp://krishna.aradhya@cognizant.com due to: No
component found with scheme: smtp". So, Please suggest me how to add the
component for my code. Than you



public class MessageSendingExample {
public static void main(String args[]) throws Exception {
CamelContext context = new DefaultCamelContext();
context.addRoutes(new RouteBuilder() {
private Object subject;

@SuppressWarnings("null")
public void configure() {
	
	from("file:C:\\DellBoomi?noop=true").setHeader("subject",
constant(subject)).to("file:D:\\Others");
};
});


context.start();
System.out.println("HELLO");
Map<String, Object> map = new HashMap<String, Object>();
map.put("To", "krishna.aradhya@cognizant.com");
map.put("From", "krishna.aradhya@cognizant.com");
map.put("Subject", "Camel rocks");
ProducerTemplate template = context.createProducerTemplate();
String body = "Hello Claus.\nYes it does.\n\nRegards Krish.";
template.sendBodyAndHeaders("smtp://krishna.aradhya@cognizant.com", body,
map);
System.out.println("HELLO123");

Thread.sleep(10000);
context.stop();



}
} 



--
View this message in context: http://camel.465427.n5.nabble.com/Failed-to-resolve-endpoint-smtp-krishna-aradhya-cognizant-com-due-to-No-component-found-with-scheme-p-tp5729156.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Failed to resolve endpoint: smtp://krishna.aradhya@cognizant.com due to: No component found with scheme: smtp

Posted by Claus Ibsen <cl...@gmail.com>.
On Thu, Mar 14, 2013 at 8:22 AM, Krishna.aradhya
<kr...@cognizant.com> wrote:
>    Hello folks,
>
>                I am running the below code but its giving the error like
> "Failed to resolve endpoint: smtp://krishna.aradhya@cognizant.com due to: No
> component found with scheme: smtp". So, Please suggest me how to add the
> component for my code. Than you
>

Hi

Look at this page
http://camel.apache.org/components

And find the component it needs, eg that would be
SMTP / camel-mail

Which mean it needs the camel-mail JAR on the classpath (and its dependencies)
If you use maven then its just adding a dependency on camel-mail and
you are ready.

>
>
> public class MessageSendingExample {
> public static void main(String args[]) throws Exception {
> CamelContext context = new DefaultCamelContext();
> context.addRoutes(new RouteBuilder() {
> private Object subject;
>
> @SuppressWarnings("null")
> public void configure() {
>
>         from("file:C:\\DellBoomi?noop=true").setHeader("subject",
> constant(subject)).to("file:D:\\Others");
> };
> });
>
>
> context.start();
> System.out.println("HELLO");
> Map<String, Object> map = new HashMap<String, Object>();
> map.put("To", "krishna.aradhya@cognizant.com");
> map.put("From", "krishna.aradhya@cognizant.com");
> map.put("Subject", "Camel rocks");
> ProducerTemplate template = context.createProducerTemplate();
> String body = "Hello Claus.\nYes it does.\n\nRegards Krish.";
> template.sendBodyAndHeaders("smtp://krishna.aradhya@cognizant.com", body,
> map);
> System.out.println("HELLO123");
>
> Thread.sleep(10000);
> context.stop();
>
>
>
> }
> }
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Failed-to-resolve-endpoint-smtp-krishna-aradhya-cognizant-com-due-to-No-component-found-with-scheme-p-tp5729156.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: Failed to resolve endpoint: smtp://krishna.aradhya@cognizant.com due to: No component found with scheme: smtp

Posted by "Krishna.aradhya" <kr...@cognizant.com>.
Ok Fine.. Thank you.. 



--
View this message in context: http://camel.465427.n5.nabble.com/Failed-to-resolve-endpoint-smtp-krishna-aradhya-cognizant-com-due-to-No-component-found-with-scheme-p-tp5729156p5729224.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Failed to resolve endpoint: smtp://krishna.aradhya@cognizant.com due to: No component found with scheme: smtp

Posted by Willem jiang <wi...@gmail.com>.
Hi,

You need to check your class path as Claus suggested.  

--  
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.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem





On Thursday, March 14, 2013 at 4:04 PM, Krishna.aradhya wrote:

>  
> Hi
> template.sendBodyAndHeaders("smtp://user-info@host[:port]", body, map);  
>  
> In the above line , what are the things i am not getting ehich are the
> things i need to add. and i added like this
> template.sendBodyAndHeaders("smtp://10.226.168.123[:6050]",body, map); But
> still getting the same error.
>  
>  
>  
>  
>  
>  
> --
> View this message in context: http://camel.465427.n5.nabble.com/Failed-to-resolve-endpoint-smtp-krishna-aradhya-cognizant-com-due-to-No-component-found-with-scheme-p-tp5729156p5729163.html
> Sent from the Camel - Users mailing list archive at Nabble.com (http://Nabble.com).




Re: Failed to resolve endpoint: smtp://krishna.aradhya@cognizant.com due to: No component found with scheme: smtp

Posted by "Krishna.aradhya" <kr...@cognizant.com>.
       Hi
template.sendBodyAndHeaders("smtp://user-info@host[:port]", body, map); 

  In the above line ,  what are the things i am not getting ehich are the
things i need to add. and i added like this
template.sendBodyAndHeaders("smtp://10.226.168.123[:6050]",body, map);  But
still getting the same error.






--
View this message in context: http://camel.465427.n5.nabble.com/Failed-to-resolve-endpoint-smtp-krishna-aradhya-cognizant-com-due-to-No-component-found-with-scheme-p-tp5729156p5729163.html
Sent from the Camel - Users mailing list archive at Nabble.com.