I need to connect to a imap-secure mail server and somehow I am getting a javax.mail.AuthenticationFailedException , the same credentials work using the simple Java mail API client (I wrote a test class)
The following is the configuration in spring
Code:<mail:imap-idle-channel-adapter store-uri="imaps://usr:pwd@server" channel="iwfChannel" />
The following is the trace of what happens
Code:DEBUG [SimpleAsyncTaskExecutor-1] (AbstractMailReceiver.java:108) - connecting to store [imaps://XXXXXXX:*****@imapserver.company.com/INBOX] INFO [main] (AbstractApplicationContext.java:411) - Refreshing org.apache.cxf.bus.spring.BusApplicationContext@ff0239: display name [org.apache.cxf.bus.spring.BusApplicationContext@ff0239]; startup date [Tue Dec 23 11:54:24 PST 2008]; parent: org.springframework.web.context.support.XmlWebApplicationContext@60991f Dec 23, 2008 11:54:24 AM org.apache.cxf.bus.spring.BusApplicationContext getConfigResources INFO: No cxf.xml configuration file detected, relying on defaults. INFO [main] (AbstractApplicationContext.java:426) - Bean factory for application context [org.apache.cxf.bus.spring.BusApplicationContext@ff0239]: org.springframework.beans.factory.support.DefaultListableBeanFactory@4bd767 DEBUG [main] (AbstractApplicationContext.java:430) - 0 beans defined in org.apache.cxf.bus.spring.BusApplicationContext@ff0239: display name [org.apache.cxf.bus.spring.BusApplicationContext@ff0239]; startup date [Tue Dec 23 11:54:24 PST 2008]; parent: org.springframework.web.context.support.XmlWebApplicationContext@60991f DEBUG [main] (AbstractApplicationContext.java:648) - Unable to locate MessageSource with name 'messageSource': using default [org.springframework.context.support.DelegatingMessageSource@8b60a] DEBUG [main] (AbstractApplicationContext.java:672) - Unable to locate ApplicationEventMulticaster with name 'applicationEventMulticaster': using default [org.springframework.context.event.SimpleApplicationEventMulticaster@1e75e08] INFO [main] (DefaultListableBeanFactory.java:414) - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@4bd767: defining beans []; parent: org.springframework.beans.factory.support.DefaultListableBeanFactory@121177e DEBUG [main] (AbstractBeanFactory.java:214) - Returning cached instance of singleton bean 'cxf' Dec 23, 2008 11:54:24 AM org.apache.cxf.transport.servlet.AbstractCXFServlet replaceDestinationFactory INFO: Servlet transport factory already registered Dec 23, 2008 11:54:24 AM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on http-8080 Dec 23, 2008 11:54:24 AM org.apache.jk.common.ChannelSocket init INFO: JK: ajp13 listening on /0.0.0.0:8009 Dec 23, 2008 11:54:24 AM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=0/94 config=null Dec 23, 2008 11:54:24 AM org.apache.catalina.startup.Catalina start INFO: Server startup in 4463 ms WARN [SimpleAsyncTaskExecutor-1] (ImapIdleChannelAdapter.java:60) - error occurred in idle task javax.mail.AuthenticationFailedException: AUTHENTICATE failed. at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:566) at javax.mail.Service.connect(Service.java:271) at javax.mail.Service.connect(Service.java:91) at javax.mail.Service.connect(Service.java:76) at org.springframework.integration.mail.AbstractMailReceiver.openSession(AbstractMailReceiver.java:110) at org.springframework.integration.mail.AbstractMailReceiver.openFolder(AbstractMailReceiver.java:115) at org.springframework.integration.mail.ImapMailReceiver.waitForNewMessages(ImapMailReceiver.java:75) at org.springframework.integration.mail.ImapIdleChannelAdapter$IdleTask.run(ImapIdleChannelAdapter.java:106) at java.lang.Thread.run(Thread.java:619)
Any idea if this is an issue with the imap-idle-channel-adapter ?


Reply With Quote