org.apache.camel.ResolveEndpointFailedException: 未找到具有方案的组件:imaps

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

我知道有类似的问题,但 none 的答案解决了我的问题。我创建了一个在 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 由于:未找到具有方案的组件:imaps 在 org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:684) 在 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 文件中,但它似乎没有找到它。

提前致谢

将 imap 添加到我的实际 camel 上下文中解决了我的问题

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