IllegalArgumentException thrown from MemoryInformations

70 views
Skip to first unread message

Anthony Richir

unread,
Feb 22, 2012, 1:44:19 AM2/22/12
to javamelody
Hi all,

I started using JavaMelody on my project, a Wicket webapp.
The first tests in local were pretty successful, I'm developping using
Jetty and I had access to the monitoring page of JavaMelody.
So, I packaged my application and deployed it in my local Websphere
(on a Windows machine), again big success, it was working just fine.
I decided to give it a try in our development environment and deployed
the same EAR file I used in my local WAS in the DEV one (on a Linux
machine).
And there I get this nasty exception :

[2/22/12 7:29:10:965 CET] 00000030 webapp E
com.ibm.ws.webcontainer.webapp.WebApp logError SRVE0293E: [Servlet
Error]-[used argument cannot be less than 0]:
java.lang.IllegalArgumentException: used argument cannot be less than
0
at java.lang.management.MemoryUsage.<init>(MemoryUsage.java:
95)
at
com.ibm.lang.management.MemoryMXBeanImpl.getNonHeapMemoryUsageImpl(Native
Method)
at
com.ibm.lang.management.MemoryMXBeanImpl.getNonHeapMemoryUsage(MemoryMXBeanImpl.java:
143)
at
net.bull.javamelody.MemoryInformations.<init>(MemoryInformations.java:
69)
at
net.bull.javamelody.JavaInformations.<init>(JavaInformations.java:137)
at
net.bull.javamelody.MonitoringFilter.doMonitoring(MonitoringFilter.java:
285)
at
net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:
122)
at
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:
188)
at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:
116)
at
com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:
77)
at
com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:
908)
at
com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:
997)
at
com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.invokeFilters(DefaultExtensionProcessor.java:
1062)
at
com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:
982)
at
com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3935)
at
com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:
276)
at
com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:
931)
at
com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:
1583)
at
com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:
186)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:
452)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:
511)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:
305)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:
276)
at
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:
214)
at
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:
113)
at
com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:
165)
at
com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:
217)
at com.ibm.io.async.AsyncChannelFuture
$1.run(AsyncChannelFuture.java:205)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1604)

I'm not quite sure why I get a different behaviour between 2 WAS
installations, maybe because of there is a difference between the two,
one being a developer edition and the other an entreprise one.

Does anyone experience the same sort of issue before ?

Cheers,

Anthony

Vernat Emeric

unread,
Feb 22, 2012, 3:57:43 PM2/22/12
to javam...@googlegroups.com
Hi Anthony,

The code called at this line is just:
ManagementFactory.getMemoryMXBean().getNonHeapMemoryUsage()
This is purely a JVM call which does not depend on javamelody.

And when calling this method, the IBM JVM throws an exception which
tries to explain that the used memory cannot be less than 0.
Indeed, if memory is used it may not be negative.

It is an IBM bug and it has been seen before, but not using javamelody:
https://jira.atlassian.com/browse/JRA-19389
This ticket says that it seems to appear under rare circumstances.
So if you reproduce the issue again, I suggest to call your IBM support.

bye,
Emeric


Le 22/02/2012 07:44, Anthony Richir a �crit :

Reply all
Reply to author
Forward
0 new messages