3 Replies Latest reply on Sep 6, 2001 11:02 AM by mohamed ashraff

    java.rmi.UnmarshalExcept

    mohamed ashraff Newbie

      server: JBoss-2.4.0_Tomcat-3.2.3

      code segment I am failing on
      -----------------------------

      Properties props = new Properties();

      props.put(Context.INITIAL_CONTEXT_FACTORY,
      "org.jnp.interfaces.NamingContextFactory");
      props.put(Context.PROVIDER_URL, "localhost:1099");
      props.put("java.naming.rmi.security.manager", "yes");
      props.pu(Context.URL_PKG_PREFIXES, "org.jboss.naming");


      // Get the initial context
      Context jndi = new InitialContext(props);

      //Look up a JMS connection factory.
      TopicConnectionFactory conFactory =
      (TopicConnectionFactory)jndi.lookup("TopicConnectionFactory");


      I am getting the following error while trying to lookup a Topic
      ------------------------------------------------------


      javax.naming.CommunicationException. Root exception is java.rmi.UnmarshalExcept
      ion: error unmarshalling return; nested exception is:
      java.lang.ClassNotFoundException: org.jbossmq.referenceable.ObjectRefAdd
      r (no security manager: RMI class loader disabled)
      java.lang.ClassNotFoundException: org.jbossmq.referenceable.ObjectRefAddr (no se
      curity manager: RMI class loader disabled)
      at sun.rmi.server.LoaderHandler.loadClass(Unknown Source)
      at sun.rmi.server.LoaderHandler.loadClass(Unknown Source)
      at sun.rmi.server.MarshalInputStream.resolveClass(Unknown Source)
      at java.io.ObjectInputStream.inputClassDescriptor(Unknown Source)
      at java.io.ObjectInputStream.readObject(Unknown Source)
      at java.io.ObjectInputStream.readObject(Unknown Source)
      at java.io.ObjectInputStream.inputObject(Unknown Source)
      at java.io.ObjectInputStream.readObject(Unknown Source)
      at java.io.ObjectInputStream.inputArray(Unknown Source)
      at java.io.ObjectInputStream.readObject(Unknown Source)
      at java.io.ObjectInputStream.inputClassFields(Unknown Source)
      at java.io.ObjectInputStream.defaultReadObject(Unknown Source)
      at java.io.ObjectInputStream.inputObject(Unknown Source)
      at java.io.ObjectInputStream.readObject(Unknown Source)
      at java.io.ObjectInputStream.inputClassFields(Unknown Source)
      at java.io.ObjectInputStream.defaultReadObject(Unknown Source)
      at java.io.ObjectInputStream.inputObject(Unknown Source)
      at java.io.ObjectInputStream.readObject(Unknown Source)
      at java.io.ObjectInputStream.readObject(Unknown Source)
      at sun.rmi.server.UnicastRef.unmarshalValue(Unknown Source)
      at sun.rmi.server.UnicastRef.invoke(Unknown Source)
      at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:349)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:333)
      at javax.naming.InitialContext.lookup(Unknown Source)
      at chap2.chat.Chat.(Chat.java:75)
      at chap2.chat.Chat.main(Chat.java:166)