7 Replies Latest reply on Mar 21, 2004 2:08 AM by luigifonti

    Crazy problem

    luigifonti

      I've a crazy problem.
      I installed Jboss-3.2 on two different machines: the first one with Windows XP, the other one with Linux Mandrake 10.
      Then I created a test application which seems to work properly on both machines with local clients.
      The problem arises when I try to use clients on remote machines: the Windows version works fine, while the Linux version doesn't supply its EJB's to remote clients. The returned Exception is:

      java.rmi.NoSuchObjectException : no such object in table

      Note that the Linux machine is perfectly reachable from the outer world, all the servers (http, mysql...) work properly; the jmx-console is reachabe too, ad indicates that the required class is bound.

      So, it is not a network problem, but a jndi problem: when requested from an external machine it doesn't recognize the required object as bound.
      Any suggestions ?

        • 1. Re: Crazy problem

          Post the full exception and other useful information like your host table
          and the section of the log that shows the deployment of jndi or your ejb.

          Regards,
          Adrian

          • 2. Re: Crazy problem
            luigifonti

            This is the log of deployment of the package on the Linux machine, with IP address 192.168.0.170:

            2004-03-08 22:53:13,341 INFO [org.jboss.deployment.MainDeployer] Starting deployment of package: file:/usr/java/jboss3.2/server/default/deploy/banca.jar
            2004-03-08 22:53:20,700 INFO [org.jboss.ejb.EjbModule] Deploying Cliente
            2004-03-08 22:53:22,032 INFO [org.jboss.ejb.EjbModule] Deploying Conto
            2004-03-08 22:53:22,083 INFO [org.jboss.ejb.EjbModule] Deploying Movimento
            2004-03-08 22:53:22,361 INFO [org.jboss.ejb.EjbModule] Deploying Operazioni
            2004-03-08 22:53:24,220 INFO [org.jboss.ejb.plugins.EntityInstancePool] Started jboss.j2ee:jndiName=banca/Cliente,plugin=pool,service=EJB
            2004-03-08 22:53:24,224 INFO [org.jboss.ejb.EntityContainer] Started jboss.j2ee:jndiName=banca/Cliente,service=EJB
            2004-03-08 22:53:24,348 INFO [org.jboss.ejb.plugins.EntityInstancePool] Started jboss.j2ee:jndiName=banca/Conto,plugin=pool,service=EJB
            2004-03-08 22:53:24,350 INFO [org.jboss.ejb.EntityContainer] Started jboss.j2ee:jndiName=banca/Conto,service=EJB
            2004-03-08 22:53:24,502 INFO [org.jboss.ejb.plugins.EntityInstancePool] Started jboss.j2ee:jndiName=banca/Movimento,plugin=pool,service=EJB
            2004-03-08 22:53:24,505 INFO [org.jboss.ejb.EntityContainer] Started jboss.j2ee:jndiName=banca/Movimento,service=EJB
            2004-03-08 22:53:24,582 INFO [org.jboss.ejb.plugins.StatelessSessionInstancePool] Started jboss.j2ee:jndiName=banca/Operazioni,plugin=pool,service=EJB
            2004-03-08 22:53:24,585 INFO [org.jboss.ejb.StatelessSessionContainer] Started jboss.j2ee:jndiName=banca/Operazioni,service=EJB
            2004-03-08 22:53:24,588 INFO [org.jboss.ejb.EjbModule] Started jboss.j2ee:module=banca.jar,service=EjbModule
            2004-03-08 22:53:24,590 INFO [org.jboss.ejb.EJBDeployer] Deployed: file:/usr/java/jboss3.2/server/default/deploy/banca.jar
            2004-03-08 22:53:24,920 INFO [org.jboss.deployment.MainDeployer] Deployed package: file:/usr/java/jboss3.2/server/default/deploy/banca.jar
            -----------------------------------------------------------------------------------
            The following is the full Exception thrown at execution of client Tester on the Windows machine:

            Tester:
            [java] javax.naming.CommunicationException [Root exception is
            java.rmi.NoSuchObjectException: no such object in table]
            ------------------------------------------------------------------------------------
            The following is the piece of source of the client Tester, where the Exception in thrown (the required remote object is banca/Operazioni, a stateless Session bean):

            InitialContext jndiContext = new InitialContext();

            ref = jndiContext.lookup("java://192.168.0.170/banca/Operazioni");
            OperazioniHome homeA = (OperazioniHome)
            PortableRemoteObject.narrow(ref, OperazioniHome.class);

            ------------------------------------------------------------------------------------
            The following is the Jboss-J2ee section of the web page:
            http://192.168.0.170:8080/jmx-console:

            jndiName=banca/Cliente,plugin=cache,service=EJB
            jndiName=banca/Cliente,plugin=pool,service=EJB
            jndiName=banca/Cliente,service=EJB
            jndiName=banca/Conto,plugin=cache,service=EJB
            jndiName=banca/Conto,plugin=pool,service=EJB
            jndiName=banca/Conto,service=EJB
            jndiName=banca/Movimento,plugin=cache,service=EJB
            jndiName=banca/Movimento,plugin=pool,service=EJB
            jndiName=banca/Movimento,service=EJB
            jndiName=banca/Operazioni,plugin=pool,service=EJB
            jndiName=banca/Operazioni,service=EJB
            module=banca.jar,service=EjbModule
            service=ClientDeployer
            service=EARDeployer

            • 3. Re: Crazy problem
              erik777

               

              ref = jndiContext.lookup("java://192.168.0.170/banca/Operazioni");


              Isn't that supposed to be "jnp" instead of "java" for the JNDI scheme?

              ref = jndiContext.lookup("jnp://192.168.0.170/banca/Operazioni");

              That's the only way I know how to connect remotely in JBoss. If there's another way, I'd sure love to understand it, because right now I cannot figure out how to get a WebSphere client to obtain the remote home interface of an EJB in JBoss because it considers the 'jnp' protocol invalid. But this does work fine from a JBoss client.


              • 4. Re: Crazy problem
                luigifonti

                No, sorry. I've tried with "jnp://..." but the result is the same.
                And please keep in mind that in the other sense (jboss on Windows XP, and client on Linux) things work fine using "java://..."

                • 5. Re: Crazy problem
                  luigifonti

                  I've tried also the following :

                  env = new Hashtable();
                  env.put (Context.INITIAL_CONTEXT_FACTORY,
                  "org.jnp.interfaces.NamingContextFactory");
                  env.put(Context.PROVIDER_URL,"jnp://192.168.0.170:1099");
                  InitialContext jndiContext = new InitialContext(env);

                  ref = jndiContext.lookup("java://192.168.0.170/banca/Operazioni");
                  OperazioniHome homeA = (OperazioniHome)
                  PortableRemoteObject.narrow(ref, OperazioniHome.class);

                  but the result is always the same.

                  • 6. Re: Crazy problem
                    tthiele

                    I observed similar behaviour with Windows as well as Linux. Make sure that your network configuration is really correct. I.e. the _reverse_ ns-lookup must be correct.

                    Hope it helps
                    /tilo

                    • 7. Re: Crazy problem
                      luigifonti

                      Could you please be more explicit ?
                      How can I check the _reverse_ ns-lookup ?