The reason for this exception is because log4j transforms the message object into String before serialization, i.e. transmission on the wire. This precautionary step avoids the serialization of potentially very large message objects. Moreover, the advantage of serializing message objects remains unclear. Can you please explain why you want to serialize the LogBean object and the advantages that would bring?
At 17:28 23.07.2002 +0200, [EMAIL PROTECTED] wrote: >Hi, > >I have a problem regarding JMSAppender > >I have a client program issuing a > > > log.debug(logBean) > >where logBean is a instance of my own class LogBean (it's Serializable). >I'm using a MDB to receive this log message. > >I'm able to get the LoggingEvent in the MDB, by > > LoggingEvent event = (LoggingEvent)omessage.getObject(); > >but I can't get my instance of type LogBean by > > LogBean bean = (LogBean)event.getMessage(). > >I get a ClassCastException, and I can se that it states, that it's a >String object and not a LogBean object. > >I can se in JMSAppender in the append() method, that the object send is in >fact a LogBean instance, but as mentioned when received in MDB, it states >it's a String. > >Why is that ? > >br > Torben Bruun -- Ceki For complete log4j documentation, please see http://qos.ch/log4jBook.html -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>