Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / February 2006

Tip: Looking for answers? Try searching our database.

NoClassDefFoundError: javax/activation/DataSource but activation.jar is present !

Thread view: 
Marine - 10 Feb 2006 15:14 GMT
Hello,

I'm trying to send a mail with JavaMail. It was recently working fine.
But at this time, it doesn't work anymore. I'm having the following
error :

DEBUG: setDebug: JavaMail version 1.3.3
StandardWrapperValve[action]: "Servlet.service()" pour la servlet
action a généré une exception
java.lang.NoClassDefFoundError: javax/activation/DataSource
       at
fr.swm.commun.service.technique.ServiceNotification.envoyerMailSMTP(Service­Notification.java:55)

(...)

This error is thrown by the following instruction :
  MimeMessage message = new MimeMessage(session);

The "activation.jar" library is present (it includes a
javax.activation.DataSource class), it is in classpath. (I tried to get
it out, and to put it back, but it doesn't work better...)

Here is my configuration : Eclipse 3.0.2, Tomcat 5.0.28, JavaMail
1.3.3_01, JAF 1.0.2

Thanks.
chrisrocker90@yahoo.com - 10 Feb 2006 20:02 GMT
Marine,

Take a look at the Tomcat startup script. I think it may overwrite the
system classpath. I always find it helpful to have a servelet display
the classpath.
Roedy Green - 10 Feb 2006 21:23 GMT
>NoClassDefFoundError

see http://mindprod.com/jgloss/caq.html

My guess is you recently upgraded your java and failed to refresh your
ext directories.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

Marine - 15 Feb 2006 10:06 GMT
Thanks for your help.
In fact, I put activation.jar in the wrong place. I put it in the
application classpath (Eclipse -> Project properties), but Tomcat need
the library too, as I defined a mail Session in Tomcat, to get it by
JNDI.
So, I put activation.jar in C:\Program Files\Apache Software
Foundation\Tomcat 5.0\common\lib\ and yet, it is working well.

(Sorry for my bad english !)


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.