4 Replies Latest reply on Feb 8, 2003 4:13 AM by k_bijoy

    Communication Exception

    k_bijoy

      Hi all,
      I am doing development on a W2K machine and have developed an ejb and it is working fine in the local machine. Now I have deployed the ejb in JBOSS server which is running in a Redhad machine. In the redhad machine I am able to access the ejb. When I try to access it from some other machine I get the following exception.


      J:\jboss-3.0.3_tomcat-4.1.12\JBOSS Sample\bean1\classes>java FirstClient
      Exception in thread "main" javax.naming.CommunicationException. Root exception
      is java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested exce
      ption is:
      java.net.ConnectException: Connection refused: connect
      at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:567)
      at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185
      )
      at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
      at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:101)
      at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:456)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:440)
      at javax.naming.InitialContext.lookup(InitialContext.java:347)
      at FirstClient.main(FirstClient.java:11)
      Caused by: java.net.ConnectException: Connection refused: connect
      at java.net.PlainSocketImpl.socketConnect(Native Method)
      at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:295)
      at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:161)
      at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:148)
      at java.net.Socket.connect(Socket.java:425)
      at java.net.Socket.connect(Socket.java:375)
      at java.net.Socket.(Socket.java:290)
      at java.net.Socket.(Socket.java:118)
      at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirect
      SocketFactory.java:22)
      at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMaster
      SocketFactory.java:122)
      at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:562)
      ... 8 more

      I have set the jndi.properties file to point to the Redhad machine.

      Please help me.

      Thanks in advance

      Bijoy Sivan K