0

I need my JAVA code to use newer version of JavaMail on my Domino 9.0.1.

I have found 2 version of JavaMail installed on my Domino by default.

  1. JavaMail 1.3 - "./osgi/shared/eclipse/plugins/com.ibm.designer.lib.javamail_9.0.1.20131004-1200/lib"

  2. JavaMail 1.4 - "./ndext"

My JAVA code by default use JavaMail 1.3.

The question is how to force using JavaMail 1.4? Or how to install JavaMail 1.5 and force JAVA to use it?

PS: I have already tried to put JavaMail JARs in "WebContent/WEB-INF/lib" and in "/jvm/lib/ext". Unfortunately, it doesn't help.

Wanna Coffee
  • 2,742
  • 7
  • 40
  • 66

3 Answers3

1

You wont be able to do this, without a big amount of hacking with the java Classloader. XPages engine starts with HTTP task on Domino server, therefore it's loaded before your application is loaded, and it's classloader takes priority.

This problem was discussed in another topic, which you can check, perhaps you will find some ideas there. How can I use an updated version of JavaMail in XPages?

Community
  • 1
  • 1
Egor Margineanu
  • 740
  • 5
  • 9
0

I don't know specifically for JavaMail - but I if you are going to use it from XPages (or OSGi) I guess you may be able to load the jar as a plug-in in OSGi. This is the way that OpenNTF Essentials is loaded - and I believe that it will put it in front of everything else installed in the file system ;-)

I am working on a description of how to do this (i.e. wrapping any jar into a plug-in) - but I am not quite done yet ;-) Will try to do it over the next couple of days...

Until then you may be able to get some of the things that you need from: http://www-10.lotus.com/ldd/ddwiki.nsf/dx/Master_Table_of_Contents_for_XPages_Extensibility_APIs_Developer_Guide - look under "Library" and "Deployment"

Edit: Ok, so here comes the first article about how to wrap the JAR into a plug-in ;-) http://www.dalsgaard-data.eu/blog/wrap-an-existing-jar-file-into-a-plug-in/

/John

John Dalsgaard
  • 2,797
  • 1
  • 14
  • 26
0

I've tried the OSGi approach but couldn't get it to work somehow. In this Stackoverflow question I've posted my solution to update the Javamail implementation of Domino.

Community
  • 1
  • 1
Ferry Kranenburg
  • 2,625
  • 1
  • 17
  • 23