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

Discussion in 'Java' started by Marine, Feb 10, 2006.

  1. Marine

    Marine Guest

    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.
     
    Marine, Feb 10, 2006
    #1
    1. Advertising

  2. Marine

    Guest

    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.
     
    , Feb 10, 2006
    #2
    1. Advertising

  3. Marine

    Roedy Green Guest

    On 10 Feb 2006 07:14:50 -0800, "Marine" <> wrote,
    quoted or indirectly quoted someone who said :

    >NoClassDefFoundError


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

    My guess is you recently upgraded your java and failed to refresh your
    ext directories.
    --
    Canadian Mind Products, Roedy Green.
    http://mindprod.com Java custom programming, consulting and coaching.
     
    Roedy Green, Feb 10, 2006
    #3
  4. Marine

    Marine Guest

    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 !)
     
    Marine, Feb 15, 2006
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alessandro Rossi
    Replies:
    0
    Views:
    3,292
    Alessandro Rossi
    May 27, 2005
  2. Ike
    Replies:
    4
    Views:
    1,150
    ramarao g.v.
    Mar 20, 2007
  3. aemi
    Replies:
    2
    Views:
    3,727
    =?ISO-8859-1?Q?Arne_Vajh=F8j?=
    Apr 10, 2007
  4. R. Vince

    mail.jar & activation.jar

    R. Vince, Apr 26, 2007, in forum: Java
    Replies:
    3
    Views:
    957
    =?ISO-8859-1?Q?Arne_Vajh=F8j?=
    Apr 28, 2007
  5. Matthias Griem
    Replies:
    6
    Views:
    574
Loading...

Share This Page