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

M

Marine

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.
 
C

chrisrocker90

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.
 
M

Marine

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 !)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top