org.apache.camel.ResolveEndpointFailedException:找不到方案的组件:imaps

时间:2017-06-14 14:03:47

标签: maven apache-camel osgi karaf

我知道有类似的问题,但没有一个答案可以解决我的问题。我创建了一个骆驼电子邮件路由器,它在eclipse中完美运行,但是一旦我将它部署到karaf,我就会收到此错误:

org.apache.camel.ResolveEndpointFailedException:无法解析端点:imaps://imap.gmail.com?closeFolder = false& consumer.delay = 60000& delete = false& disconnect = false& password = passwordxxx& peek = false& unseen = true& username = user@gmail.com,原因是:找不到使用scheme:imaps的组件     at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:684)     at com.eightbitplatoon.learning_camel.camel_route.Route.createConsumer(Route.java:25)     在com.eightbitplatoon.learning_camel.camel_route.Activator.start(Activator.java:21)     在org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:697)     在org.apache.felix.framework.Felix.activateBundle(Felix.java:2226)     在org.apache.felix.framework.Felix.startBundle(Felix.java:2144)     在org.apache.felix.framework.Felix $ RefreshHelper.restart(Felix.java:5063)     在org.apache.felix.framework.Felix.refreshPackages(Felix.java:4253)     在org.apache.felix.framework.FrameworkWiringImpl.run(FrameworkWiringImpl.java:188)     在java.lang.Thread.run(Thread.java:745)

我已经尝试过安装camel-mail作为功能,而karaf中的捆绑包也尝试将其包含在我的pom文件中,但它似乎并没有找到它。

提前致谢

1 个答案:

答案 0 :(得分:0)

将imaps添加到我的实际驼峰语境中解决了我的问题

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