Announcement Announcement Module
Collapse
No announcement yet.
imap-idle-channel-adapter store issue Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • imap-idle-channel-adapter store issue

    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: [email protected]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: [email protected]60991f
    DEBUG [main] (AbstractApplicationContext.java:648) - Unable to locate MessageSource with name 'messageSource': using default [[email protected]]
    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 ?

  • #2
    Is it possible that you also need to include a port?

    Comment


    • #3
      Nope Mark, we use the default port. The API client connects without any port being mentioned.

      Comment


      • #4
        Do you have any @ signs in the username or password by any chance?

        Comment


        • #5
          No I dont. I had it earlier, but changed it to a alphanumeric value.

          Comment


          • #6
            Mark, shouldnt the Abstract mail receiver also have the ability to take in a authenticator ?

            I guess that could be the problem, please look at this trace

            Code:
            DEBUG [SimpleAsyncTaskExecutor-1] (AbstractMailReceiver.java:108) - connecting to store [imaps://fpxxxxx:*****@xxxxxxxxxxx]
            * OK Microsoft Exchange Server 2007 IMAP4 service ready
            A0 CAPABILITY
            * CAPABILITY IMAP4 IMAP4rev1 AUTH=NTLM AUTH=GSSAPI AUTH=PLAIN IDLE NAMESPACE LITERAL+
            A0 OK CAPABILITY completed.
            IMAP DEBUG: AUTH: NTLM
            IMAP DEBUG: AUTH: GSSAPI
            IMAP DEBUG: AUTH: PLAIN
            DEBUG: protocolConnect login, host=XXXXXXXXXXXXX, user=jvictor, password=<non-null>
            A1 AUTHENTICATE PLAIN
            +
            anZpY3RvcgBqdmljdG9yAEV4Y2hhbmdlMDE=
            A1 NO AUTHENTICATE failed.
            * OK Microsoft Exchange Server 2007 IMAP4 service ready
            A0 CAPABILITY
            * CAPABILITY IMAP4 IMAP4rev1 AUTH=NTLM AUTH=GSSAPI AUTH=PLAIN IDLE NAMESPACE LITERAL+
            A0 OK CAPABILITY completed.
            IMAP DEBUG: AUTH: NTLM
            IMAP DEBUG: AUTH: GSSAPI
            IMAP DEBUG: AUTH: PLAIN
            DEBUG: protocolConnect login, host=XXXXXXXXXXXXX, user=jvictor, password=<non-null>
            A1 AUTHENTICATE PLAIN
            +
            anZpY3RvcgBqdmljdG9yAEV4Y2hhbmdlMDE=
            A1 NO AUTHENTICATE failed.
            Edit:
            Please note that that masked user in the url is not the same as the user that is being sent up in the line DEBUG: protocolConnect login, host=XXXXXXXXXXXXX, user=jvictor, password=<non-null>
            Last edited by jvictor; Dec 23rd, 2008, 07:30 PM.

            Comment

            Working...
            X