Announcement Announcement Module
No announcement yet.
Weblogic 9.2 problem displaying MBean attributes Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Weblogic 9.2 problem displaying MBean attributes

    I am using the Spring MBeanExporter to expose a bean for changing Log4J levels within applications. Everything works fine for non-Weblogic apps, but in 9.2, one particular attribute does not work. I'm hoping someone might have ideas. The problem is when a JMX console is trying to display the attributes for this mbean. There appears to be two attributes exposed: CurrentNgsLoggers (breaks) & RootLoggerNgsLevel (works fine). I assume these attributes are based on the methods of similar name: getCurrentNgsLoggers & getRootLoggerNgsLevel . There are other getters but they don't seem to show up as attributes, only operations. And these also show up in the 'operations', and work successfully.

    I have Weblogic configured to use the JDK JMX Platform MBean Server as its default server.

    Any suggestions are appreciated,

    1. Here is the error:

    Sep 12, 2006 4:46:33 PM RequiredModelMBean getAttributes(String[])
    SEVERE: Failed to get "CurrentNgsLoggers": An e
    xception occured while trying to get an attribute value through a RequiredModelMBean

    I have trace code within the method and I see it run just fine.

    2. Code within the simple Pojo - Log4jManagerMBeanWrapper:

    public List getCurrentNgsLoggers() {
    Logger curLogger = null;
    List loggers = new ArrayList();
    try {
    Enumeration e1 = LogManager.getCurrentLoggers();
    while(e1.hasMoreElements()) {
    curLogger = (Logger)e1.nextElement();
    } catch (Exception e5) {e5.printStackTrace();}
    return loggers;

    Spring config for jmx:

    <bean id="mbeanExporterInitializer" class="com.qwest.ngs.common.jmx.MBeanExporterIniti alizer" init-method="initializeMBeanExporter"/>

    <!-- Beans that are converted to JMX MBeans by Spring -->
    <bean id="log4jManagerBean" class="com.qwest.ngs.common.jmx.log4j.Log4jManager MBeanWrapper"/>

    <bean id="jmxExporter" class="org.springframework.jmx.export.MBeanExporte r"
    <property name="beans">
    <entry key="IHome Logging Levels:Application-Logging-Levels=settings" value-ref="log4jManagerBean"/>

  • #2
    Ok, I'm an idiot. The problem has to do with Serialization. When running locally the method public List getCurrentNgsLoggers() worked fine in all but Weblogic JVMs. But when remote I got the weird error message for all JVMs.

    Changing that method to return a String works. Case closed.