11 Replies Latest reply on Aug 19, 2003 1:13 PM by Sacha Labourey

    JNDI lookup problem

    radhikamehta Newbie

      hi! I have a standalone java program which tries to lookup a sessionbean deployed in jboss3.2.0 in a remote machine.
      I am using cluster configuration.
      My java code snippet is:

      Properties p = new Properties();
      p.put (Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory
      p.put(Context.URL_PKG_PREFIXES, "jboss.naming:org.jnp.interfaces");
      p.put(Context.PROVIDER_URL, "xxx.xxx.xxx.xxx:1100"); // HA-JNDI port.
      Context ctx = new javax.naming.InitialContext(p);
      Object ref = ctx.lookup("abc");

      My problem is that it gives a communication exception during lookup.
      The exception is::

      javax.naming.CommunicationException. Root exception is java.rmi.RemoteException
      : Service unavailable.
      at org.jboss.ha.framework.interfaces.HARMIClient.invokeRemote(HARMIClien
      at org.jboss.ha.framework.interfaces.HARMIClient.invoke(HARMIClient.java
      at $Proxy0.lookup(Unknown Source)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:492)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:471)
      at javax.naming.InitialContext.lookup(InitialContext.java:347)

      Can someone please help???
      Thanx in advance
      Radhika Mehta