2 Replies Latest reply on Nov 29, 2005 10:15 AM by Steven Ksiazek

    NoSuchObjectException

    Steven Ksiazek Newbie

      I have a server with 2 ethernet addresses (192.168.x.x) and (10.10.0.x).

      My application wants to access a stateless-session bean from the JBoss instance running on this server. I can perform a Context:lookup to get the Home interface of the EJB and perform method calls from the 192.168 side of the network just fine. When I run the same code from the 10.10.0.x network, I get the java.rmi.NoSuchObjectException ( no such object in table ).

      I have modified conf/jboss-service.xml file so that the "Bind Address" and "RMI Bind Address" is empty in the JNDI section. This means that the JNDI naming service should be visible from both network interfaces, correct ?

      Is there something else I am missing on the server side, or is this a client configuration issue ? Note that I can access the JBoss App Server from the 10.10.0.x network to view the JMX-Console, and my deployed web-app, so the basic network connectivity should be fine.

        • 1. Re: NoSuchObjectException
          delkant Newbie

          can you give us a description of your files?

          what version of jboss you are using?

          • 2. Re: NoSuchObjectException
            Steven Ksiazek Newbie

            We are currently using version 4.0.0, although I will be migrating to version 4.03 once I fix an unrelated problem in another module.

            Here is the JNDI section of the conf/jboss-service.xml file :

            <!-- ==================================================================== -->
            <!-- JNDI -->
            <!-- ==================================================================== -->


            <!-- The call by value mode. true if all lookups are unmarshalled using
            the caller's TCL, false if in VM lookups return the value by reference.
            -->
            true
            <!-- The listening port for the bootstrap JNP service. Set this to -1
            to run the NamingService without the JNP invoker listening port.
            -->
            1099
            <!-- The bootstrap JNP server bind address. This also sets the default
            RMI service bind address. Empty == all addresses
            ${jboss.bind.address}
            -->

            <!-- The port of the RMI naming service, 0 == anonymous -->
            1098
            <!-- The RMI service bind address. Empty == all addresses
            ${jboss.bind.address}
            -->

            <!-- The thread pool service used to control the bootstrap lookups -->
            <depends optional-attribute-name="LookupPool"
            proxy-type="attribute">jboss.system:service=ThreadPool


            <mbean code="org.jboss.naming.JNDIView"
            name="jboss:service=JNDIView"
            xmbean-dd="resource:xmdesc/JNDIView-xmbean.xml">



            Here is the method (slightly modified) that performs the context lookup :

            public static FubarRemote getServerFubar() {

            FubarRemote remoteFubar = null;

            String serverName = "remoteserver";

            Context serverContext;
            String contextFactory = "org.jnp.interfaces.NamingContextFactory";
            String contextURL = "jnp://" + serverName + ":1099";
            Properties p = new Properties();
            p.put("java.naming.factory.initial", contextFactory);
            p.put("java.naming.provider.url", contextURL);
            p.put("java.naming.factory.url.pkgs", "org.jboss.naming.org.jnp.interfaces");

            try {
            serverContext = new InitialContext(p);
            Object ref = serverContext.lookup("Fubar");
            FubarHome home =
            (FubarrHome) PortableRemoteObject.narrow(ref, FubarHome.class);
            remoteFubar = home.create();
            } catch (NamingException e) {
            e.printStackTrace();
            } catch (RemoteException e) {
            e.printStackTrace();
            } catch (CreateException e) {
            e.printStackTrace();
            }

            return remoteFubar;
            }