• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

java.lang.NoSuchMethodError: com.sun.mail.pop3.POP3Store.<init>

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am getting below exception while connecting to POP3 Store.I am using mail.jar in my classpath.
Below is my code to connect to POP3.


Below is the exception StackTrace i am getting.

java.lang.NoSuchMethodError: com.sun.mail.pop3.POP3Store.<init>(Ljavax/mail/Session;Ljavax/mail/URLName;Ljava/lang/String;Z)V
at com.sun.mail.pop3.POP3SSLStore.<init>(POP3SSLStore.java:53)

Please help me to resolve this exception.

Thanks.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It sounds like incompatible classes from different JavaMail version are being mixed. Do you maybe have several jar files in the classpath that contain some of the JavaMail classes? Which JavaMail version are you using?
 
SaiManasa Dasari
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Ulf. I have both j2ee.jar and mail.jar in my classpath.Now it is working fine.Thank you.
 
Surfs up space ponies, I'm making gravy without this lumpy, tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic