2 Replies Latest reply on May 27, 2010 8:28 PM by Ron Sigal

    Is RMI dynamic class loading broken in JBoss 6?

    v a Newbie

      It works well in JBoss 5.

       

      ejb3-connectors-jboss-beans.xml

      <bean name="org.jboss.ejb3.RemotingConnector"
            class="org.jboss.remoting.transport.Connector">
        <property name="invokerLocator"> 
      
          <value-factory bean="ServiceBindingManager"
            method="getStringBinding">
            <parameter>
              jboss.remoting:type=Connector,name=DefaultEjb3Connector,handler=ejb3
            </parameter>
            <parameter>
              <null />
            </parameter>
            <parameter>socket://${jboss.bind.address}:${port}/?loaderport=4873</parameter>
            <parameter>
              <null />
            </parameter>
            <parameter>3873</parameter>
          </value-factory>
      
        </property>
        <property name="serverConfiguration">
          <inject bean="ServerConfiguration" />
        </property>
      </bean>
      

       

      But when trying to load class on the client I have the following exception:

      org.jboss.remoting.loading.ClassByteClassLoader Error loading remote class.
      java.lang.NullPointerException
          at org.jboss.remoting.loading.ClassByteClassLoader.addClass(ClassByteClassLoader.java:295)
          at org.jboss.remoting.loading.ClassByteClassLoader.loadFromNetwork(ClassByteClassLoader.java:410)
          at org.jboss.remoting.loading.ClassByteClassLoader.findClass(ClassByteClassLoader.java:365)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
          at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
          at java.lang.Class.forName0(Native Method)
          at java.lang.Class.forName(Class.java:247)
          at org.jboss.remoting.loading.RemotingClassLoader.loadClassDelegate(RemotingClassLoader.java:106)
          at org.jboss.remoting.loading.RemotingClassLoader.loadClass(RemotingClassLoader.java:80)
          at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
          at java.lang.Class.forName0(Native Method)
          at java.lang.Class.forName(Class.java:247)
          at org.jboss.remoting.loading.ObjectInputStreamWithClassLoader.resolveClass(ObjectInputStreamWithClassLoader.java:179)
          at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1575)
          at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)
          at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1732)
          at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
          at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1945)
          at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1869)
          at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
          at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
          at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1945)
          at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1869)
          at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
          at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
          at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
          at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObjectVersion2_2(JavaSerializationManager.java:238)
          at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObject(JavaSerializationManager.java:138)
          at org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.read(SerializableUnMarshaller.java:123)
          at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.versionedRead(MicroSocketClientInvoker.java:1299)
          at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:907)
          at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:167)
          at org.jboss.remoting.Client.invoke(Client.java:1927)
          at org.jboss.remoting.Client.invoke(Client.java:770)
          at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:60)
          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
          at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
          at org.jboss.ejb3.security.client.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:65)
          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
          at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:74)
          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
          at org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:62)
          at $Proxy3.invoke(Unknown Source)
          at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:188)
          at $Proxy8.list(Unknown Source)
      ...