me0wster / javamelody

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

JBoss AS 7.1.1Final and JavaMelody #220

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I tried to do what was written in the issue with "JBoss AS 7 and JavaMelody" 
and I didnt suceeded to run modules.xml in the way that was described there.
So I just added "com.sun.management" in the following way:

<?xml version="1.0" encoding="UTF-8"?>

<!--
  ~ JBoss, Home of Professional Open Source.
  ~ Copyright 2010, Red Hat, Inc., and individual contributors
  ~ as indicated by the @author tags. See the copyright.txt file in the
  ~ distribution for a full listing of individual contributors.
  ~
  ~ This is free software; you can redistribute it and/or modify it
  ~ under the terms of the GNU Lesser General Public License as
  ~ published by the Free Software Foundation; either version 2.1 of
  ~ the License, or (at your option) any later version.
  ~
  ~ This software is distributed in the hope that it will be useful,
  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  ~ Lesser General Public License for more details.
  ~
  ~ You should have received a copy of the GNU Lesser General Public
  ~ License along with this software; if not, write to the Free
  ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
  -->
<module xmlns="urn:jboss:module:1.1" name="sun.jdk">
    <resources>
        <!-- currently jboss modules has not way of importing services from
        classes.jar so we duplicate them here -->
        <resource-root path="service-loader-resources"/>
    </resources>
    <dependencies>
        <system export="true">
            <paths>
                <path name="com/sun/script/javascript"/>
                <path name="com/sun/jndi/dns"/>
                <path name="com/sun/jndi/ldap"/>
                <path name="com/sun/jndi/url"/>
                <path name="com/sun/jndi/url/dns"/>
                <path name="com/sun/security/auth"/>
                <path name="com/sun/security/auth/login"/>
                <path name="com/sun/security/auth/module"/>
                <path name="sun/misc"/>
                <path name="sun/io"/>
                <path name="sun/nio"/>
                <path name="sun/nio/ch"/>
                <path name="sun/security"/>
                <path name="sun/security/krb5"/>
                <path name="sun/util"/>
                <path name="sun/util/calendar"/>
                <path name="sun/util/locale"/>
                <path name="sun/security/provider"/>
                <path name="META-INF/services"/>
                <path name="com/sun/management"/>
            </paths>
            <exports>
                <include-set>
                    <path name="META-INF/services"/>
                </include-set>
            </exports>
        </system>
    </dependencies>
</module>

Now I got javax.management.AttributeNotFoundException: No attribute called 
maxThreads like a previous user.
Seems that there is a miscompatibility between JBOSS 7.1.1 final and JavaMelody 
, seems that JavaMelody works with different version of com.sun.management.

Or should I change something in my configuration?

Original issue reported on code.google.com by sapo...@gmail.com on 14 May 2012 at 1:00

GoogleCodeExporter commented 9 years ago
full stack is Caused by: javax.management.AttributeNotFoundException: 
JBAS019903: No attribute called maxThreads
        at org.jboss.as.jsr77.managedobject.BaseHandler.getAttribute(BaseHandler.java:59)
        at org.jboss.as.jsr77.managedobject.J2EEDomainHandler.getAttribute(J2EEDomainHandler.java:64)
        at org.jboss.as.jsr77.managedobject.ManagedObjectHandlerRegistry.getAttribute(ManagedObjectHandlerRegistry.java:91)
        at org.jboss.as.jsr77.subsystem.JSR77ManagementMBeanServer.getAttribute(JSR77ManagementMBeanServer.java:131)
        at org.jboss.as.jmx.PluggableMBeanServerImpl.getAttribute(PluggableMBeanServerImpl.java:154) [jboss-as-jmx-7.1.1.Final.jar:7.1.1.Final]
        at net.bull.javamelody.MBeans.getAttribute(MBeans.java:69)
        at net.bull.javamelody.TomcatInformations.<init>(TomcatInformations.java:68)
        at net.bull.javamelody.TomcatInformations.buildTomcatInformationsList(TomcatInformations.java:111)
        ... 14 more

Original comment by sapo...@gmail.com on 14 May 2012 at 1:01

GoogleCodeExporter commented 9 years ago
I am ok to catch this exception for your quite particular JBoss, and Tomcat 
MBeans will be ignored in this case.

It is trunk (revision 2854) and ready for the next release (1.38).
I have made a new build from the trunk and it is available at:
http://javamelody.googlecode.com/files/javamelody-20120526.jar

Original comment by evernat@free.fr on 25 May 2012 at 11:45