Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
1520 connectés 

  FORUM HardWare.fr
  Programmation
  Java

  JavaMail

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

JavaMail

n°1182016
Ethylene
Posté le 23-08-2005 à 09:54:06  profilanswer
 

Bonjour à tous !
J'obtiens cette erreure lorsque je travaille avec JavaMail :

java.lang.NoClassDefFoundError: com/sun/activation/registries/LogSupport
at javax.activation.MailcapCommandMap.<init>(MailcapCommandMap.java:111)
at javax.activation.CommandMap.getDefaultCommandMap(CommandMap.java:44)
at javax.activation.DataHandler.getCommandMap(DataHandler.java:136)
at javax.activation.DataHandler.getDataContentHandler(DataHandler.java:567)
at javax.activation.DataHandler.writeTo(DataHandler.java:294)
at javax.mail.internet.MimeUtility.getEncoding(MimeUtility.java:230)
at javax.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:1124)
at javax.mail.internet.MimeMessage.updateHeaders(MimeMessage.java:1927)
at javax.mail.internet.MimeMessage.saveChanges(MimeMessage.java:1908)
at javax.mail.Transport.send(Transport.java:79)
at com.exercices.Controller.TestMail.EnvoyerMail(TestMail.java:45)
at com.exercices.Controller.TestMail.main(TestMail.java:56)
Exception in thread "main"

 
en faisant des recherches sur Google je suis tombé la dessus :

I recently upgraded my JDK to v5.0. After upgrading I was receiving the following exception when trying to send email via Java:
 
Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/activation/registries/LogSupport at javax.activation.MailcapCommandMap.(MailcapCommandMap.java:111)
 
The problem is that the new JDK j2ee.jar has an incorrect version of the class MailcapCommandMap in it.
 
Solution : Make sure you have the latest version of JAF (activation.jar). This jar has the correct version of MailcapCommandMap. Then delete the entire activation package from your j2ee.jar.

 
Ce ke j'ai fais mais ça ne marche pas mieux pour autant...
Des suggestions ??

mood
Publicité
Posté le 23-08-2005 à 09:54:06  profilanswer
 

n°1182112
Ethylene
Posté le 23-08-2005 à 11:26:56  profilanswer
 

C'est réglé, il s'agissait d'une erreure d'étourderie de ma part...
Cependant j'aurais encore une petite question...
Dans un tuto sur JavaMail j'avais trouvé un exemple qui commencait une méthode de cette façon :
 
public static boolean EnvoyerMail(String serveur, boolean debug) {
 
Mais je ne vois pas vraiment ce qu'il entend par "serveur", l'adresse IP ? Mon nom de domaine ??

n°1182331
Ethylene
Posté le 23-08-2005 à 14:32:14  profilanswer
 

Bon juste histoire de vous dire ke ça y est c'est réglé... :bounce:  
Je me suis tout simplement tel un gros newbie, vautré sur le code sans bien faire attention à ce que le tuto m'indiquait...
Bon je l'ai repris au calme et j'ai résolu mon chtit problème tout seul comme un grand lol ! :p

n°2009328
christinae
Posté le 15-07-2010 à 16:57:03  profilanswer
 

Ethylene a écrit :

Bon juste histoire de vous dire ke ça y est c'est réglé... :bounce:  
Je me suis tout simplement tel un gros newbie, vautré sur le code sans bien faire attention à ce que le tuto m'indiquait...
Bon je l'ai repris au calme et j'ai résolu mon chtit problème tout seul comme un grand lol ! :p


 
Peux tu me dire quel tuto tu as suivi, j'en ai trouvé pleins sur le net mais je rencontre toujours des bugs,
merci !

n°2009364
sircam
I Like Trains
Posté le 15-07-2010 à 22:06:01  profilanswer
 

Remonter un topic de presque 5 ans et le recycler, owwwwwww
 
 [:implosion du tibia]


---------------
Now Playing: {SYNTAX ERROR AT LINE 1210}

Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation
  Java

  JavaMail

 

Sujets relatifs
JDK 1.1 et javamailProblème d'installation de Javamail (urgent)
rajout de l'api javamail !!! heeeeeelp meJavaMail - QoS pour l'envoi d'un mail
[Javamail] Question express sur les événements[JAVA] Pb avec Javamail
JavaMail -> mail en HTML/Text lu sur un webmail[JAVA] Parser MIME (JavaMail)
Plus de sujets relatifs à : JavaMail


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR