[jboss-user] [JBoss Messaging] - Re: MDB - Obejctmessage exception

tweety sat do-not-reply at jboss.com
Fri Feb 4 08:38:13 EST 2011


tweety sat [http://community.jboss.org/people/tweetysat] created the discussion

"Re: MDB - Obejctmessage exception"

To view the discussion, visit: http://community.jboss.org/message/585527#585527

--------------------------------------------------------------
Hello Michael.

Perhaps I do not explain very well my problem or perhaps I do not understand your solution but ... it's not wroking.

Now I got :

For the producer : the main class in the default package and the Student class in a 'objects' package.  It sends an object message to a topic.

For the consumer (mdb) : the mdb is in a 'jms' package and the Student class in a 'myobjects' package.

Giving me

14:18:29,335 ERROR [STDERR] java.lang.RuntimeException: objects.Student
14:18:29,351 ERROR [STDERR]     at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
14:18:29,351 ERROR [STDERR]     at java.security.AccessController.doPrivileged(Native Method)
14:18:29,351 ERROR [STDERR]     at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
14:18:29,351 ERROR [STDERR]     at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
14:18:29,351 ERROR [STDERR]     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
14:18:29,351 ERROR [STDERR]     at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
....

And I don't understand why 'objects.Student' and not only 'Student'


So ... the only way to make the bean working is renaming the 'myobjects' package to 'objects'.  The Student class MUST be in the same package.

I don't know if your solution is supposed to solve the problem but I don't understand why



>             logger.info(Thread.currentThread().getContextClassLoader());
>             logger.info(this.getClass().getClassLoader());


is giving


14:18:29,335 INFO  [ConsumerBean] BaseClassLoader at eeeb48{vfszip:/D:/java/jboss-5.0.1.GA/server/jms/deploy/ejb1.jar/}
14:18:29,335 INFO  [ConsumerBean] BaseClassLoader at eeeb48{vfszip:/D:/java/jboss-5.0.1.GA/server/jms/deploy/ejb1.jar/}


so that the "temporarily change TCCL" have not effect.
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/585527#585527]

Start a new discussion in JBoss Messaging at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2042]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110204/4739173f/attachment.html 


More information about the jboss-user mailing list