0
我試圖用簧itegration IMAP站適配器,但我每一次我跑我的應用程序Spring集成IMAP適配器例外
java.lang.NoSuchMethodException: org.apache.geronimo.javamail.store.imap.IMAPSSLStore. <init>(javax.mail.Session, javax.mail.URLName)
at java.lang.Class.getConstructor0(Class.java:2971)
at java.lang.Class.getConstructor(Class.java:1812)
at javax.mail.Session.getService(Session.java:799)
at javax.mail.Session.getStore(Session.java:586)
at javax.mail.Session.getStore(Session.java:548)
at org.springframework.integration.mail.AbstractMailReceiver.openSession(AbstractMailReceiver.java:207)
at org.springframework.integration.mail.AbstractMailReceiver.openFolder(AbstractMailReceiver.java:226)
at org.springframework.integration.mail.ImapMailReceiver.waitForNewMessages(ImapMailReceiver.java:148)
at org.springframework.integration.mail.ImapIdleChannelAdapter$IdleTask.run(ImapIdleChannelAdapter.java:220)
at org.springframework.integration.mail.ImapIdleChannelAdapter$ReceivingTask.run(ImapIdleChannelAdapter.java:190)
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:81)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
我的春天配置是這個
<int-mail:imap-idle-channel-adapter id="imapAdapter"
store-uri="imaps://username:[email protected]:993/inbox"
java-mail-properties="javaMailProperties"
channel="receiveChannel"
should-delete-messages="false"
should-mark-messages-as-read="false"
auto-startup="true"/>
<util:properties id="javaMailProperties">
<prop key="mail.imap.socketFactory.class">javax.net.ssl.SSLSocketFactory</prop>
<prop key="mail.imap.socketFactory.fallback">false</prop>
<prop key="mail.store.protocol">imaps</prop>
<prop key="mail.debug">true</prop>
</util:properties>
時間得到這個例外任何想法?
您是對的。我從我的pom中刪除了geronimo依賴項。現在它工作了。謝謝。 – user3004656 2014-11-10 11:04:39
我看到你是Stack Overflow的新手 - 習慣上將答案標記爲「接受」以幫助其他人搜索類似的問題/答案。 – 2014-11-10 13:56:47