me0wster / javamelody

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

HtmlController.doHeapHisto unsatisfied link error with multiple webapps #273

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. deploy two webapps (with javamelody.jar in WEB-INF/lib)
2. on each webapp do http://<host>:<port>/<app>/monitoring?part=heaphisto
3. see exception in the log

What is the expected output? What do you see instead?

Should show heap analysis page, instead get blank page and a stack trace:

Jan 2, 2013 11:16:49 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet default threw exception
java.lang.UnsatisfiedLinkError: Native Library 
/usr/lib/jvm/java-6-openjdk-amd64/jre/lib/amd64/libattach.so already loaded in 
another classloader
        at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1715)
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1667)
        at java.lang.Runtime.loadLibrary0(Runtime.java:840)
        at java.lang.System.loadLibrary(System.java:1047)
        at sun.tools.attach.LinuxVirtualMachine.<clinit>(LinuxVirtualMachine.java:342)
        at sun.tools.attach.LinuxAttachProvider.attachVirtualMachine(LinuxAttachProvider.java:63)
        at com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:213)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at net.bull.javamelody.VirtualMachine.invoke(VirtualMachine.java:179)
        at net.bull.javamelody.VirtualMachine.getJvmVirtualMachine(VirtualMachine.java:88)
        at net.bull.javamelody.VirtualMachine.heapHisto(VirtualMachine.java:144)
        at net.bull.javamelody.VirtualMachine.createHeapHistogram(VirtualMachine.java:169)
        at net.bull.javamelody.HtmlController.doHeapHisto(HtmlController.java:206)
        at net.bull.javamelody.HtmlController.doHtmlPartForSystemActions(HtmlController.java:147)
        at net.bull.javamelody.HtmlController.doHtmlPart(HtmlController.java:138)
        at net.bull.javamelody.HtmlController.doHtml(HtmlController.java:101)
        at net.bull.javamelody.MonitoringController.doCompressedHtml(MonitoringController.java:236)
        at net.bull.javamelody.MonitoringController.doReportCore(MonitoringController.java:193)
        at net.bull.javamelody.MonitoringController.doReport(MonitoringController.java:181)
        at net.bull.javamelody.MonitoringController.doActionIfNeededAndReport(MonitoringController.java:139)
        at net.bull.javamelody.MonitoringFilter.doMonitoring(MonitoringFilter.java:340)
        at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:170)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:563)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:679)

What version of the product are you using? On what application server, JDK,
operating system?

javamelody 1.42
Server version: Apache Tomcat/6.0.35
Server built:   Nov 21 2012 04:16:14
Server number:  6.0.35.0
OS Name:        Linux
OS Version:     3.2.0-23-generic
Architecture:   amd64
JVM Version:    1.6.0_24-b24
JVM Vendor:     Sun Microsystems Inc.

Please provide any additional information below.

I guess I really want to put the javamelody jar in the shared directory???

Original issue reported on code.google.com by gvida...@gmail.com on 2 Jan 2013 at 6:16

GoogleCodeExporter commented 9 years ago
This kind of error happens in general with a JRE and not with a JDK.
Can you check if you use a JDK?
Is it the same problem with Sun JDK instead of openjdk?

Original comment by evernat@free.fr on 3 Feb 2013 at 10:11

GoogleCodeExporter commented 9 years ago
Yeah, I'm not sure where we got our java from.  I could try to reproduce it 
with an Oracle/Sun JDK.

[go22670@mtex ~]$ java -version
java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03, mixed mode)
[go22670@mtex ~]$ cat /etc/*-release
Red Hat Enterprise Linux Server release 5.9 (Tikanga)

Original comment by gvida...@gmail.com on 4 Feb 2013 at 6:16

GoogleCodeExporter commented 9 years ago
Do you know if the JDK was used? and if it is reproduced with Oracle JDK 
instead of openjdk?

Note that in the description, you have said JVM "1.6.0_24-b24" (and not 
"1.6.0_22-b04" like in the comment after).

Original comment by evernat@free.fr on 19 Aug 2013 at 10:02

GoogleCodeExporter commented 9 years ago
No response from the reporter, so closing as invalid (incomplete).

Original comment by evernat@free.fr on 5 Sep 2013 at 4:31

GoogleCodeExporter commented 9 years ago
I have seen this UnsatisfiedLinkError Exception with JavaMelody 1.49.0 running 
with Confluence v5.4.2 - and was able to solve it.

All I had to do was clear the plugins cache:

https://confluence.atlassian.com/display/CONFKB/How+to+Clear+Confluence+Plugins+
Cache

After restarting Confluence I am now able to generate Memory Histograms without 
any problem.

Background: I'm using Java JDK 1.7.0_51 for Confluence and for JIRA and never 
had the error from JIRA v6.0.8 (also running JavaMelody 1.49.0).  That's what 
made me think it should not really be a JDK problem and that led me to think 
about the cache...

Original comment by msymo...@gmail.com on 24 Jan 2014 at 8:23