2

Does anyone have experience upgrading the JavaMail version that comes bundled with WAS?

I'm using WAS 8.5.5, which comes with JavaMail 1.4.2 and I need my application to use 1.4.5. Using the parent last classloader mode is not an option unfortunately due to the legacy nature of the application.

In addition to existing in my EAR file, I tried adding the new jar file to the extensions classpath (e.g. jre/lib/ext), but at runtime WAS is still using 1.4.2 for some reason.

The JavaMail 1.4.2 code is included in the j2ee.jar as well as several other jars scattered throughout the WAS installation.

Any ideas?

Dave L.
  • 9,595
  • 7
  • 43
  • 69

2 Answers2

0

Just stumbled over the same issue and resolved it:

  • Under ../AppServer/plugins, download com.ibm.ws.prereq.javamail.jar.
  • From the internet, download the javax.mail-[version].jar which you want to use.
  • Use for example WinRAR to put the plugin.xml from the IBM jar into the Oracle javax.mail-[version].jar.
  • Rename the javax.mail-[version].jar to com.ibm.ws.prereq.javamail.jar and replace the file in the directory given above.
  • Restart your appServer(s)

If you use the javaSession under resources (ws admin console), activate DEBUG there and check the log, that the new version is really taken into account.

I would recommend to replace the same major version, but the latest (for example, 1.4.2-IBM with 1.4.7-Oracle, not with 1.5.x). But that's just for general reasons. Of course, this kind of change is not supported by IBM! :-)

Hope it helps (someone), Detlev

  • This is very bad practice: 1st it will make your WebSphere unsupported, 2nd - f you do install any official fixpack later it might be overwritten. So if you found serious issues with java-mail, it is much better to create PMR and get the official fix. – Gas Jun 23 '18 at 09:23
0

I think the latest javamail version available from oracle is javamail 1.4.7 (the TLS issue sending mails was fixed on version 1.4.5). You can download the javamail_1.4.7 from oracle and follow the intructions above.

Or, I have the plugin updated and ready to copy and paste, you can download it on this link

Paste and replace the updated file (com.ibm.ws.prereq.javamail.jar) in WebSphere\AppServer\plugins (You have to replace the default com.ibm.ws.prereq.javamail.jar with the file you downloaded from my link, please make sure to backup the file before make some changes)

Note: This fix was tested on IBM WAS 8.5

Luis Olivares
  • 221
  • 3
  • 6