RemmiDemmiSemmi RemmiDemmiSemmi - 2 months ago 21
Apache Configuration Question

Apache Camel: No component found with scheme: imaps

I try to fetch some mails from a gmail account via Camel with:

Endpoint fromMail = endpoint("imaps://imap.gmail.com?username=xxx@gmail.com&password=xxx&fetchSize=1&searchTerm.subjectOrBody=OrderNr&unseen=true&consumer.delay=60000");


But I get this exception:

Exception in thread "main" org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: imaps://imap.gmail.com:993?consumer.delay=60000&fetchSize=1&password=xxx&searchTerm.subjectOrBody=OrderNr&unseen=true&username=xxx%40gmail.com due to: No component found with scheme: imaps


Of course, I have camel-mail in my pom.xml and camel-mail-2.13.0.jar is in my Maven Dependencies.

Interesting: On another pc, the exact same code (same project) works fine.

Why am I getting this exception on my pc?

Answer

I've just had exactly the same problem. The issue was that you must install the camel-mail feature.

karaf@root> features:list | grep mail
[uninstalled] [2.13.2          ] camel-mail                              camel-2.13.2              
karaf@root> features:install camel-mail
karaf@root> features:list | grep mail
[installed  ] [2.13.2          ] camel-mail                              camel-2.13.2             

And then it all started working for me. This is probably why it was working on one of your PCs and not the other.