3 Replies Latest reply on Jun 27, 2005 9:31 AM by MiriTheQuiet

    UnknownHostException when getting objects from context using

    MiriTheQuiet Newbie

      Hi, I try to get some objects from InitialContext via JNP, but all the time I receive:

      javax.naming.CommunicationException [Root exception is java.rmi.UnknownHostException: Unknown host: XXX; nested exception is:
       java.net.UnknownHostException: XXX]
       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:647)
       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:507)
       at javax.naming.InitialContext.lookup(InitialContext.java:347)
       at client.ClientSideWheelsApp.initializeObjectsFromContext(ClientSideWheelsApp.java:96)
       at client.ClientSideWheelsApp.main(ClientSideWheelsApp.java:128)
      

      where the XXX is only local name of the host (but surely I need the fully qualified name).
      My jndi.properties looks like this:
      java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
      java.naming.provider.url=jnp://XXX.domain.com:1099
      java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
      jnp.localPort=12099
      

      Why the InitialContext carries just the local name of the server? How can I force it to change it..?
      Thx very much