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)
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.
subject: Internal error within javax.mail.internet?