Hello Yoav, Thanks for your help. I'm going to try to be as explicit as possible.
I use the Smtp server from the place I'm working. Not on my computer, but in the domain, and I use the Jdk 1.4.2_03, Tomcat 5.0.18 (last version) and I downloaded the mail.jar and the activation.jar from Sun 4 days ago. When I launch my class (with a main method) from Jbuilder, it works well and I can send my message. (I put mail.jar and activation.jar in the jdk/jre/lib/ext dir) When I create a servlet (with the same code) and put the servlet into my tomcat webapp/WEB-INF/classes dir, and try to connect from the same computer using the 127.0.0.1 ip address or even if I use my internet ip address, I always receive the error message. (Tomcat is working well for all my others applications, but it's the first time I use the javamail api) I tried to send a really simple text/plain message. I also tried to send a multipart message (with an attachement), always the same problem. I searched for my problem on the internet, and I found several peoples who had the same problem. The only answer I found where I didn't already do the correction was: -There is a problem with the mailcap file from the mail.jar that must be loaded before the activation.jar (seem to be a problem with an old version of mail.jar, so normally, I shouldn't have it) -> Don't know how to do that and seem to be too deep manipulations to be a good answer, but I don't know what else to do. It seems the problem appears because Tomcat doesn't understand the encoding type (correct me if I'm wrong). So I tried to explicitly write the encoding of the message, but nothing changed. Now, I don't know anymore what to do! Did anyone have that problem? "javax.activation.UnsupportedDataTypeException: no object DCH for MIME type ..." Kenny Louveaux ----- Original Message ----- From: "Shapira, Yoav" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Thursday, February 12, 2004 3:54 PM Subject: RE: Problem with mail.jar and activation.jar. Howdy, >about a problem in the mailcap file in the mail.jar. They say the mail.jar >must be loaded before the activation.jar because of that. >I don't know if it will correct my problem (I want to try because I'm >getting mad), but how can I know the order in wich Tomcat load the .jar >files, and thus choose myself? Libraries in a given tomcat repository, e.g. common/lib, are loaded in an unpredictable order: you should not count on the loading order. You can of course customize tomcat's classloaders to load jars alphabetically or by any order you desire, but then you have a custom version of tomcat. I haven't seen your problem before, so I can't help much more. What JDK version are you using, and what versions of mail and activation? Are you using a local or remote SMTP server? Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
