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/, 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:

      Unfortunately I still can not connect to my local server:
      javax.naming.CommunicationException [Root exception is java.rmi.ConnectException: Connection refused to host:; 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!