java.lang.ClassNotFoundException: com.sun.mail.pop3.POP3Store

Spring JIRA | Artem Bilan | 2 years ago
  1. 0

    I was receiving exceptions with both the IMAP and POP implementations. The IMAP would fail with this exception: {noformat} javax.mail.NoSuchProviderException: imaps at javax.mail.Session.getService(Session.java:792) at javax.mail.Session.getStore(Session.java:586) at javax.mail.Session.getStore(Session.java:548) at org.springframework.integration.mail.AbstractMailReceiver.connectStoreIfNecessary(AbstractMailReceiver.java:210) at org.springframework.integration.mail.AbstractMailReceiver.openFolder(AbstractMailReceiver.java:230) 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) {noformat} And the POP implementation would fail with: {noformat} 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:259) at javax.mail.Session.getService(Session.java:788) at javax.mail.Session.getStore(Session.java:586) at javax.mail.Session.getStore(Session.java:548) at org.springframework.integration.mail.AbstractMailReceiver.connectStoreIfNecessary(AbstractMailReceiver.java:210) at org.springframework.integration.mail.AbstractMailReceiver.openFolder(AbstractMailReceiver.java:230) at org.springframework.integration.mail.AbstractMailReceiver.receive(AbstractMailReceiver.java:256) at org.springframework.integration.mail.MailReceivingMessageSource.receive(MailReceivingMessageSource.java:103) at org.springframework.integration.endpoint.SourcePollingChannelAdapter.receiveMessage(SourcePollingChannelAdapter.java:124) 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.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) {noformat}

    Spring JIRA | 2 years ago | Artem Bilan
    java.lang.ClassNotFoundException: com.sun.mail.pop3.POP3Store
  2. 0

    I was receiving exceptions with both the IMAP and POP implementations. The IMAP would fail with this exception: {noformat} javax.mail.NoSuchProviderException: imaps at javax.mail.Session.getService(Session.java:792) at javax.mail.Session.getStore(Session.java:586) at javax.mail.Session.getStore(Session.java:548) at org.springframework.integration.mail.AbstractMailReceiver.connectStoreIfNecessary(AbstractMailReceiver.java:210) at org.springframework.integration.mail.AbstractMailReceiver.openFolder(AbstractMailReceiver.java:230) 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) {noformat} And the POP implementation would fail with: {noformat} 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:259) at javax.mail.Session.getService(Session.java:788) at javax.mail.Session.getStore(Session.java:586) at javax.mail.Session.getStore(Session.java:548) at org.springframework.integration.mail.AbstractMailReceiver.connectStoreIfNecessary(AbstractMailReceiver.java:210) at org.springframework.integration.mail.AbstractMailReceiver.openFolder(AbstractMailReceiver.java:230) at org.springframework.integration.mail.AbstractMailReceiver.receive(AbstractMailReceiver.java:256) at org.springframework.integration.mail.MailReceivingMessageSource.receive(MailReceivingMessageSource.java:103) at org.springframework.integration.endpoint.SourcePollingChannelAdapter.receiveMessage(SourcePollingChannelAdapter.java:124) 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.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) {noformat}

    Spring JIRA | 2 years ago | Artem Bilan
    java.lang.ClassNotFoundException: com.sun.mail.pop3.POP3Store
  3. 0

    exceptions for the mail basic sample

    GitHub | 2 years ago | tzvikav
    java.lang.ClassNotFoundException: com.sun.mail.pop3.POP3Store
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Spring integration with mail

    Stack Overflow | 2 years ago | mallikarjun
    java.lang.ClassNotFoundException: com.sun.mail.imap.IMAPSSLStore
  6. 0

    Exception in thread "main" java.lang.ClassNotFoundException: WordCount

    Stack Overflow | 3 years ago | GeekyOmega
    java.lang.ClassNotFoundException: WordCount
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.ClassNotFoundException

    com.sun.mail.pop3.POP3Store

    at java.net.URLClassLoader$1.run()
  2. Java RT
    Class.forName
    1. java.net.URLClassLoader$1.run(URLClassLoader.java:372)
    2. java.net.URLClassLoader$1.run(URLClassLoader.java:361)
    3. java.security.AccessController.doPrivileged(Native Method)
    4. java.net.URLClassLoader.findClass(URLClassLoader.java:360)
    5. java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    6. sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    7. java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    8. java.lang.Class.forName0(Native Method)
    9. java.lang.Class.forName(Class.java:259)
    9 frames
  3. JavaMail API
    Session.getStore
    1. javax.mail.Session.getService(Session.java:788)
    2. javax.mail.Session.getStore(Session.java:586)
    3. javax.mail.Session.getStore(Session.java:548)
    3 frames
  4. org.springframework.integration
    MailReceivingMessageSource.receive
    1. org.springframework.integration.mail.AbstractMailReceiver.connectStoreIfNecessary(AbstractMailReceiver.java:210)
    2. org.springframework.integration.mail.AbstractMailReceiver.openFolder(AbstractMailReceiver.java:230)
    3. org.springframework.integration.mail.AbstractMailReceiver.receive(AbstractMailReceiver.java:256)
    4. org.springframework.integration.mail.MailReceivingMessageSource.receive(MailReceivingMessageSource.java:103)
    4 frames
  5. Spring Integration Core
    ErrorHandlingTaskExecutor$1.run
    1. org.springframework.integration.endpoint.SourcePollingChannelAdapter.receiveMessage(SourcePollingChannelAdapter.java:124)
    2. org.springframework.integration.endpoint.AbstractPollingEndpoint.doPoll(AbstractPollingEndpoint.java:192)
    3. org.springframework.integration.endpoint.AbstractPollingEndpoint.access$000(AbstractPollingEndpoint.java:55)
    4. org.springframework.integration.endpoint.AbstractPollingEndpoint$1.call(AbstractPollingEndpoint.java:149)
    5. org.springframework.integration.endpoint.AbstractPollingEndpoint$1.call(AbstractPollingEndpoint.java:146)
    6. org.springframework.integration.endpoint.AbstractPollingEndpoint$Poller$1.run(AbstractPollingEndpoint.java:298)
    7. org.springframework.integration.util.ErrorHandlingTaskExecutor$1.run(ErrorHandlingTaskExecutor.java:52)
    7 frames
  6. Spring Core
    SyncTaskExecutor.execute
    1. org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:50)
    1 frame
  7. Spring Integration Core
    AbstractPollingEndpoint$Poller.run
    1. org.springframework.integration.util.ErrorHandlingTaskExecutor.execute(ErrorHandlingTaskExecutor.java:49)
    2. org.springframework.integration.endpoint.AbstractPollingEndpoint$Poller.run(AbstractPollingEndpoint.java:292)
    2 frames
  8. Spring Context
    ReschedulingRunnable.run
    1. org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
    2. org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:81)
    2 frames
  9. Java RT
    Thread.run
    1. java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    2. java.util.concurrent.FutureTask.run(FutureTask.java:266)
    3. java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
    4. java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
    5. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    6. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    7. java.lang.Thread.run(Thread.java:745)
    7 frames