<!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="https://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;">
invoke frequency and classloader
</h3>
<span style="margin-bottom: 10px;">
created by <a href="https://community.jboss.org/people/liobod">lio bod</a> in <i>JBoss Remoting</i> - <a href="https://community.jboss.org/message/775985#775985">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p style="background-color: #eef4f9; font-size: 12px; color: #555555; font-family: 'Lucida Sans', 'Lucida Sans Unicode', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif;">Hello world,</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="background-color: #eef4f9; font-size: 12px; color: #555555; font-family: 'Lucida Sans', 'Lucida Sans Unicode', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif;">I noticed a strange behaviour and i want to knwow if this has already been pointed or fixed.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="background-color: #eef4f9; font-size: 12px; color: #555555; font-family: 'Lucida Sans', 'Lucida Sans Unicode', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif;">My client is invoking my remoting server by sending inside an InvocationRequest a parameter that is a complex object.</p><p style="background-color: #eef4f9; font-size: 12px; color: #555555; font-family: 'Lucida Sans', 'Lucida Sans Unicode', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif;">In fact this object is complex only because it aggragates/composes other object.</p><p style="background-color: #eef4f9; font-size: 12px; color: #555555; font-family: 'Lucida Sans', 'Lucida Sans Unicode', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif;">On server side, the "invoke" method of my ServerInvocationHandler, shall receive this parameter, cast it in its native (or parent) class and then shall execute it.</p><p style="background-color: #eef4f9; font-size: 12px; color: #555555; font-family: 'Lucida Sans', 'Lucida Sans Unicode', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif;">(my complex object is not only made to structure passive data, but mainly to be ran).</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="background-color: #eef4f9; font-size: 12px; color: #555555; font-family: 'Lucida Sans', 'Lucida Sans Unicode', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif;">Most of the the time it works well.</p><p style="background-color: #eef4f9; font-size: 12px; color: #555555; font-family: 'Lucida Sans', 'Lucida Sans Unicode', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif;">But, sometimes, for some mysterious reasons, it fails an i got the following message :</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p> java.lang.IllegalStateException: BaseClassLoader@38bce164{vfszip:[MYJBOOS_DIR]/deploy/[MY_APP.jar/} classLoader is</p><p>    not connected to a domain (probably undeployed?) for class sun.reflect.ConstructorAccessorImpl</p><p>  at org.jboss.classloader.spi.base.BaseClassLoader.loadClassFromDomain(BaseClassLoader.java:793)</p><p>          at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:441)</p><p>          at java.lang.ClassLoader.loadClass(ClassLoader.java:248)</p><p>          at sun.misc.Unsafe.defineClass(Native Method)</p><p>          at sun.reflect.ClassDefiner.defineClass(ClassDefiner.java:45)</p><p>          at sun.reflect.MethodAccessorGenerator$1.run(MethodAccessorGenerator.java:381)</p><p>          at java.security.AccessController.doPrivileged(Native Method)</p><p>          at sun.reflect.MethodAccessorGenerator.generate(MethodAccessorGenerator.java:377)</p><p>          at sun.reflect.MethodAccessorGenerator.generateConstructor(MethodAccessorGenerator.java:76)</p><p>          at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:30)</p><p>          at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)</p><p>          at java.lang.reflect.Constructor.newInstance(Constructor.java:513)</p><p>          at org.jboss.serial.classmetamodel.ClassMetaData.newInstance(ClassMetaData.java:337)</p><p>          at org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:239)</p><p>          at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:412)</p><p>          at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:82)</p><p>          at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectInput.readObject(DataContainer.java:643)</p><p>          at org.jboss.serial.persister.ArrayPersister.readObjectArray(ArrayPersister.java:196)</p><p>          at org.jboss.serial.persister.ArrayPersister.readData(ArrayPersister.java:172)</p><p>          at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:412)</p><p>          at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:82)</p><p>          at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectInput.readObject(DataContainer.java:643)</p><p>          at org.jboss.serial.persister.RegularObjectPersister.readSlotWithFields(RegularObjectPersister.java:353)</p><p>          at org.jboss.serial.persister.RegularObjectPersister.defaultRead(RegularObjectPersister.java:273)</p><p>          at org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:241)</p><p>          at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:412)</p><p>          at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:82)</p><p>          at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectInput.readObject(DataContainer.java:643)</p><p>          at org.jboss.serial.persister.RegularObjectPersister.readSlotWithFields(RegularObjectPersister.java:353)</p><p>          at org.jboss.serial.persister.RegularObjectPersister.defaultRead(RegularObjectPersister.java:273)</p><p>          at org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:241)</p><p>          at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:412)</p><p>          at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:82)</p><p>          at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectInput.readObject(DataContainer.java:643)</p><p>          at org.jboss.serial.io.JBossObjectInputStream.readObjectOverride(JBossObjectInputStream.java:163)</p><p>          at java.io.ObjectInputStream.readObject(ObjectInputStream.java:344)</p><p>          at org.jboss.remoting.serialization.impl.jboss.JBossSerializationManager.receiveObject(JBossSerializationManager.java:189)</p><p>          at org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.read(SerializableUnMarshaller.java:123)</p><p>          at org.jboss.remoting.transport.socket.ServerThread.versionedRead(ServerThread.java:853)</p><p>          at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:707)</p><p>          at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:697)</p><p>          at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:524)</p><p>          at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:232)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="background-color: #eef4f9; font-size: 12px; color: #555555; font-family: 'Lucida Sans', 'Lucida Sans Unicode', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif;">Just like if the class wouldn't be in the jar...</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="background-color: #eef4f9; font-size: 12px; color: #555555; font-family: 'Lucida Sans', 'Lucida Sans Unicode', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif;">May I afford an case?</p><p style="background-color: #eef4f9; font-size: 12px; color: #555555; font-family: 'Lucida Sans', 'Lucida Sans Unicode', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif;">It may happens if my code to be execuded (brought by my complex object and available in MY_APP.jar on server side) is very short (i.e quick) and if the load of this <span style="color: #555555; font-family: 'Lucida Sans', 'Lucida Sans Unicode', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 12px; background-color: #eef4f9;">"invoke"</span> method is important.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="background-color: #eef4f9; font-size: 12px; color: #555555; font-family: 'Lucida Sans', 'Lucida Sans Unicode', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif;">It occures rarely if the complex object executes a long task even if it the <span style="color: #555555; font-family: 'Lucida Sans', 'Lucida Sans Unicode', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 12px; background-color: #eef4f9;">ServerInvocationHandler</span> is invocated many times (lauching the complex object instances treatments in parallel)</p><p style="background-color: #eef4f9; font-size: 12px; color: #555555; font-family: 'Lucida Sans', 'Lucida Sans Unicode', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif;">It is systematic if the parallel treatments are fast, on the Nth invocation.</p><p style="background-color: #eef4f9; font-size: 12px; color: #555555; font-family: 'Lucida Sans', 'Lucida Sans Unicode', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif;"><span style="color: #555555; font-family: 'Lucida Sans', 'Lucida Sans Unicode', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 12px; background-color: #eef4f9;">Like if the class disapeared from the jar...</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="background-color: #eef4f9; font-size: 12px; color: #555555; font-family: 'Lucida Sans', 'Lucida Sans Unicode', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif;">On the beginning, i though it was more a jboss problem that needed a restart.</p><p style="background-color: #eef4f9; font-size: 12px; color: #555555; font-family: 'Lucida Sans', 'Lucida Sans Unicode', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif;">But after few seconds (if the <span style="color: #555555; font-family: 'Lucida Sans', 'Lucida Sans Unicode', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 12px; background-color: #eef4f9;">ServerInvocationHandler</span><span style="color: #555555; font-family: 'Lucida Sans', 'Lucida Sans Unicode', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 12px; background-color: #eef4f9;"> is no more requested - time to get cooler ;-)) it may re-work properly.</span></p><p style="background-color: #eef4f9; font-size: 12px; color: #555555; font-family: 'Lucida Sans', 'Lucida Sans Unicode', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif;">And then it is able to refind the class <span style="color: #555555; font-family: 'Lucida Sans', 'Lucida Sans Unicode', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 12px; background-color: #eef4f9;">in the jar...</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="background-color: #eef4f9; font-size: 12px; color: #555555; font-family: 'Lucida Sans', 'Lucida Sans Unicode', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif;">Humbly, my <span style="color: #555555; font-family: 'Lucida Sans', 'Lucida Sans Unicode', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 12px; background-color: #eef4f9;">hypothesis</span> is it may come from a question of load, of frequency...(size of queue between remoting mecanics and native jboss classcloader?)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="background-color: #eef4f9; font-size: 12px; color: #555555; font-family: 'Lucida Sans', 'Lucida Sans Unicode', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif;">Does anyone faced this before?</p><p style="background-color: #eef4f9; font-size: 12px; color: #555555; font-family: 'Lucida Sans', 'Lucida Sans Unicode', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif;">Will i have a chance to find it out? and to get a workaroud?</p><p style="background-color: #eef4f9; font-size: 12px; color: #555555; font-family: 'Lucida Sans', 'Lucida Sans Unicode', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif;"><br/>For information, i'm still using jboss 5.1.0.GA and i'd like not to upgrade its integrated libs jboss-remoting-2_5_1 and jboss-serialization-1.0.3.GA.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="background-color: #eef4f9; font-size: 12px; color: #555555; font-family: 'Lucida Sans', 'Lucida Sans Unicode', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif;">Any advice/hint is welcome,</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="background-color: #eef4f9; font-size: 12px; color: #555555; font-family: 'Lucida Sans', 'Lucida Sans Unicode', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif;">Thx.</p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="https://community.jboss.org/message/775985#775985">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss Remoting at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2050">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>