Java Agent - Null Pointer Exception

There are a couple of Java Agents running on our server. After a recent implementation, I had to restart the Lotus Domino service. After this, most of the Java agents started failing on the server. The stack trace is pasted below

error message: java.lang.NullPointerException

error message: at JavaAgent.NotesMain(JavaAgent.java:24)

error message: at lotus.domino.AgentBase.runNotes(Unknown Source)

error message: at lotus.domino.NotesThread.run(Unknown Source).

All the agents show error at the same line.

I suspected that it might be due to some change in the classpath or something like that. But two more Java agents in the same server are running fine. Has anybody come across this??

Please Help.

TA

Kris

Subject: Java Agent - Null Pointer Exception

The null pointer exception is being thrown at line 24 of your JavaAgent class. What variables are used on that line? How are they initialized?

Subject: RE: Java Agent - Null Pointer Exception

Hi Rich Thanks for your response. All the Java Agents that are failing, show an error on Line 24. Line 24 is different for all agents. But in most of them, I have an import statement, which imports class files from my jar file. There are no variable initialized before line 24. So, I don’t think that this is an issue.

Thanks

Gopal

Subject: RE: Java Agent - Null Pointer Exception

Is there a JavaAgent class in your jar file?

Subject: RE: Java Agent - Null Pointer Exception

Thanks for your response Rich. I sorted out the issue, but not sure if I found the problem. As a part of the recent implementation, I had deployed a jar file on the server. One of the class names used in this jar already existed as a part of another jar. But strangely, the class files in this jar files had its own unique package name. An I am sure that if the package name is unique, you could still have the same class name in different packages. When I removed the newly deployed jar, everything was working fine.

Subject: RE: Java Agent - Null Pointer Exception

Very interesting info. Thanks for sharing the resolution.