dominoExperts.com - Powered by Domino 8.5.2 Domino Accelerator Pack
- Cache, Combine, JS-Minify and Compress content
Lotus Triple Search DominoExperts + Blogs + R8 forum
dominoExperts.com -> Script vault -> Java

 \Lotus\notes\jvm\lib\ext does not take .zip


Tomas NielsenPost date: 2007-09-19 10:22

My colleague, Robert Ericsson, and I have just finished a battle with a memory leaking notes designer and classpath trouble.

In a project we used the Oracles jdbc driver, ojdbc14.zip, attached in an agent. After a few re-saves we had to reboot the machine due to massive memory leaks.

Putting the file in "\Lotus\notes\jvm\lib\ext" seemed like the way to go and it is - If you rename the file to ojdbc14.jar !

Now the agent compiles in less than a second (20 seconds before) and we do not need to reboot windows all the time!


Daniel LehtihetPost date: 2007-09-20 12:17

Hi Thomas,

That seems to be the way to go (jvm/lib/ext). The "old" way, using JavaUserClasses (255 character limit), now have a successor also in "JavaUserClassesExt" (from  6.0.4 and 6.5.1) where you can basically to this:

JavaUserClassesExt=QPJC1,QPJC2,QPJC3,QPJC4,QPJC5,QPJC6,QPJC7,QPJC8,QPJC9

QPJC1=C:\SERVER\651\LOTUS\DOMINO\quickplace.jar
QPJC2=C:\SERVER\651\LOTUS\DOMINO\xercesImpl.jar
QPJC3=C:\SERVER\651\LOTUS\DOMINO\xalan.jar
QPJC4=C:\SERVER\651\LOTUS\DOMINO\xml-apis.jar
QPJC5=C:\SERVER\651\LOTUS\DOMINO\log4j-118compat.jar
QPJC6=C:\SERVER\651\LOTUS\DOMINO\STMtgManagement.jar
QPJC7=C:\SERVER\651\LOTUS\DOMINO\STCore.jar
QPJC8=C:\SERVER\651\LOTUS\DOMINO\ibmjsse.jar
QPJC9=C:\SERVER\651\LOTUS\DOMINO\cs.jar

 

The 255 char limit still applies for the JavaUserClassesExt, but since the entries can be substituted by variables, this is no longer the same problem.

The classloading mechanism is to blame in your original problem described above. When one attaches "external" code as jar or zip in the agent, the resources never seem to be released. This is due to the fact that the agent, every time it runs, uses the "agent class loader" as opposed to the "system class loader". So by instantiating the driver in the agent, it keeps holding the reference in memory even when the agent quits ( = leaks).

I know that there are tricks one can use to execute the agent inside another "Threadgroup" which is not the same Threadgroup that the agent normally runs inside. This way, you can keep from getting other nasty errors from the JVM

 

Kind regards

 

Daniel


Tomas NielsenPost date: 2007-09-20 21:10

Nice to see you back Daniel!

Good tip about the variable names! I never used that one. But I like the "ext" directory where I can dump everything.

But I will probably move to Domiclipse (http://www.domiclipse.com/) for agents from now on. I have been doing servlets in Eclipse for a year now and can not live without it anymore. 




RSS feed
Subscribe to Forum

Share this page

Top posters
Tomas Nielsen212
Joacim Boive27
Fredrik Stöckel27
Danne14
Niklas Waller13
Kenneth Haggman11
Bryan Kuhn10
Daniel Lehtihet9
Jonas Israelsson8
dm997