0 Replies Latest reply on Jun 25, 2004 5:13 PM by Joao Daniel

    Acessing EJB remotely

    Joao Daniel Newbie

      Iv' build up an helloword EJB. From a localhost (the same host that Jboss is instelled) it is OK, but when I start the cliente side from another machine I recieve a message "connection refused" as you can see below.
      it´s not netword problem, I've tested using telnet on port 1099 and it replays something.
      Since I am a real begginer, I am stucked. May someone helps me.

      message

      Y:\ejb>java teste.HelloClient

      Antes do lookup (before lookup)

      Exception in thread "main" javax.naming.CommunicationException [Root exception i
      s java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested excep
      tion is:
      java.net.ConnectException: Connection refused: connect]
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:647)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:507)
      at javax.naming.InitialContext.lookup(Unknown Source)
      at teste.HelloClient.main(HelloClient.java:40)
      Caused by: java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nes
      ted exception is:
      java.net.ConnectException: Connection refused: connect
      at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
      at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
      at sun.rmi.transport.tcp.TCPChannel.newConnection(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:528)
      ... 3 more
      Caused by: java.net.ConnectException: Connection refused: connect
      at java.net.PlainSocketImpl.socketConnect(Native Method)
      at java.net.PlainSocketImpl.doConnect(Unknown Source)
      at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
      at java.net.PlainSocketImpl.connect(Unknown Source)
      at java.net.Socket.connect(Unknown Source)
      at java.net.Socket.connect(Unknown Source)
      at java.net.Socket.(Unknown Source)
      at java.net.Socket.(Unknown Source)
      at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown S
      ource)
      at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown S
      ource)
      ... 9 more

      Y:\ejb>