Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exceptions for the mail basic sample #133

Closed
tzvikav opened this issue May 24, 2015 · 17 comments
Closed

exceptions for the mail basic sample #133

tzvikav opened this issue May 24, 2015 · 17 comments

Comments

@tzvikav
Copy link

tzvikav commented May 24, 2015

Hi,
Any help would be appreciated.
I'm receiving exceptions with both the IMAP and POP implementations.
The POP3/IMAP access is enabled in my google account.
Here is the status as stated in gmail settings for IMAP: Status: IMAP is enabled.
Here is the status as stated in gmail settings for POP3: 1. Status: POP is enabled for all mail that has arrived since....

The IMAP fails with this exception:

14:20:59.656 WARN  [task-scheduler-1][org.springframework.integration.mail.ImapIdleChannelAdapter] error occurred in idle task
javax.mail.NoSuchProviderException: imaps
        at javax.mail.Session.getService(Session.java:806)
        at javax.mail.Session.getStore(Session.java:592)
        at javax.mail.Session.getStore(Session.java:554)
        at org.springframework.integration.mail.AbstractMailReceiver.connectStoreIfNecessary(AbstractMailReceiver.java:214)
        at org.springframework.integration.mail.AbstractMailReceiver.openFolder(AbstractMailReceiver.java:234)
        at org.springframework.integration.mail.ImapMailReceiver.waitForNewMessages(ImapMailReceiver.java:156)
        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)
14:20:59.658 WARN  [task-scheduler-1][org.springframework.integration.mail.ImapIdleChannelAdapter] Failed to execute IDLE task. Will attempt to resubmit in 10000 milliseconds.
java.lang.IllegalStateException: Failure in 'idle' task. Will resubmit.
        at org.springframework.integration.mail.ImapIdleChannelAdapter$IdleTask.run(ImapIdleChannelAdapa:239)v
        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)
Caused by: javax.mail.NoSuchProviderException: imaps
        at javax.mail.Session.getService(Session.java:806)
        at javax.mail.Session.getStore(Session.java:592)
        at javax.mail.Session.getStore(Session.java:554)
        at org.springframework.integration.mail.AbstractMailReceiver.connectStoreIfNecessary(AbstractMailReceiver.java:214)
        at org.springframework.integration.mail.AbstractMailReceiver.openFolder(AbstractMailReceiver.java:234)
        at org.springframework.integration.mail.ImapMailReceiver.waitForNewMessages(ImapMailReceiver.java:156)
        at org.springframework.integration.mail.ImapIdleChannelAdapter$IdleTask.run(ImapIdleChannelAdapter.java:220)
        ... 10 more

And the POP fails with javax.mail.NoSuchProviderException: pop3, here is the stack trace:

java.lang.ClassNotFoundException: com.sun.mail.pop3.POP3Store
        at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:260)
        at javax.mail.Session.getService(Session.java:802)
        at javax.mail.Session.getStore(Session.java:592)
        at javax.mail.Session.getStore(Session.java:554)
        at org.springframework.integration.mail.AbstractMailReceiver.connectStoreIfNecessary(AbstractMailReceiver.java:214)
        at org.springframework.integration.mail.AbstractMailReceiver.openFolder(AbstractMailReceiver.java:234)
        at org.springframework.integration.mail.AbstractMailReceiver.receive(AbstractMailReceiver.java:260)
        at org.springframework.integration.mail.MailReceivingMessageSource.receive(MailReceivingMessageSource.java:103)
        at org.springframework.integration.endpoint.SourcePollingChannelAdapter.receiveMessage(SourcePollingChannelAdapter.java:144)
        at org.springframework.integration.endpoint.AbstractPollingEndpoint.doPoll(AbstractPollingEndpoint.java:192)
        at org.springframework.integration.endpoint.AbstractPollingEndpoint.access$000(AbstractPollingEndpoint.java:55)
        at org.springframework.integration.endpoint.AbstractPollingEndpoint$1.call(AbstractPollingEndpoint.java:149)
        at org.springframework.integration.endpoint.AbstractPollingEndpoint$1.call(AbstractPollingEndpoint.java:146)
        at org.springframework.integration.endpoint.AbstractPollingEndpoint$Poller$1.run(AbstractPollingEndpoint.java:298)
        at org.springframework.integration.util.ErrorHandlingTaskExecutor$1.run(ErrorHandlingTaskExecutor.java:52)
        at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:50)
        at org.springframework.integration.util.ErrorHandlingTaskExecutor.execute(ErrorHandlingTaskExecutor.java:49)
        at org.springframework.integration.endpoint.tPollingEndpoint$Poller.run(AbstractPollingEndpoint.java:292)
        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)
14:22:55.037 ERROR [task-scheduler-1][org.springframework.integration.handler.LoggingHandler] org.springframework.messaging.MessagingException: failure occurred while polling for mail; nested exception is javax.mail.NoSuchProviderException: pop3
        at org.springframework.integration.mail.MailReceivingMessageSource.receive(MailReceivingMessageSource.java:117)
        at org.springframework.integration.endpoint.SourcePollingChannelAdapter.receiveMessage(SourcePollingChannelAdapter.java:144)
        at org.springframework.integration.endpoint.AbstractPollingEndpoint.doPoll(AbstractPollingEndpoint.java:192)
        at org.springframework.integration.endpoint.AbstractPollingEndpoint.access$000(AbstractPollingEndpoint.java:55)
        at org.springframework.integration.endpoint.AbstractPollingEndpoint$1.call(AbstractPollingEndpoint.java:149)
        at org.springframework.integration.endpoint.AbstractPollingEndpoint$1.call(AbstractPollingEndpoint.java:146)
        at org.springframework.integration.endpoint.AbstractPollingEndpoint$Poller$1.run(AbstractPollingEndpoint.java:298)
        at org.springframework.integration.util.ErrorHandlingTaskExecutor$1.run(ErrorHandlingTaskExecutor.java:52)
        atringframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:50)
        at org.springframework.integration.util.ErrorHandlingTaskExecutor.execute(ErrorHandlingTaskExecutor.java:49)
        at org.springframework.integration.endpoint.AbstractPollingEndpoint$Poller.run(AbstractPollingEndpoint.java:292)
        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)
Caused by: javax.mail.NoSuchProviderException: pop3
        at javax.mail.Session.getService(Session.java:806)
        at javax.mail.Session.getStore(Session.java:592)
        at javax.mail.Session.getStore(Session.java:554)
        at org.springframework.integration.mail.AbstractMailReceiver.connectStoreIfNecessary(AbstractMailReceiver.java:214)
        at org.springframework.integration.mail.AbstractMailReceiver.openFolder(AbstractMailReceiver.java:234)
        at org.springframework.integration.mail.AbstractMailReceiver.receive(AbstractMailReceiver.java:260)
        at org.springframework.integration.mail.MailReceivingMessageSource.receive(MailReceivingMessageSource.java:103)
        ... 19 more
@garyrussell
Copy link
Contributor

What are you using for dependency management?

NoSuchProviderException means the respective jars are missing from your runtime classpath.

@vayalaivadivel
Copy link

Hi, I am getting below exception,

 o.s.integration.handler.LoggingHandler   : org.springframework.messaging.MessagingException: failure occurred while polling for mail; nested exception is javax.mail.NoSuchProviderException: Invalid protocol: null

Below are the dependencies which i am using,

    compile 'org.springframework.integration:spring-integration-mail'
//    compile 'com.sun.mail:javax.mail:1.5.2'
    compile 'com.sun.mail:javax.mail:1.5.5'
    compile 'org.apache.commons:commons-email:1.1'

Please help me to fix this issue.

Thanks and Regards,
VADIVEL PM.

@artembilan
Copy link
Member

Hello @vayalaivadivel !

Looks like your problem isn't related to the question and doesn't fit to the mail sample.

Share you configuration, please. Looks like there is something wrong with the store-uri option.

From other side not sure why you need commons-email dependency, since we are fine with just Spring mail support and javax.mail.
You should consider to add something like into your Gradle config though:

runtime "com.sun.mail:smtp:$mailVersion"
runtime "com.sun.mail:pop3:$mailVersion"
runtime "com.sun.mail:imap:$mailVersion"

@vayalaivadivel
Copy link

Hi Artem Bilan, Thanks for your quick reply below is the configuration details,

@Bean
public IntegrationFlow pop3MailFlow() {
        return IntegrationFlows
                .from(Mail.pop3InboundAdapter("pop3://user:pwd@outlook.office365.com/INBOX")
                                .javaMailProperties(p -> p.put("mail.debug", "true").put("mail.debug", "true")),
                        e -> e.autoStartup(true)
                                .poller(Pollers.fixedDelay(1000)))
                .handle("MyHandler", "processEmail")
                .channel("My Message Channel")
                .get();
}

Please help me to fix. It is some what so urgency.

Thanks and Regards,
VADIVEL PM.

@artembilan
Copy link
Member

OK. Thank you for that one!

Let me know how does that work with my dependencies?

From other side share, please, more StackTrace.

@artembilan
Copy link
Member

You can still use your 1.5.5.
Since it is test, you should use the testRuntime instead.
See the Spring Integration Java DSL Gradle: https://github.com/spring-projects/spring-integration-java-dsl/blob/master/build.gradle#L154

@vayalaivadivel
Copy link

Ok Artembilan, I will check and let you know quickly

@artembilan
Copy link
Member

According to your StackTrace, looks like your store-url isn't null, but doesn't have the proper protocol part (AbstractMailReceiver):

if (this.url != null) {
    this.store = this.session.getStore(this.url);
}

But afterwards we end up with:

if (protocol == null || protocol.length() <= 0) {
    throw new NoSuchProviderException("Invalid protocol: null");
}

Funny, but no choice unless you will try to debug the Spring Integration code and beyond starting from the AbstractMailReceiver.connectStoreIfNecessary().

@vayalaivadivel
Copy link

Artembilan, Bad luck. Still i am getting same issue

@artembilan
Copy link
Member

Well, then you don't have choice unless go to the Session.getProvider() via debug from your IDE.
According to the existing logic, since we are reaching that Session.getProvider(), I can guess something like this:

  1. Since we overcome the Pop3MailReceiver constructor:
public Pop3MailReceiver(String url) {
    super(url);
    if (url != null) {
        Assert.isTrue(url.startsWith("pop3"), "url must start with 'pop3'");
    }
    else {
        this.setProtocol("pop3");
    }
}
  1. And can't determine the protocol afterwards in the Session.getStore():
String protocol = url.getProtocol();
Provider p = getProvider(protocol);
  1. And end up with the simple exception like:
if (protocol == null || protocol.length() <= 0) {
    throw new NoSuchProviderException("Invalid protocol: null");
}

I only see the problem with your store-url, when you don't have : after pop3 prefix. And don't have it at all! Something like this: pop3//outlook.office365.com/INBOX.

Just have tested it locally and seen the same StackTrace.

Why have you removed your one here? It is really useful to have the full picture.

@vayalaivadivel
Copy link

Sorry Unfortunately i have removed, Still i am getting same issue even though we removed the colon

Same exception:

016-02-25 01:26:38.568  INFO 10060 --- [      Thread-12] o.s.c.support.DefaultLifecycleProcessor  : Stopping beans in phase 2147483647
2016-02-25 01:26:39.329 ERROR 10060 --- [ask-scheduler-6] o.s.integration.handler.LoggingHandler   : org.springframework.messaging.MessagingException: failure occurred while polling for mail; nested exception is javax.mail.NoSuchProviderException: Invalid protocol: null
    at org.springframework.integration.mail.MailReceivingMessageSource.receive(MailReceivingMessageSource.java:125)
    at org.springframework.integration.endpoint.SourcePollingChannelAdapter.receiveMessage(SourcePollingChannelAdapter.java:175)
    at org.springframework.integration.endpoint.AbstractPollingEndpoint.doPoll(AbstractPollingEndpoint.java:224)
    at org.springframework.integration.endpoint.AbstractPollingEndpoint.access$000(AbstractPollingEndpoint.java:57)
    at org.springframework.integration.endpoint.AbstractPollingEndpoint$1.call(AbstractPollingEndpoint.java:176)
    at org.springframework.integration.endpoint.AbstractPollingEndpoint$1.call(AbstractPollingEndpoint.java:173)
    at org.springframework.integration.endpoint.AbstractPollingEndpoint$Poller$1.run(AbstractPollingEndpoint.java:330)
    at org.springframework.integration.util.ErrorHandlingTaskExecutor$1.run(ErrorHandlingTaskExecutor.java:55)
    at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:50)
    at org.springframework.integration.util.ErrorHandlingTaskExecutor.execute(ErrorHandlingTaskExecutor.java:51)
    at org.springframework.integration.endpoint.AbstractPollingEndpoint$Poller.run(AbstractPollingEndpoint.java:324)
    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)
Caused by: javax.mail.NoSuchProviderException: Invalid protocol: null
    at javax.mail.Session.getProvider(Session.java:459)
    at javax.mail.Session.getStore(Session.java:557)
    at org.springframework.integration.mail.AbstractMailReceiver.connectStoreIfNecessary(AbstractMailReceiver.java:239)
    at org.springframework.integration.mail.AbstractMailReceiver.openFolder(AbstractMailReceiver.java:259)
    at org.springframework.integration.mail.AbstractMailReceiver.receive(AbstractMailReceiver.java:285)
    at org.springframework.integration.mail.MailReceivingMessageSource.receive(MailReceivingMessageSource.java:111)
    ... 19 more

2016-02-25 01:26:39.338  INFO 10060 --- [      Thread-12] o.s.c.support.DefaultLifecycleProcessor  : Stopping beans in phase 1073741823
2016-02-25 01:26:39.342  INFO 10060 --- [      Thread-12] o.s.i.e.SourcePollingChannelAdapter      : stopped org.springframework.integration.config.SourcePollingChannelAdapterFactoryBean#0
2016-02-25 01:26:39.342  INFO 10060 --- [      Thread-12] o.s.c.support.DefaultLifecycleProcessor  : Stopping beans in phase 0
2016-02-25 01:26:39.343  INFO 10060 --- [      Thread-12] o.s.i.endpoint.EventDrivenConsumer       : Removing {logging-channel-adapter:_org.springframework.integration.errorLogger} as a subscriber to the 'errorChannel' channel
2016-02-25 01:26:39.343  INFO 10060 --- [      Thread-12] o.s.i.channel.PublishSubscribeChannel    : Channel 'application:local:-1.errorChannel' has 0 subscriber(s).
2016-02-25 01:26:39.344  INFO 10060 --- [      Thread-12] o.s.i.endpoint.EventDrivenConsumer       : stopped _org.springframework.integration.errorLogger
2016-02-25 01:26:39.344  INFO 10060 --- [      Thread-12] o.s.i.endpoint.EventDrivenConsumer       : Removing {service-activator} as a subscriber to the 'pop3MailFlow.channel#0' channel
2016-02-25 01:26:39.344  INFO 10060 --- [      Thread-12] o.s.integration.channel.DirectChannel    : Channel 'application:local:-1.pop3MailFlow.channel#0' has 0 subscriber(s).
2016-02-25 01:26:39.345  INFO 10060 --- [      Thread-12] o.s.i.endpoint.EventDrivenConsumer       : stopped org.springframework.integration.config.ConsumerEndpointFactoryBean#0
2016-02-25 01:26:39.345  INFO 10060 --- [      Thread-12] o.s.i.endpoint.EventDrivenConsumer       : Removing {transformer} as a subscriber to the 'merchantMessageChannel' channel
2016-02-25 01:26:39.345  INFO 10060 --- [      Thread-12] o.s.integration.channel.DirectChannel    : Channel 'application:local:-1.merchantMessageChannel' has 0 subscriber(s).
2016-02-25 01:26:39.346  INFO 10060 --- [      Thread-12] o.s.i.endpoint.EventDrivenConsumer       : stopped org.springframework.integration.config.ConsumerEndpointFactoryBean#1
2016-02-25 01:26:39.346  INFO 10060 --- [      Thread-12] o.s.i.endpoint.EventDrivenConsumer       : Removing {jms:outbound-channel-adapter} as a subscriber to the 'merchantMessageProcessingFlow.channel#0' channel
2016-02-25 01:26:39.346  INFO 10060 --- [      Thread-12] o.s.integration.channel.DirectChannel    : Channel 'application:local:-1.merchantMessageProcessingFlow.channel#0' has 0 subscriber(s).
2016-02-25 01:26:39.347  INFO 10060 --- [      Thread-12] o.s.i.endpoint.EventDrivenConsumer       : stopped org.springframework.integration.config.ConsumerEndpointFactoryBean#2
2016-02-25 01:26:39.347  INFO 10060 --- [      Thread-12] o.s.i.endpoint.EventDrivenConsumer       : Removing {service-activator} as a subscriber to the 'orderChannel' channel
2016-02-25 01:26:39.347  INFO 10060 --- [      Thread-12] o.s.integration.channel.DirectChannel    : Channel 'application:local:-1.orderChannel' has 0 subscriber(s).
2016-02-25 01:26:39.347  INFO 10060 --- [      Thread-12] o.s.i.endpoint.EventDrivenConsumer       : stopped org.springframework.integration.config.ConsumerEndpointFactoryBean#3
2016-02-25 01:26:39.354  INFO 10060 --- [      Thread-12] o.s.s.c.ThreadPoolTaskScheduler          : Shutting down ExecutorService 'taskScheduler'
2016-02-25 01:26:39.360  INFO 10060 --- [      Thread-12] o.s.j.d.e.EmbeddedDatabaseFactory        : Shutting down embedded database: url='jdbc:hsqldb:mem:testdb'
2016-02-25 01:26:39.365  INFO 10060 --- [      Thread-12] o.a.activemq.broker.TransportConnector   : Connector vm://test.replinkorder.integration stopped
2016-02-25 01:26:39.366  INFO 10060 --- [      Thread-12] o.apache.activemq.broker.BrokerService   : Apache ActiveMQ 5.12.0 (test.replinkorder.integration, ID:IND-VADIVEL-LT-54243-1456343776935-0:3) is shutting down
2016-02-25 01:26:39.370  INFO 10060 --- [      Thread-12] o.apache.activemq.broker.BrokerService   : Apache ActiveMQ 5.12.0 (test.replinkorder.integration, ID:IND-VADIVEL-LT-54243-1456343776935-0:3) uptime 13.105 seconds
2016-02-25 01:26:39.370  INFO 10060 --- [      Thread-12] o.apache.activemq.broker.BrokerService   : Apache ActiveMQ 5.12.0 (test.MyClientorder.integration, ID:IND-VADIVEL-LT-54243-1456343776935-0:3) is shutdown

@vayalaivadivel
Copy link

Now i am getting javax.mail.AuthenticationFailedException: Command is not valid in this state error for the configuration,

@Bean
    public IntegrationFlow pop3MailFlow() {
        return IntegrationFlows
                .from(Mail.pop3InboundAdapter("outlook.office365.com", "usernae", "password")
                                .javaMailProperties(p -> p.put("mail.debug", "true").put("mail.debug", "true")),
                        e -> e.autoStartup(true)
                                .poller(Pollers.fixedDelay(1000)))
                .handle("MyMailOrderUpdateProcessor", "processEmail")
                         .channel(myMessageChannel)
                .get();
    }

FYI

<ijLog><event type='onOutput'><ijLogEol/>
  <test id='2.7' parentId='2.5'><ijLogEol/>
    <descriptor name='sending mail file and verify Inbound Flow' className='com.b2s.service.merchant.replink.TestMailContextSpecIT' /><ijLogEol/>
    <event destination='StdOut'><![CDATA[Caused by: javax.mail.AuthenticationFailedException: Command is not valid in this state.<ijLogEol/>
]]></event><ijLogEol/>
  </test><ijLogEol/>
</event></ijLog>

@artembilan
Copy link
Member

???

Sorry, @vayalaivadivel , I can't help you anymore from this my side.

You have to go through the debug from your IDE, since you mentioned that it is a "spock test". You should not to remove colon. That was just my assumption what may be wrong in your case.

Otherwise I don't see any how to help you...

(Please, study the GitHub comments syntax: https://help.github.com/articles/creating-and-highlighting-code-blocks/. It's thankless to edit each your post 😄 )

@vayalaivadivel
Copy link

Ok no problem thank you so much...

@vayalaivadivel
Copy link

Now i have fixed. Along with all your info we have to ssl info in integration logic.

@artembilan
Copy link
Member

Glad to hear!

Would be better if you'd share the config on the matter just in case to cover everything around the issue.
Especially that part "how to SSL?"

After your answer I will close the issue since we have fixed your and the lack of responsibility from another reporter.

In the future, please, raise a new tickets because even here we see that you have a bit different issue.

@artembilan
Copy link
Member

Closed with the discussion fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants