• Post Reply Bookmark Topic Watch Topic
  • New Topic

Internal error within javax.mail.internet?  RSS feed

Travis Bretton
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all.

I am really hoping the Ranchers can help me with a problem I'm having.

I'm seeing a runtime error that doesn't seem to make sense. Here's the dump:

Caused by: 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:109)
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.wirestone.quality.service.Mailer.sendMail(Mailer.java:67)

My code ends at the last line of the dump shown here. It's where I call

After that, it's all code in the javax.mail.internet package. Then, in PreencodedMimeBodyPart.updateHeader(), it tries to call MimeBodyPart.setEncoding() and gets an IllegalAccessError.

Now, in researching this issue, I've come across many examples of other folks with an IllegalAccessError where they compile with one version of a library and then try to run with another. And the error always happens when their code tries to call the library. However, in my case, the error occurs from within the package as it is calling itself! This I do not understand.

This package is from mail.jar and it is a bit old. The manifest gives it as version 1.3 of javax.mail.

This error has arisen during deploying to the client's environment. However, the jars in their environment have been placed there by us and even, just to make sure, I've had them send the jars back to me to compile with.

I'm at a loss and everything I've tried has been fruitless. Please help. I'd be happy to show my code if anyone thinks that it's relevant.

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!