• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 8888
  • Last Modified:

JavaMail..java.lang.NoClassDefFoundError: com/sun/mail/util/MessageRemovedIOException

Hi,
I am trying to write a program that sends email using javaMail.
I am using maven to get the jars but I am getting the following exception and could not proceed forward.Can anybody help me get the right jars via maven ?
                            the one I have are the following in the maven POM file:

                                  <dependency>
                  <groupId>javax.mail</groupId>
                  <artifactId>javax.mail-api</artifactId>
                  <version>1.4.5</version>
            </dependency>
            <dependency>
                  <groupId>javax.activation</groupId>
                  <artifactId>activation</artifactId>
                  <version>1.1.1</version>
            </dependency>


Thanks
0
addisuc
Asked:
addisuc
1 Solution
 
ramazanyichCommented:
I think you need to add additional dependency
<dependency>
      <groupId>javax.mail</groupId>
      <artifactId>mail</artifactId>
      <version>1.4.5</version>
</dependency>

you had only API dependency and not implementation
0
 
addisucAuthor Commented:
Thanks replacing "javax.mail-api"  with "mail" resolves the issue.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now