PreencodedMimeBodyPart not working in SONIC

Posted by Admin on 04-May-2010 14:37

Hello All,

I have to develop a mail service which should handle encoded attachments while I am using "PreencodedMimeBodyPart" I am getting following error.

java.lang.IllegalAccessError: tried to access method javax.mail.internet.MimeBodyPart.setEncoding(Ljavax/mail/internet/MimePart;Ljava/lang/String;)V from class javax.mail.internet.PreencodedMimeBodyPart

at javax.mail.internet.PreencodedMimeBodyPart.updateHeaders(PreencodedMimeBodyPart.java:118)

at javax.mail.internet.MimeMultipart.updateHeaders(MimeMultipart.java:216)

at javax.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:1021)

at javax.mail.internet.MimeMessage.updateHeaders(MimeMessage.java:1841)

at javax.mail.internet.MimeMessage.saveChanges(MimeMessage.java:1822)

at javax.mail.Transport.send(Transport.java:80)

at com.ensarc.incident.server.mail.EmailSender.mail(EmailSender.java:98)

at com.ensarc.incident.server.mail.EmailService.service(EmailService.java:94)

Is there any work around to overcome this?

Thanks in advance.

Regards,

Swaroop Kunduru.

All Replies

Posted by tsteinbo on 10-May-2010 06:35

Which Sonic version are you using? My assumption is that you run into this problem because you are picking up the mail.jar v 1.2 which is part of Sonic 7.x instead of any newer you chose, like 1.4.1.

BTW, post to the Sonic sub-community such that we pick up sonic stuff earlier.

Thomas

This thread is closed