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

which classloader loads JMS subscriber util class in 6?

5 views
Skip to first unread message

minjiang

unread,
Jul 9, 2001, 5:08:57 AM7/9/01
to
Hi:
I jar all my classes in ejb.jar file, which is inside the ear file.
These classes are not in system classpath. But now i got this JMS class
not found exception in my subsciber.
But if i add my ejb.jar file to my system classpath, everything
works fine.
So, seems WLS uses system classloader to load the JMS subscriber
class? while actually my classes are in my ear file, and supposed to be
load by ejbclassloader, subsequently by its child war classloader.

So, does any one know it is a correct behaviour in WLS 6 sp2 on
win2k?
Pls also forward one reply to my email box. Not often come to this
group.

Thanks.

minjiang


-------------------------stack trace

ERROR | | Subscriber | onMessage | weblogic.jms.common.JMSException:
Error d
eserializing object
at
weblogic.jms.common.JMSUtilities.jmsExceptionThrowable(JMSUtilities.j
ava:66)
at
weblogic.jms.common.JMSUtilities.jmsException(JMSUtilities.java:52)
at
weblogic.jms.common.ObjectMessageImpl.getObject(ObjectMessageImpl.jav
a:104)
at
com.fairex.eventchannel.Subscriber.onMessage(Subscriber.java:140)
at
weblogic.jms.client.JMSSession.onMessage(JMSSession.java:1933)
at weblogic.jms.client.JMSSession.execute(JMSSession.java:1892)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)

at weblogic.kernel.Kernel.execute(Kernel.java:250)
at
weblogic.jms.client.JMSSession.pushEnvelope(JMSSession.java:1779)
at
weblogic.jms.client.JMSCallback.pushEnvelope(JMSCallback.java:69)
at weblogic.jms.frontend.FESession.execute(FESession.java:1972)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)

at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
----------- Linked Exception -----------
java.lang.ClassNotFoundException: com.fairex.eventchannel.JMSWrapper
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)

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:216)
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.jav
a:100)
at
com.fairex.eventchannel.Subscriber.onMessage(Subscriber.java:140)
at
weblogic.jms.client.JMSSession.onMessage(JMSSession.java:1933)
at weblogic.jms.client.JMSSession.execute(JMSSession.java:1892)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)

at weblogic.kernel.Kernel.execute(Kernel.java:250)
at
weblogic.jms.client.JMSSession.pushEnvelope(JMSSession.java:1779)
at
weblogic.jms.client.JMSCallback.pushEnvelope(JMSCallback.java:69)
at weblogic.jms.frontend.FESession.execute(FESession.java:1972)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)

at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)


minjiang

unread,
Aug 16, 2001, 6:04:05 AM8/16/01
to
Hi:
Why do i never get this exception for my publisher part?
I guess the publisher and subscriber classes should use the same
classloader. So this should not happen at all.

I got one reply from Zach of BEA saying the subsciber class is loaded by
the same class loader loads listener. Not sure what it means? i guess it
means system loader. It makes sense because this class is not on system
classpath.

So, is it a bug or expected behaviour of 6.1 (same as 6)?

minjiang

minjiang

unread,
Aug 16, 2001, 6:07:35 AM8/16/01
to
For more infor, thisexception is only printed out after server starts for a
while, exactly, after some jms message is published/received.
And, seems it does not affect the receive of the message. So it seems to be a
redundant printing only.

Thanks.

minjiang

Zach

unread,
Aug 16, 2001, 11:05:52 AM8/16/01
to
What version are reporting this problem for? I see 6.1, 6, and 6 sp2. In
6.0 (and its service packs) we do nothing special with the class loader,
you get the system class loader. In 6.1 (and its service packs), we
replace the class loader with the same class loader that was installed in
your thread when you created the listener. This may in fact be the system
class loader and the operation is a no-op, but you could have set a class
loader yourself, and we would use that one in onMessage as well.

_sjz.


"minjiang" <minj...@fairex.com> wrote in message
news:3B7B9A95...@fairex.com...

minjiang

unread,
Aug 20, 2001, 12:33:28 AM8/20/01
to
Both 6 sp2 and 6.1 report this exception.
The difference is that in 6, it reports immediately when my startup servlet,
which starts the publisher and subscriber, starts. And in 6.1, no exception for
startup servlet. Everuthing runs fine, exception sometimes occasionaly it prints
out such excepion.

Seems in 6.1 it does not affect my applicaiton at all. So it is tolerable for
me.

Thanks.

minjiang

Zach

unread,
Aug 22, 2001, 10:05:57 AM8/22/01
to
Could you post the 6.1 exception stack trace? All of the
stack traces to date are some form of 6.0. Thanks.

_sjz.

"minjiang" <minj...@fairex.com> wrote in message

news:3B809318...@fairex.com...


> Both 6 sp2 and 6.1 report this exception.
> The difference is that in 6, it reports immediately when my startup
servlet,
> which starts the publisher and subscriber, starts. And in 6.1, no
exception for
> startup servlet. Everuthing runs fine, exception sometimes occasionaly it
prints
> out such excepion.
>
> Seems in 6.1 it does not affect my applicaiton at all. So it is tolerable
for
> me.

It will effect performance though and cause the onMessage rountine to
prematurely exit.

_sjz.

Zach

unread,
Aug 22, 2001, 10:07:42 AM8/22/01
to
"minjiang" <minj...@fairex.com> wrote in message
news:3B7B9A95...@fairex.com...

minjiang

unread,
Aug 23, 2001, 3:01:15 AM8/23/01
to
Here is the stack trace is 6.1. It appears after quite a long time, randomly.

regards
minjiang

------------------------------

ERROR | | Subscriber | onMessage | weblogic.jms.common.JMSException: Error
d
eserializing object
at

weblogic.jms.common.ObjectMessageImpl.getObject(ObjectMessageImpl.jav
a:112)
at com.fairex.eventchannel.Subscriber.onMessage(Subscriber.java:145)
at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:1798)
at weblogic.jms.client.JMSSession.execute(JMSSession.java:1758)


at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
----------- Linked Exception -----------
java.lang.ClassNotFoundException: com.fairex.eventchannel.JMSWrapper
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
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.jav

a:108)
at com.fairex.eventchannel.Subscriber.onMessage(Subscriber.java:145)
at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:1798)
at weblogic.jms.client.JMSSession.execute(JMSSession.java:1758)


at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)

0 new messages