4 Replies Latest reply on Aug 29, 2002 10:01 AM by Mauricio De Diana

    UnmarshallException while lookup

    Ahmed bin Lahmar Newbie


      while i am trying to make a lookup, i am getting the following exception:

      javax.naming.CommunicationException. Root exception is java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
      java.lang.ClassNotFoundException: org.jnp.interfaces.MarshalledValuePair (no security manager: RMI class loader disabled)
      at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:169)
      at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:365)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:349)
      at javax.naming.InitialContext.lookup(InitialContext.java:347)

      i am working with jboss3, oracle9.
      the code, where this exception is thrown is:

      slhome = (ISectionListEntityHome)context.lookup("beans/SectionListJNDI");

      i dont know what to do now.
      i think, that i have tried out anything.
      maybe u have an idea, what to do.

      thanks in advance and have a nice and successfull day,


        • 1. Re: UnmarshallException while lookup
          Robert Caranica Newbie

          As the error is about a ClassNotFound, I assume that you do not have in the classpath the jar that contains the org.jnp.interfaces.MarshalledValuePair class. And also you don't have a security manager, that's why loading this class via RMI from the server is not permitted. Verify the classpath again.


          • 2. Re: UnmarshallException while lookup
            Ahmed bin Lahmar Newbie


            how do i have to check the classpath?
            if there is no such file, where do i get it from?

            thanks in advance,


            • 3. Re: UnmarshallException while lookup
              Robert Caranica Newbie

              I suppose you're trying to make the lookup from a client application. In this case, verify the classpath of the JVM (Java Virtual Machine) that the client application is running in, so that it contains the "jnp-client.jar" file (that contains the class that is not found) from the %JBOSS_DIST%\client directory (in a Windows style env and directory syntax). In fact you will probably need other jars from that directory too, so to keep it safe, put all jars from that directory in the classpath.

              Or, as I said, use a security manager and specify a policy file with all permissions granted, and the class will be (down)loaded via RMI from the server, without it having to be present on the client side. But this is a small hack just to test you app quickly. If you need a reliable solution, use the first one!


              • 4. Re: UnmarshallException while lookup
                Mauricio De Diana Newbie

                I think it´s important to note that this class is present in JBoss 3.0 but not in JBoss 2.4 (inside "jnp-client.jar"). So, if the code was first used with an old version of JBoss, it´s necessary to update the jar.