2 Replies Latest reply on Sep 22, 2005 5:49 AM by Anton Gavazuk

    Problem with calling of remote method

    Anton Gavazuk Newbie

      Hello all
      I have problem when I call remote method of any bean (for example: create() of statelessl Session Bean )
      The server is RedHat, JBoss 4.0.2
      With such config but on Windows server I havenot any problem

      by the way - I have solved problem: "When I have started the rmiregistry on the server, the Naming.lookup call throws a ConnectException" on redhat server - I have changed etc/hosts file

      trace for my problem:

      java.rmi.ConnectIOException: Exception creating connection to:; nested exception is:
      java.net.SocketException: Network is unreachable: connect
      at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:580)
      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.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown Source)Exception creating connection to:; nested exception is:
      java.net.SocketException: Network is unreachable: connect
      at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:118)
      at org.jboss.invocation.InvokerInterceptor.invokeInvoker(InvokerInterceptor.java:227)
      at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:167)
      at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
      at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:55)
      at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:169)
      at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:86)
      at $Proxy0.create(Unknown Source)
      at amc.ejb.cmp.TestClass.main(TestClass.java:48)
      Caused by: java.net.SocketException: Network is unreachable: connect
      at java.net.PlainSocketImpl.socketConnect(Native Method)
      at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
      at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
      at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
      at java.net.Socket.connect(Socket.java:452)
      at java.net.Socket.connect(Socket.java:402)
      at java.net.Socket.(Socket.java:309)
      at java.net.Socket.(Socket.java:124)
      at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
      at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
      at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:562)
      ... 13 more
      ===== the end ======

        • 1. Re: Problem with calling of remote method
          Tom Elrod Master

          I don't understand this post. Are you saying that you have a JBoss instance running on your linux server and can not connect to it from another machine when using an ejb client? The trace looks as though you have done the JNDI lookup for the ejb, but can not connect back to where it thinks the ejb lives ( Is this the same IP where you did the lookup for JNDI?

          Maybe you can restate the problem?

          • 2. Re: Problem with calling of remote method
            Anton Gavazuk Newbie

            Sorry - my english is not so good as I want :) - therefore question look so ugly

            About problem:
            lookup method works

            Object ref = jndiCntx.lookup("DictionaryEJB");
             DictionaryHome home = (DictionaryHome)PortableRemoteObject.narrow(ref,DictionaryHome.class);
             Dictionary dict = home.create();

            but when home.create() is called - I have described exception...