1 Reply Latest reply on Mar 20, 2003 7:24 AM by Adrian Brock

    No such object or connect refused

    peixubin peixubin Newbie

      deploy junitejb into jboss3.0.6.

      EJBTestRunnerTest.java:
      ...
      {
      InitialContext jndiContext = new InitialContext();
      Object ref = jndiContext.lookup("ejb/EJBTestRunner");
      EJBTestRunnerHome runnerHome = (EJBTestRunnerHome)PortableRemoteObject.narrow (ref, EJBTestRunnerHome.class);
      EJBTestRunner runner = runnerHome.create();
      }
      ...
      when I connect to window2000 on redhat linux7.x or 8.0 ,
      The test is success;


      when I connect redhat linux on window2000,
      The test throws Exception:
      [junit] javax.naming.CommunicationException. Root exception is java.rmi.Con
      nectException: Connection refused to host: 127.0.0.1; nested exception is:
      [junit] java.net.ConnectException: Connection refused: connect
      [junit] java.net.ConnectException: Connection refused: connect
      [junit] at java.net.PlainSocketImpl.socketConnect(Native Method)
      [junit] at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:355)
      [junit] at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.jav
      a:142)
      [junit] at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:129)
      [junit] at java.net.Socket.(Socket.java:273)
      [junit] at java.net.Socket.(Socket.java:100)
      [junit] at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(R
      MIDirectSocketFactory.java:25)
      [junit] at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(R
      MIMasterSocketFactory.java:120)
      [junit] at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:
      499)
      [junit] at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.
      java:190)
      [junit] at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.jav
      a:174)
      [junit] at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:83)
      [junit] at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
      [junit] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:48
      4)
      [junit] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:46
      3)
      [junit] at javax.naming.InitialContext.lookup(InitialContext.java:350)
      [junit] at org.jboss.docs.cmp2.crimeportal.EJBTestRunnerTest.testGetEJBT
      estRunner(EJBTestRunnerTest.java:36).


      when I connect to other redhat linux on a redhat linux,
      th test throws Exception:
      [junit] 1) testGetEJBTestRunner(org.jboss.docs.cmp2.crimeportal.EJBTestRunne
      rTest)
      [junit] javax.naming.CommunicationException. Root exception is java.rmi.NoS
      uchObjectException: no such object in table
      [junit] at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServe
      r(StreamRemoteCall.java:245)
      [junit] at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCa
      ll.java:220)
      [junit] at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122)
      [junit] at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
      [junit] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:48
      4)
      [junit] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:46
      3)
      [junit] at javax.naming.InitialContext.lookup(InitialContext.java:350)
      [junit] at org.jboss.docs.cmp2.crimeportal.EJBTestRunnerTest.testGetEJBT
      estRunner(EJBTestRunnerTest.java:36).


      why?