<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    Re: MDB - Obejctmessage exception
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="http://community.jboss.org/people/tweetysat">tweety sat</a> in <i>JBoss Messaging</i> - <a href="http://community.jboss.org/message/585527#585527">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>Hello Michael.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Perhaps I do not explain very well my problem or perhaps I do not understand your solution but ... it's not wroking.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Now I got :</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>For the producer : the main class in the default package and the Student class in a 'objects' package.&#160; It sends an object message to a topic.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>For the consumer (mdb) : the mdb is in a 'jms' package and the Student class in a 'myobjects' package.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Giving me</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive_text_macro jive_macro_quote"><p>14:18:29,335 ERROR [STDERR] java.lang.RuntimeException: objects.Student</p><p>14:18:29,351 ERROR [STDERR]&#160;&#160;&#160;&#160; at java.net.URLClassLoader$1.run(URLClassLoader.java:202)</p><p>14:18:29,351 ERROR [STDERR]&#160;&#160;&#160;&#160; at java.security.AccessController.doPrivileged(Native Method)</p><p>14:18:29,351 ERROR [STDERR]&#160;&#160;&#160;&#160; at java.net.URLClassLoader.findClass(URLClassLoader.java:190)</p><p>14:18:29,351 ERROR [STDERR]&#160;&#160;&#160;&#160; at java.lang.ClassLoader.loadClass(ClassLoader.java:307)</p><p>14:18:29,351 ERROR [STDERR]&#160;&#160;&#160;&#160; at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)</p><p>14:18:29,351 ERROR [STDERR]&#160;&#160;&#160;&#160; at java.lang.ClassLoader.loadClass(ClassLoader.java:248)</p><p>....</p></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>And I don't understand why 'objects.Student' and not only 'Student'</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>So ... the only way to make the bean working is renaming the 'myobjects' package to 'objects'.&#160; The Student class MUST be in the same package.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I don't know if your solution is supposed to solve the problem but I don't understand why</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><blockquote class="jive-quote"><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; logger.info(Thread.currentThread().getContextClassLoader());</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; logger.info(this.getClass().getClassLoader());</p></blockquote><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>is giving</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive_text_macro jive_macro_quote"><p>14:18:29,335 INFO&#160; [ConsumerBean] BaseClassLoader@eeeb48{vfszip:/D:/java/jboss-5.0.1.GA/server/jms/deploy/ejb1.jar/}</p><p>14:18:29,335 INFO&#160; [ConsumerBean] BaseClassLoader@eeeb48{vfszip:/D:/java/jboss-5.0.1.GA/server/jms/deploy/ejb1.jar/}</p></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>so that the "<code class="jive-code jive-java"><span style="color: darkgreen;">temporarily change TCCL</span></code>" have not effect.</p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/585527#585527">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss Messaging at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2042">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>