I integrated JAMon into my application and tested it on my local environment. Everything seems to be working correctly.
I have now moved the updated application code into my production environment and I am having several issues.
1. I can view all pages expect the monmanage.jsp page which returns a 500 error. In my logs I see the following exception:
2. None of my monitors are being displayed on the jamonadmin.sjp page or sql details page. Both worked fine on my local environment.
My production environment consists of 4 servers distributed over two clusters.
I have copied the jamon.jar file into a common directory and added it to each server instance classpath. I also include the jamon.jar in the web-inf/lib folder of my application. I deployed jamon.war to two servers (one on each cluster)
Any insights would be appreciated.
Chris, I'll answer question 2 first. Almost always the problem with jamon is a simple classloader issue. In fact this is really THE ONLY reason I have ever seen for it not working.
The usual scenario plays out like this. A copy of jamon jar is put in the application war or ejb jar. Another copy is put at the server level. The jamon war doesn't contain it's own version of jamon war and so uses the one at the server level (the fact that you aren't getting exceptions in jamonadmin.jsp tells me that you have an accesssible jamon jar probably at the server level). Meanwhile the application usually is writting to the jamon jar file loaded in application scope. The result would be that you are doing your reads from a loaded jamon jar that never has data, and writing to a loaded jamon jar that is never read. This would explain seeing no data.
To answer first question do you directly execute monmanage.jsp? If so you would get that exception. It is properly called by clicking on a monitor from the jamonadmin.jsp screen. Another way you can get the error is to click on a monitor that no longer exists (say you reset your monitors from another screen).
In general make sure you have the same version of the jamon jar file loaded only at the server level and not in multiple locations (i.e. ejb jar, war etc).
I should have read your whole email. I just saw this:
<< I have copied the jamon.jar file into a common directory and added it to each server instance classpath. I also include the jamon.jar in the web-inf/lib folder of my application. I deployed jamon.war to two servers (one on each cluster)>>
Which as I expected you have loaded jamon jar in both application and server scope. jamon war is reading the jamon stats from the server scoped jar and your application is writing to the one in web-inf/lib. In general it is never good to have the same jar in multiple locations in your classpath using different classloaders.
Thanks Steve! I will make this change and see if it solves my issues.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.