4 Replies Latest reply on Sep 29, 2006 4:27 AM by Ashish Manchanda

    Access Remote Jboss Topic from client

    Daniel Goodwin Newbie

      I am trying to use a client to access a topic on a remote machine running JBoss. The JBoss 3.2.4 system (linux) is not running on default ports but is using ports-01 configuration (something else is running on some of the default ports) so jndi is running on 1199 ..

      The client is using the jbossall-client.jar

      I get and exception of form Naming Exception javax.naming.CommunicationException [Root exception is java.rmi.NoSuchObjectException: no such object in table]

      I have placed fuller exception trace below.

      It all works fine if I have them on same machine (Win2000).
      I have also tried a change I noticed elsewhere where I changed
      {jboss.bind.address} in uil2-service.xml to actual IP address without
      success (though I think this may be OK anyway in 3.2.4)

      App on Jboss (MDB) using same jndi work fine though obviously this is
      on the same machine - it post stats to the topic to be retrieved by a number of remote clients.

      I can telnet to the port and get some gibberish so It would appear to listening.


      Systems

      Client on Win2000 with JDK 1.4
      Jboss 3.2.4 on Linux also running JDK 1.4

      InitialContext iniCtx = null;
      if (true){
       Properties properties = new Properties();
       properties.put Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
      properties.put(Context.URL_PKG_PREFIXES, "org.jnp.interfaces");
      properties.put(Context.PROVIDER_URL, "10.2.0.77:1199");
      iniCtx = new InitialContext(properties);
      System.out.println("Props :" + properties);
      }
      else
      {
      // If using jndi.properties, then use below
      iniCtx = new InitialContext();
      }
      
      topic = (Topic) iniCtx.lookup(topicName);
      System.out.println("Topic found " + topicName);
      
      Object tmp = iniCtx.lookup("UIL2ConnectionFactory");
      TopicConnectionFactory tcf = (TopicConnectionFactory) tmp;
      


      
      
       [java] Props :{java.naming.provider.url=10.2.0.77:1199, java.naming.factory
      .initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=o
      rg.jnp.interfaces}
       [java] NamingException javax.naming.CommunicationException [Root exception
      is java.rmi.NoSuchObjectException: no such object in table]
       [java] javax.naming.CommunicationException [Root exception is java.rmi.NoSu
      chObjectException: no such object in table]
       [java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:64
      7)
       [java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:50
      7)
       [java] at javax.naming.InitialContext.lookup(InitialContext.java:347)
       [java] at relayui.RelayIFListener$RelayListenerThread.setupPubSub(Relay
      IFListener.java:350)
       [java] at relayui.RelayIFListener$RelayListenerThread.<init>(RelayIFLis
      tener.java:239)
       [java] at relayui.RelayIFListener.run(RelayIFListener.java:94)
       [java] at java.lang.Thread.run(Thread.java:534)
       [java] Caused by: java.rmi.NoSuchObjectException: no such object in table
       [java] at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServe
      r(StreamRemoteCall.java:247)
       [java] at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCa
      ll.java:223)
       [java] at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133)
       [java] at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
       [java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:52
      8)
       [java] ... 6 more
      


        • 1. Re: Access Remote Jboss Topic from client
          Daniel Goodwin Newbie

          With some more investigation I am now getting
          a java.net.Exception relating to connection refused for 127.0.0.1
          (Previous errors were occuring when there was an active JBOSS on client machine as well)

          I looked in WIKI and saw where /etc/hosts should not have it set to host name. Does this mean that if Jboss host where queue is is linux-server then there should not be a line in /etc/hosts such as
          127.0.0.1 localhost linux-server

          If so,
          (a) why? the system administrator insists it is required for other(?) things
          (b) can I get around it by doing something else.
          As I said before I have tried putting actual IP address in UIL service file instead of ${jboss.bind.address} without success

          Thanks

          Daniel

          • 2. Re: Access Remote Jboss Topic from client
            Daniel Goodwin Newbie

            Also
            I know its a linux question, but if I change etc/hosts,
            do I have to reboot for it to have an effect.
            I managed to change it and reboot JBoss server, but now I get Connection refused without an IP address (it is blank)

            Daniel

            • 3. Re: Access Remote Jboss Topic from client
              Daniel Goodwin Newbie

              Finally managed to get this fixed and yes it was the etc/hosts file
              So
              127.0.0.1 localhost servername.domain
              should be replaced with
              127.0.0.1 localhost
              10.2.0.77 servername.domain

              (assuming that there is no DNS to resolve the IP address)

              Daniel



              • 4. Re: Access Remote Jboss Topic from client
                Ashish Manchanda Newbie

                Hi Daniel

                I am facing a similar issues. I am trying to lookup to a ejb remotely and i am getting javax.naming.CommunicationException [Root exception is java.rmi.NoSuchObjectException: no such object in table]


                Can you guide me how you were able to solve the problem....

                Thanks

                Ashish