Solved

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

Posted on 2012-04-02
2
7,352 Views
Last Modified: 2012-04-03
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
Comment
Question by:addisuc
2 Comments
 
LVL 19

Accepted Solution

by:
ramazanyich earned 500 total points
ID: 37799669
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
 

Author Comment

by:addisuc
ID: 37801883
Thanks replacing "javax.mail-api"  with "mail" resolves the issue.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question