Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problem with Message Driven Bean

1 view
Skip to first unread message

Chuck Kiefriter

unread,
Jul 1, 2002, 11:04:20 AM7/1/02
to

I am trying to build a message driven bean that gets an object message with a serialized
object to do its work. The message gets sent OK, but when the MDB tries to deserialize
the object out of the message with the objMsg.getObject() command, I get the following
exception from WebLogic:

*** Message Received
*** Getting Helper Object...

Error occurred while processing a getViewingLineup message:

weblogic.jms.common.JMSException: Error deserializing object
at weblogic.jms.common.ObjectMessageImpl.getObject(ObjectMessageImpl.java:112)
at com.nielsenmedia.local.business.assemblies.ViewingLineup.ejb.GetViewingLineupsEJB.onMessage(GetViewingLineupsEJB.java:68)
at weblogic.ejb20.internal.MDListener.execute(MDListener.java:248)
at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:198)
at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:1806)
at weblogic.jms.client.JMSSession.execute(JMSSession.java:1765)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
----------- Linked Exception -----------
java.lang.ClassNotFoundException: com.nielsenmedia.local.business.assemblies.ViewingLineup.GetViewingLineupsHelper
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:178)
at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:195)
at weblogic.jms.common.ObjectMessageImpl$ObjectInputStream2.resolveClass(ObjectMessageImpl.java:234)
at java.io.ObjectInputStream.inputClassDescriptor(ObjectInputStream.java:918)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:366)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1186)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:386)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
at weblogic.jms.common.ObjectMessageImpl.getObject(ObjectMessageImpl.java:108)
at com.nielsenmedia.local.business.assemblies.ViewingLineup.ejb.GetViewingLineupsEJB.onMessage(GetViewingLineupsEJB.java:68)
at weblogic.ejb20.internal.MDListener.execute(MDListener.java:248)
at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:198)
at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:1806)
at weblogic.jms.client.JMSSession.execute(JMSSession.java:1765)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)

The com.nielsenmedia.local.business.assemblies.ViewingLineup.GetViewingLineupsHelper
object implements Serializable and is compiled and in the WEB-INF/classes diretory
of my application so I'm not sure what's causing the problem. Any help would be greatly
appreciated.

Rob Woollen

unread,
Jul 1, 2002, 3:05:48 PM7/1/02
to
The Web classloader is a child of the EJB classloader. So the EJB won't
be able to see the class and will fail to deserialize it.

The easiest thing to do is to separate these classes out into a separate
jar file and then reference them via the manifest classpath of the EJB
and web-app. For an example, you can download the sample auction app
from learnweblogic.com

-- Rob

0 new messages