me0wster / javamelody

Automatically exported from code.google.com/p/javamelody
0 stars 0 forks source link

Problems with MemoryInformations in WebSphere #268

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Install java-melody to your application deployed on websphere (see for exact 
version we used below)
2. Access monitoring page

What is the expected output? What do you see instead?
Expected:
Memory information to be available

Instead:
Following stacktrace:
java.lang.IllegalArgumentException: used argument cannot be less than 0
        at java.lang.management.MemoryUsage.<init>(MemoryUsage.java:95) ~[na:na]
        at com.ibm.lang.management.MemoryMXBeanImpl.getNonHeapMemoryUsageImpl(Native Method) ~[na:na]
        at com.ibm.lang.management.MemoryMXBeanImpl.getNonHeapMemoryUsage(MemoryMXBeanImpl.java:143) ~[na:na]
 at net.bull.javamelody.MemoryInformations.<init>(MemoryInformations.java:55) ~[framework-javamelody-lib-1.4.0-SNAPSHOT.jar:1.39.0]
        at net.bull.javamelody.JavaInformations.<init>(JavaInformations.java:140) ~[javamelody-core-1.39.0.jar:1.39.0]
        at net.bull.javamelody.Collector.collectLocalContextWithoutErrors(Collector.java:262) ~[javamelody-core-1.39.0.jar:1.39.0]
...

What version of the product are you using? On what application server, JDK,
operating system?
-javamelody 1.39.0
-application server: 
IBM Websphere 
Integrated Solutions Console, 7.0.0.19
Build Number: cf191132.09
Build Date: 8/13/11

Please provide any additional information below.

-Commenting this line in MemoryInformations solves the problem:
//usedNonHeapMemory = 
ManagementFactory.getMemoryMXBean().getNonHeapMemoryUsage().getUsed();
        usedNonHeapMemory=-1;

Original issue reported on code.google.com by f...@fire-it.be on 4 Dec 2012 at 2:18

GoogleCodeExporter commented 9 years ago
As said there [1] without javamelody in use, this is a bug in the IBM JVM in 
WebSphere 7 in "rare circumstances".
If this issue blocks you, I suggest to contact IBM support or to upgrade 
WebSphere.

It is not planned to work around this IBM bug in javamelody.

Original comment by evernat@free.fr on 12 Dec 2012 at 5:50

GoogleCodeExporter commented 9 years ago
[1] https://jira.atlassian.com/browse/JRA-19389

Original comment by evernat@free.fr on 12 Dec 2012 at 5:50