7 Replies Latest reply on Jun 5, 2006 9:14 AM by Santiago Urrizola

    RMI Class Loader Error

    Santiago Urrizola Newbie

      Hi to all, im new in this forum. I have a problem since a few days and in cant resolve it. Here is my escenario
      I have an applicaction who expose a service with RMI (Spring). The servive has two methods
      public Propuesta getPropuesta(long id)
      public void savePropuesta(Propuesta);

      When i call the first method of the service (form another virtual machine) things work fine, the method return the object.
      Bu when i call the second on (i send an object as a parametter to the server) i get this exception


      12:24:27 DEBUG rmi.RmiClientInterceptorUtils : Remote service [rmi://localhost:1199/servicio-propuesta] threw exception
      java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
      java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
      java.lang.ClassNotFoundException: No ClassLoaders found for: cl.nectia.penta.polizas.common.modelo.propuesta.Propuesta (no security manager: RMI class loader disabled)

      it simes like the server couldnt load the class Propuesta only when i call a service wih a parametter, but its load fine when the service return that object.
      i try to expose the service with http invokers and i have the sam exception.
      JDK 1.5 and jboss jboss-4.0.3SP1

      Please help me !!!!!!!
      Thanks a lot !!

        • 1. Re: RMI Class Loader Error
          Tom Elrod Master

          Can you create a jira issue for this and provide a test case?

          Thanks.

          -Tom

          • 2. Re: RMI Class Loader Error
            Shyam Sivaraman Newbie

            I had a similar issue where I get a similar kind of UnmarshaException. Im using jdk1.5 and JBoss 3.3.6. I have put in 5 days figuring this out, but still in problem.

            com.nt.transport.vt.errors.VTFatalException: java.rmi.ServerException: RemoteException occurred in server thread; nested exception
             is:
             java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
             java.lang.ClassNotFoundException: com.nt.transport.vt.config.common.RNode (no security manager: RMI class loader disable
            d)
             at com.nt.transport.vt.objectmodel.helpers.COMHelper.sendVTCommand(COMHelper.java:214)
            


            Plese help, if this can be solved any way. I need it desperately.

            Regards,
            Shyam

            • 3. Re: RMI Class Loader Error
              Tom Elrod Master

              Can you create a jira issue for this and provide a test case?

              Thanks.

              -Tom

              • 4. Re: RMI Class Loader Error
                Santiago Urrizola Newbie

                I, i solve the problem !!!!!!

                I had the spring.jar library in the server/XXX/lib of tomcat server,
                move this to the web-inf/lib of the application and works.
                Not a very good solution but works ...

                • 5. Re: RMI Class Loader Error
                  Tom Elrod Master

                  Still don't have enough info to know exactly what the problems is, however I am guessing is due to the web container (Tomcat) and the ejb container (JBoss) using different classloaders. If can /server/default/jbossweb-tomcat55.sar/META-INF/jboss-service.xml 'UseJBossWebLoader' attribute to true, then think the original scenario would work.

                  http://wiki.jboss.org/wiki/Wiki.jsp?page=ClassLoadingConfiguration
                  http://wiki.jboss.org/wiki/Wiki.jsp?page=GetClassNotFoundExceptionOrNoClassDefFoundError

                  • 6. Re: RMI Class Loader Error
                    Sreenivasulu K Newbie

                    Hi

                    i am getting this error in jboss, any one can help me.

                    19:14:10,809 ERROR [LogInterceptor] TransactionRolledbackException in method: public abstract void com.nt.transport.equinox.blsrconfig.common.BLSRConfigPrivateSBMethods.createAstnConfigOnMaster(java.lang.String,java.lang.String,com.nt.transport.equinox.blsrconfig.common.BLSRConfiguration,java.util.HashMap) throws java.rmi.RemoteException,com.nt.transport.equinox.errors.EquinoxFatalException,com.nt.transport.equinox.blsrconfig.common.InvalidArgumentException,com.nt.transport.equinox.blsrconfig.common.BLSRConfigOperationException,com.nt.transport.equinox.blsrconfig.common.MultiNEOperationException, causedBy:
                    com.nt.transport.equinox.errors.EquinoxFatalException: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
                    java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
                    java.lang.ClassNotFoundException: com.nt.transport.equinox.blsrconfig.common.RingNode (no security manager: RMI class loader disabled)

                    Regards,
                    Sreenu

                    • 7. Re: RMI Class Loader Error
                      Santiago Urrizola Newbie

                      Same happend to me, and the problem is i have some libraries (like spring and other jars of my project) in the server/xxx/lib (xxx = default in my case).
                      And for a rason (i dont know why) when one of this libraries try to unmarshal some class of my project, get this error.

                      To solve: i move all this jars to the web-inf/lib directory, and works fine .. not the best soution but works.