0 Replies Latest reply on Oct 9, 2012 6:44 AM by Louis de Villiers

    RMI Through Spring on AS 7 using snowdrop

    Louis de Villiers Newbie

      Hi

       

      I have a service exposed through RMI, deployed through Spring via the snowdrop deployer. The problem that I am having is that if I have any calls on the RMI service accepting any of my custom types as parameters it fails with the following error.

       

      It seems that this is caused by the modular class loading in AS 7, causing the spring module which handles the incoming RMI request to not have access to any of my deployment classes.

       

      My questions is, is there any way to tell spring to use a different class loader to load these classes or alternatively expose my deployment classes to the spring module?

       

       

      java.lang.ClassNotFoundException: mypackage.myclass from [Module "org.springframework.spring:snowdrop" from local module loader @68f1e723 (roots: C:\jboss-as-7.1.1.Final\modules)]

          at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:394)

          at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:184)

          at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:637)

          at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:264)

          at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:216)

          at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1593)

          at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1514)

          at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1750)

          at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)

          at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1685)

          at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1341)

          at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1964)

          at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1888)

          at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)

          at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)

          at java.io.ObjectInputStream.readObject(ObjectInputStream.java:369)

          at sun.rmi.server.UnicastRef.unmarshalValue(UnicastRef.java:324)

          at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:307)

          at sun.rmi.transport.Transport$1.run(Transport.java:177)

          at sun.rmi.transport.Transport$1.run(Transport.java:174)