1 Reply Latest reply on Jul 15, 2002 1:53 PM by marc fleury

    Deploying RMI Service within JBOSS

    Asoka Devadas Newbie

      Hi Everyone,

      We've been running a standalone RMI service for the last several months without problem. I was recently asked to use JBOSS as the container for loading the RMI service. A simplified snippet of the RMI code that I'm trying to run within JBOSS looks like the following:

      ////////////////////////////////////////////////////////////////////////////////
      LocateRegistry.createRegistry(5076);
      Remote1Impl remoteObj = new Remote1Impl();
      Naming.rebind("rmi://localhost:5076/Remote1ImplIF", (Remote)remoteObj);
      ////////////////////////////////////////////////////////////////////////////////

      The call to create the registry(LocateRegistry.createRegistry) is successful. Unfortunately, I get the following exception when trying to bind the object(Naming.rebind) to the registry:

      ////////////////////////////////////////////////////////////////////////////////
      java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
      java.net.MalformedURLException: no protocol: and
      java.net.MalformedURLException: no protocol: and
      at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:245)
      at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:220)
      at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:354)
      at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
      at java.rmi.Naming.rebind(Naming.java:160)
      at rmi.SampleRmiManager.bindObjects(Unknown Source)
      at rmi.SampleRmiManager.run(Unknown Source)
      at java.lang.Thread.run(Thread.java:484)
      ////////////////////////////////////////////////////////////////////////////////

      Is what I'm trying to do possible? If so, what is the best approach? Are there any existing examples? Any advice/hints would be much appreciated.

      Thanks,
      Asoka