Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

weblogic.jms. common.JMSException: Error deserializing object

Priyaa V Kumar
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am trying to put my own Serializable objects into a Topic.

I have a message driven bean listening on this and in the method onMessage, i try to cast the object received to the Serializable object sent.

I get the following error

weblogic.jms.common.JMSException: Error deserializing object
at weblogic.jms.common.ObjectMessageImpl.getObject(ObjectMessageImpl.jav
at DbLoggerBean.doLogging(
at LoggerBean_8hiuxq_EOImpl.doLogging(
at LoggerBean_8hiuxq_EOImpl_CBV.doLogging(Unknown Source)
at MessageListenerBean.onMessage(
at weblogic.ejb20.internal.MDListener.execute(
at weblogic.kernel.ExecuteThread.execute(
Caused by: java.lang.ClassNotFoundException: org.apache.log4j.spi.LoggingEvent
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClass
at java.lang.ClassLoader.loadClass(
at java.lang.ClassLoader.loadClass(
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClass
at java.lang.ClassLoader.loadClassInternal(
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(
at weblogic.jms.common.ObjectMessageImpl$ObjectInputStream2.resolveClass

In my client program that publishes messages to a topic, the code looks like this

Result result = new Result();
........ rslt);

I use the JMSAppender provided by the Log4j.

In my MDB, I write like this...

if (message instanceof ObjectMessage)
ObjectMessage m = (ObjectMessage) message;
Result rslt = (Result) m.getObject();

I get the Error deserializing object error at the line where i try to getObject() abd cast it to Result.

I use WebLogic 8.1.

Any help in this regard is appreciated.
Andrew Turner
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pri Vij,

From the looks of the stack trace your server code cannot find the org.apache.log4j.spi.LoggingEvent class. Do you have this class in the classpath of your server? I have never used the log4j JMSAppender but it looks to me like your server is going to need this class in order to deserialize the object.

Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic