JVM: The Java agent could not be run

We are having serious problems with running a Java Agent.

After running a couple of times (8x) the agent comes up with the error below. And than never runs again properly. The server will not even start any other Java agent. Is looks like there is a memory issue here. Invoking the System.gc() method in the finally part of the agent has no effect.

Looking for similar errors in this forum with no result.

The JAVAMAXHEAPSIZE is set to 64MB

The following error occurs in the Notes Log:

21-05-2008 08:38:08 HTTP JVM: Exception

21-05-2008 08:38:08 HTTP JVM: in thread “Thread-27”

21-05-2008 08:38:08 JVM: The runAgent (Ljava/lang/String;JIZJZI)V() method failed.

21-05-2008 08:38:08 HTTP Web Server: Lotus Notes Exception - JVM: The Java agent could not be run.

It looks like the method was found, but failed to run. The corrective action is to quit the http task and load it again. After a while the same errors occur again.

I am out of posibilities, does anyone have the solution?

Kind regards

Lourens Nieland

Subject: JVM: The Java agent could not be run

Lourens,

It looks like you are using LS2J, the API for enabling LotusScript code to call Java. I ran into this exact same problem, and like you, it always bombed on the 8th attempt or so. I attributed it to being a Notes Java limitation. Notes has its own flavor of Java and its own way of loading classes which is not identical to the Sun JRE.

My solution was to rewrite my code as a standalone Java program running outside of Notes/Domino on my PC’s or the server’s hard drive via a Sun JRE. In my LotusScript agent, I use the ShellID() function to call a batch file that runs my external Java class.

Ken