I have used log4j to send LoggingEvent object through JMS to Weblogic 5.10, 6.0, and 6.1, but have never seen a problem such as this.
Not quite sure what you mean by "assigning the categoryName ... during deserialization". What are the steps you are performing when this occurs? ----- Original Message ----- From: "Marvin Chase" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, June 10, 2002 12:17 PM Subject: LoggingEvent ClassCastException > Guys, > > I'm experiencing a strange class cast exception when deserializing a > LoggingEvent. This exception does not occur consistently. I have > implemented a custom JMSAppender which sends log messages (LoggingEvent > classes) > via JMS. Many times the app will operate without exception, but sometimes > exceptions will > occur in the same code that previously ran perfectly. The stack trace is > below. > > This ClassCastException is occurring while assigning the categoryName (a > String) > during deserialization. Note that my server in Weblogic 5.1. Has anyone > seen this error before? > > Thanks.. > > java.lang.ClassCastException: Assigning instance of class java.lang.String > to field org.apache.log4j.spi.LoggingEvent#categoryName > at > java.io.ObjectInputStream.inputClassFields(ObjectInputStream.java:2271) > at > java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:519) > at > org.apache.log4j.spi.LoggingEvent.readObject(LoggingEvent.java:322) > at java.lang.reflect.Method.invoke(Native Method) > at > java.io.ObjectInputStream.invokeObjectReader(ObjectInputStream.java:2214) > at > java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1411) > at java.io.ObjectInputStream.readObject(ObjectInputStream.java:386) > at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236) > at > weblogic.jms.common.ObjectMessageImpl.getObject(ObjectMessageImpl.java:76) > at > com.my.platform.servers.log.JMSSink.onMessage(JMSSink.java:90) > at > weblogic.jms.client.JMSMessageConsumer.readQueue(JMSMessageConsumer.java:358 > ) > at weblogic.jms.common.MessageQueue.execute(MessageQueue.java:761) > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:129) > > > *************************************************************** > Confidentiality note: This e-mail contains information from the > GFI Group Inc. and/or its affiliates, including GFInet inc., > that is confidential and/or legally privileged. This > information is intended only for the use of the individual or > entity named on this e-mail. This e-mail and its content may > not be reproduced or retransmitted without the express written > permission of The GFI Group. > *************************************************************** > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>