You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by bu...@apache.org on 2004/01/26 12:21:33 UTC

DO NOT REPLY [Bug 26433] New: - JMX problem org.apache.log4j.Level not serializable

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: log4j-dev@jakarta.apache.org
        ReportedBy: lars.wunderlich@tui.de


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: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org