Search code examples
mavenapache-camelosgikaraf

org.apache.camel.ResolveEndpointFailedException: No component found with scheme: imaps


I know there are similar questions but none of the answers solve my problem. I have created a camel email Router which works perfectly in eclipse but as soon as i deploy it to karaf i get this error:

org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: imaps://imap.gmail.com?closeFolder=false&consumer.delay=60000&delete=false&disconnect=false&password=passwordxxx&peek=false&unseen=true&[email protected] due to: No component found with scheme: imaps at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:684) at com.eightbitplatoon.learning_camel.camel_route.Route.createConsumer(Route.java:25) at com.eightbitplatoon.learning_camel.camel_route.Activator.start(Activator.java:21) at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:697) at org.apache.felix.framework.Felix.activateBundle(Felix.java:2226) at org.apache.felix.framework.Felix.startBundle(Felix.java:2144) at org.apache.felix.framework.Felix$RefreshHelper.restart(Felix.java:5063) at org.apache.felix.framework.Felix.refreshPackages(Felix.java:4253) at org.apache.felix.framework.FrameworkWiringImpl.run(FrameworkWiringImpl.java:188) at java.lang.Thread.run(Thread.java:745)

I have tried installing camel-mail as a feature and as a bundle in karaf have also tried including it in my pom file but it just doesn't seem to find it.

Thanks in advance


Solution

  • Adding imaps to my actual camel context solved my problem

    Component mailComponent = new org.apache.camel.component.mail.MailComponent(); context.addComponent("imaps", mailComponent);