Solved

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

Posted on 2012-04-02
2
7,739 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to get all the API from website? 11 160
how to debug htl and js pages 8 78
Java array sort 10 62
Firefox and firebub 5 26
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Suggested Courses

732 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