2

I have an timer process which reads through lotus notes 5 and dumps the read document in modeshape repository. The process writes the timestamp and other relevant information into a DB table and uses this to pick up where it was stopped and then read the rest of the docs.

The problem comes when the app is undeployed and redeployed again. When I do that, While a session is created with Lotus notes, it throws me an exception :

ava.lang.UnsatisfiedLinkError: Native Library C:\Domino\nlsxbe.dll already loaded in another classloader

that's obvious because redeployment didn't remove the dependent dlls and Jars from JVM. I need a solution where in I can remove the dependents from JVM or reference the same dlls and resources while trying to create session the next time.

Note - I don't have the code where the LOTUS notes api's try to load the dependents and I don't even know the dependent APIs and DLLs which are needed to create the connection so I moved the whole installation folder of lotus notes domino client to my java.library.path

Please help, This is just driving me nuts. Probably a very simple issue but I need someexpert advice how to accomplish this in a better way.

TusharPanda
  • 211
  • 2
  • 14
  • The issue isn't with Notes. There should be no restriction on loading the same library twice (from at least R6 version that I am aware of). – Simon O'Doherty Feb 26 '14 at 07:47

1 Answers1

2

I fixed it. I disected through the NotesThread class and found that it always tries to load the nlsxbe.dll in classloader which caused the issue. i dumped the idea of using NotesThreads (and any IBM APIs in future) and used java threads and that fixed the issue.

TusharPanda
  • 211
  • 2
  • 14
  • 2
    The reason for NotesThreads is so that Notes/Domino can terminate a thread when it is shutting down. If you only extend Thread then Notes/Domino cannot terminate the JVM correctly (nor clean up backend objects)... Notes version aside, it sounds like you have invalid install set up anyway, so it would not impact you unless you had to run Notes/Domino as an application. – Simon O'Doherty Feb 27 '14 at 13:54
  • Thanks Simon for the heads up. The server on which the application interacting with lotus notes is deployed, doesn't has a lotus notes deployment and It will never have such installation either. So I guess I am safe with that regard. The new issue which I get now is the lotus notes session timing out after some time and this restricts lotus notes from recycling objects. For this I re instantiate session and Database object after every 1000 records. That should probably do the trick. If it doesn't, then you might get a new question really soon :) – TusharPanda Mar 04 '14 at 13:24