Recently, I create a program for data synchronization, when the synchronization is done, the program will send a email to inform me.
it is run perfectly in jbuilder, but when run the program created by using jBuilder 9 developer, it show following message:
javax.mail.SendFailedException: Sending failed;
nested exception is:
class javax.mail.MessagingException: IOException while sending message;
nested exception is:
javax.activation.UnsupportedDataTypeException: no object DCH for MIME type multipart/mixed;
boundary="----=_Part_0_31149935.1122348209343"
at javax.mail.Transport.send0(Transport.java:218)
at javax.mail.Transport.send(Transport.java:80)
at movex.sendMailClass.sendMail(sendMailClass.java:226)
at movex.SynTest.main(SynTest.java:80)
after search the internet, I found the solutio for it that we need manually exclude the files of SUN_MICR.RSA and SUN_MICR.SF from the META-INF folder in mail.jar.
To do it, following below steps.
From the jar's folder which on my Pc is 'C:\jBuilder9\lib':
0. copy mail.jar mailbackup.jar
1. mkdir jartemp
2. cd jartemp
3. C:\JBuilder9\jdk1.4\bin\jar -xvf ../mail.jar
4. cd META-INF
5. del SUN_MICR.*
6. cd..
7. C:\JBuilder9\jdk1.4\bin\jar cvf ../mail.jar *
you can delete jartemp now or later.
Then using new generated mail.jar in your jbuilder project.
Monday, July 25, 2005
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment