DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26433>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26433

JMX problem org.apache.log4j.Level not serializable

           Summary: JMX problem org.apache.log4j.Level not serializable
           Product: Log4j
           Version: 1.2
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Other
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


There is a JMX problem in LOG4J 1.2.8, the class org.apache.log4j.Level is not 
serializable. In a simple JMX request 
I got an unserializable exception. Here is a code snippet of an example code.


Content of getContent method:

    import weblogic.management.RemoteMBeanServer;

    import javax.management.Attribute;
    import javax.management.MBeanAttributeInfo;
    import javax.management.MBeanInfo;
    import javax.management.ObjectName;
   
    [...]

    private MBeanAttributeInfo attrInfo = null;
    private RemoteMBeanServer homeServer = null;
     
     [...]

        try {
            value = homeServer.getAttribute(new ObjectName(domain + ":" +
                        mbeanName), attrInfo.getName());
        } catch (Exception e) {
            e.printStackTrace();
        }
        
where homeServer is a reference to a RemoteMBeanServer instance by Weblogic, 
domain is "log4j", mbeanName is 
"appender=MUSYK1" (defined in log4j.properties file) and attrInfo.getName() 
is "encoding".


weblogic.rmi.extensions.RemoteRuntimeException: Unexpected Exception - with 
nested exception:
[java.rmi.MarshalException: error marshalling return; nested exception is: 
        java.io.NotSerializableException: org.apache.log4j.Level]
        at 
weblogic.management.internal.RemoteMBeanServerImpl_812_WLStub.getAttribute
(Unknown Source)
        at tui.musyk.weblogic.jmx.gui.model.MBeanAttributeProxy.getContent
(MBeanAttributeProxy.java:61)
[...]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to