0 Replies Latest reply on Jul 3, 2007 4:19 AM by Marion Michelbrink

    ConnectException trying to run JUnit Test

    Marion Michelbrink Newbie

      Hi folks.

      I've read Wiki and FAQ concerning JBossNS and have searched the forum for answers to my problem, but I really didn't get any.
      Maybe I'm just plain stupid, but even if so - I would appreciate your help!

      I am using JBoss 3.2.7 and it starts up fine, telling me

      INFO [NamingService] Started jndi bootstrap jnpPort=1099, rmiPort=1098, backlog=50, bindAddress=localhost/127.0.0.1, Client SocketFactory=null, Server SocketFactory=org.jboss.net.sockets.DefaultSocketFactory@ad093076


      When I want to run a remote JUnit test case from my IntelliJ IDEA, I include the jndi properties in the vm parameters:
      -Djava.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
      -Djava.naming.provider.url=jnp://localhost:1099
      -Djava.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
      


      Unfortunately I still can not connect to my local server:
      javax.naming.CommunicationException [Root exception is java.rmi.ConnectException: Connection refused to host: 10.64.2.160; nested exception is:
       java.net.ConnectException: Connection refused: connect]
       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:703)
       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:568)
       at javax.naming.InitialContext.lookup(InitialContext.java:347)
      



      The IP address listed in the stack trace is my local address.
      What am I missing here ?

      Thanx in advance!