2 Replies Latest reply on May 18, 2006 4:44 AM by glum

    Getting Error when JBoss EJB client running on a diff machin

    Nagamuralee A Newbie

      Hello,

      I wanted to know if someone can give me some information/solution for the following problem:

      We are getting the error when we run the EJB client from different machine . How ever its working fine when client and server running in same system.

      JNDI Lookup done successfully and getting home object also fine, we are getting the error while executing the statemment Home.create()

      Code as follows:
      properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
      properties.put(Context.PROVIDER_URL, "jnp://16.138.176.25:2222");
      properties.put(Context.URL_PKG_PREFIXES,"org.jboss.naming.client");

      InitialContext ctx = new InitialContext(properties);
      Object lObject = ctx.lookup("System/VodafoneD2-GER-D-NMC-FM1/ApplicationType/QoS/AlarmMonitor/Application/1-0;1-0;HPTeMIP");
      System.out.println("object::"+lObject);
      JVTHPAlarmMonitorHome lJVTHPAlarmMonitorHome = (JVTHPAlarmMonitorHome) PortableRemoteObject.narrow(lObject, JVTHPAlarmMonitorHome.class);
      System.out.println("lJVTHPAlarmMonitorHome::"+lJVTHPAlarmMonitorHome);
      JVTHPAlarmMonitorSession lJVTHPAlarmMonitorSession=lJVTHPAlarmMonitorHome.create();

      JNDI Lookup done successfully and getting home object also fine, we are getting the error in Home.create()

      The error as follows:

      java.rmi.ConnectIOException: Exception creating connection to: 16.138.53.93; nested exception is:
      java.net.SocketException: Network is unreachable: 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.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown Source)
      at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:119)
      at org.jboss.invocation.InvokerInterceptor.invokeInvoker(InvokerInterceptor.java:227)
      at org.jboss.invocation.MarshallingInvokerInterceptor.invoke(MarshallingInvokerInterceptor.java:37)
      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 test.TestJVT.getJVTSession1(TestJVT.java:427)
      at test.TestJVT.testTryCommentAlarms(TestJVT.java:126)
      at test.TestJVT.main(TestJVT.java:50)
      Caused by: java.net.SocketException: Network is unreachable: 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 Source)
      at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown Source)
      ... 16 more


      Thanks by advance !

      Nagamuralee