Class not found exception for LoggingEventVO

I have an application client set up to send a logging message over a bus using a logback JMSQueueAppender. Logback version is 0.9.24 and slf4j version is 1.6.1. This is running on a Websphere 7.0 server in Rational Application Developer 7.5. I've tested the bus and queue with a simple text message using the RAD Universal Test Client and that works fine, so at least the foundation is solid. When I log a message to the message queue, I wind up with the following stack trace under a wide variety of attempts: [8/11/10 14:44:16:223 EDT] 0000002b SystemOut O Exception CWSIA0122E: An exception occurred deserializing a message, exception: java.lang.ClassNotFoundException: ch.qos.logback.classic.spi.LoggingEventVO. [8/11/10 14:44:16:223 EDT] 0000002b SystemErr R javax.jms.MessageFormatException: CWSIA0122E: An exception occurred deserializing a message, exception: java.lang.ClassNotFoundException: ch.qos.logback.classic.spi.LoggingEventVO. [8/11/10 14:44:16:223 EDT] 0000002b SystemErr R at com.ibm.ws.sib.api.jms.impl.JmsObjectMessageImpl.getObject( JmsObjectMessageImpl.java:277) [8/11/10 14:44:16:223 EDT] 0000002b SystemErr R at com.csg.logger.mdb.NYCMLoggerMDB.handleMessage(NYCMLoggerMDB.java:45) [8/11/10 14:44:16:223 EDT] 0000002b SystemErr R at com.csg.logger.mdb.NYCMLoggerMDB.onMessage(NYCMLoggerMDB.java:36) [8/11/10 14:44:16:223 EDT] 0000002b SystemErr R at com.ibm.ejs.container.MessageEndpointHandler.invokeMdbMethod( MessageEndpointHandler.java:1092) [8/11/10 14:44:16:223 EDT] 0000002b SystemErr R at com.ibm.ejs.container.MessageEndpointHandler.invoke( MessageEndpointHandler.java:777) [8/11/10 14:44:16:223 EDT] 0000002b SystemErr R at $Proxy42.onMessage(Unknown Source) [8/11/10 14:44:16:223 EDT] 0000002b SystemErr R at com.ibm.ws.sib.api.jmsra.impl.JmsJcaEndpointInvokerImpl.invokeEndpoint( JmsJcaEndpointInvokerImpl.java:233) [8/11/10 14:44:16:223 EDT] 0000002b SystemErr R at com.ibm.ws.sib.ra.inbound.impl.SibRaDispatcher.dispatch( SibRaDispatcher.java:900) [8/11/10 14:44:16:223 EDT] 0000002b SystemErr R at com.ibm.ws.sib.ra.inbound.impl.SibRaSingleProcessListener$SibRaWork.run( SibRaSingleProcessListener.java:550) [8/11/10 14:44:16:223 EDT] 0000002b SystemErr R at com.ibm.ejs.j2c.work.WorkProxy.run(WorkProxy.java:399) [8/11/10 14:44:16:223 EDT] 0000002b SystemErr R at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1550) [8/11/10 14:44:16:223 EDT] 0000002b SystemErr R Caused by: java.lang.ClassNotFoundException: ch.qos.logback.classic.spi.LoggingEventVO [8/11/10 14:44:16:223 EDT] 0000002b SystemErr R at java.lang.Class.forNameImpl(Native Method) [8/11/10 14:44:16:223 EDT] 0000002b SystemErr R at java.lang.Class.forName(Class.java:136) [8/11/10 14:44:16:223 EDT] 0000002b SystemErr R at com.ibm.ws.util.WsObjectInputStream.loadClass(WsObjectInputStream.java:227 ) [8/11/10 14:44:16:223 EDT] 0000002b SystemErr R at com.ibm.ws.util.WsObjectInputStream.access$000(WsObjectInputStream.java:53 ) [8/11/10 14:44:16:223 EDT] 0000002b SystemErr R at com.ibm.ws.util.WsObjectInputStream$2.run(WsObjectInputStream.java:191) [8/11/10 14:44:16:223 EDT] 0000002b SystemErr R at com.ibm.ws.security.util.AccessController.doPrivileged( AccessController.java:118) [8/11/10 14:44:16:223 EDT] 0000002b SystemErr R at com.ibm.ws.util.WsObjectInputStream.resolveClass( WsObjectInputStream.java:164) [8/11/10 14:44:16:223 EDT] 0000002b SystemErr R at com.ibm.ws.util.WsObjectInputStream.resolveClass( WsObjectInputStream.java:156) [8/11/10 14:44:16:223 EDT] 0000002b SystemErr R at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1591) [8/11/10 14:44:16:223 EDT] 0000002b SystemErr R at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1512) [8/11/10 14:44:16:223 EDT] 0000002b SystemErr R at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1748) [8/11/10 14:44:16:223 EDT] 0000002b SystemErr R at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1345) [8/11/10 14:44:16:223 EDT] 0000002b SystemErr R at java.io.ObjectInputStream.readObject(ObjectInputStream.java:364) [8/11/10 14:44:16:239 EDT] 0000002b SystemErr R at com.ibm.ws.sib.api.jms.impl.JmsObjectMessageImpl.getObjectInternal( JmsObjectMessageImpl.java:345) [8/11/10 14:44:16:239 EDT] 0000002b SystemErr R at com.ibm.ws.sib.api.jms.impl.JmsObjectMessageImpl.getObject( JmsObjectMessageImpl.java:271) [8/11/10 14:44:16:239 EDT] 0000002b SystemErr R ... 10 more This always happens when trying to get the message object out of the message in the onMessage code in my message driven bean. For example, the stack dump was generated at the event = . . . line in the code below: if (msg instanceof ObjectMessage){ ObjectMessage objectMesssage = (ObjectMessage) msg; System.out.println("Got ObjectMessage"); event = (ILoggingEvent) objectMesssage.getObject(); } I have the logback classic jar on my classpath successfully because I use a number of other classes from it in my code. If anyone can help with this, I would appreciate it. I can provide additional information as needed. Thanks, Merritt Derr ***CONFIDENTIALITY NOTICE*** This email and any attachments to it are confidential and intended solely for the individual or entity to whom it is addressed. Any unauthorized review, use, disclosure or distribution is prohibited. If you have received this email in error, please contact the sender by reply email and destroy all copies of the original message.

Jim: This was so long ago I'd forgotten about it. I was having this problem in the EJB that was receiving the logged message from the SIB. The final code that handled the message wound up being the following: private void handleMessage(Message msg) { try { TextMessage text = (TextMessage) msg; System.out.println("ServiceUtilityMDB: Input Message = " + text.getText()); System.out.println("End of handling message, no real work done"); } catch (ClassCastException ce) { ILoggingEvent logEvent; try { // Since an exception was thrown trying to treat the arriving // message as text, now try to treat it as an object message. ObjectMessage objMsg = (ObjectMessage) msg; // Grab the LogBack logging event... logEvent = (ILoggingEvent) objMsg.getObject(); // Create a new logger using the logging event name CSGStandardLogger logLocal = new CSGStandardLogger(logEvent .getLoggerName()); // Use the logger callAppenders method to complete the logging tasks logLocal.getLogger().callAppenders(logEvent); } catch (NoClassDefFoundError ncd) { ncd.printStackTrace(); } catch (MessageFormatException mfe) { System.out .println("Message format exception occurred handling message."); mfe.printStackTrace(); } catch (ClassCastException cce) { System.out .println("object msg is not a JmsObjectMessageImpl instance"); } catch (Exception e) { System.out .println("An exception occurred while retrieving the log event message from the queue."); e.printStackTrace(); } } catch (Exception e) { System.out.println("Exception " + e.getMessage()); e.printStackTrace(); } This code is called from the onMessage event in the EJB. The CSGStandardLogger is a Logback logger wrapped by us for specific purposes, but has no magic in it as far as the problem is concerned. Current version of Logback being used is 0.9.28. SLF4J is still at 1.6.1. I've lost the details of all the steps I took, but this code is the result of many searches, iterations of code etc. It works correctly in my environment. Merritt From: Jim <james.rogers@tdameritrade.com> To: logback-user@qos.ch Date: 01/11/2012 02:20 PM Subject: Re: [logback-user] Class not found exception for LoggingEventVO Sent by: logback-user-bounces@qos.ch <MDerr@...> writes:
I have an application client set up to send a logging message over a bus using a logback JMSQueueAppender. Logback version is 0.9.24 and slf4j version is 1.6.1.
I am getting the same error. Did you resolve this issue, and if so how? Thanks, Jim _______________________________________________ Logback-user mailing list Logback-user@qos.ch http://mailman.qos.ch/mailman/listinfo/logback-user Join us on Facebook at www.facebook.com/NYCMInsurance. ***CONFIDENTIALITY NOTICE*** This email and any attachments to it are confidential and intended solely for the individual or entity to whom it is addressed. Any unauthorized review, use, disclosure or distribution is prohibited. If you have received this email in error, please contact the sender by reply email and destroy all copies of the original message.
participants (3)
-
Jim
-
MDerr@nycm.com
-
Merritt H Derr