Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
SaiManasa Dasari
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • 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.
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!