title: "Couldn't contact the RemoteTestNG client" error when trying to run tests
body: <h2>Issue</h2>
  
  <p>Working with TestNG on a maven managed project, i can't seem to run tests via the TestNG eclipse plugin. When trying to run tests, the following error message pops up (inside a dialog window):</p>
  
  <blockquote>
    <p>Couldn't contact the RemoteTestNG client. Make sure you don't have an
    older version of testng.jar on your class path.</p>
    
    <p>Reason:<br>
    Timeout while trying to contact RemoteTestNG.</p>
  </blockquote>
  
  <p>How to resolve this?</p>
  
  <h2>Things I have tried</h2>
  
  <p>(After asking <strong>all</strong> my peers at the office QA department on this, and looking up information via the common search engines and on TestNG forums)</p>
  
  <ul>
  <li>Making sure I don't have an older version on my class path (naturally).</li>
  <li>Eliminating possible collisions between maven imported jars and jars used by the TestNG eclipse plugin (both are of version 6.7, and the project's <code>pom.xml</code> confirmed to use only its own dependent jar).</li>
  <li>Performing maven update and build after said changes.</li>
  <li>Running on a different JRE (specifically 1.7.0).</li>
  </ul>
  
  <h2>Relevant information</h2>
  
  <h3>Environment:</h3>
  
  <ul>
  <li><strong>OS:</strong> Win XP pro SP3</li>
  <li><strong>JRE:</strong> 1.6.0 update 31</li>
  <li><strong>TestNG:</strong> 6.7</li>
  <li><strong>Maven:</strong> 3.0.3</li>
  <li><strong>IDE:</strong> Eclipse Juno Java EE SR1</li>
  </ul>
  
  <h3><code>pom.xml</code> content:</h3>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="UTF-8" ?&gt;
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;artifactId&gt;SGTest&lt;/artifactId&gt;
      &lt;name&gt;SGTest&lt;/name&gt;
      &lt;description&gt;Service Grid Test project for XAP&lt;/description&gt;
  
      &lt;parent&gt;
          &lt;groupId&gt;com.my_product.quality.sgtest&lt;/groupId&gt;
          &lt;artifactId&gt;SGTest-parent&lt;/artifactId&gt;
          &lt;version&gt;3.0.0&lt;/version&gt;
          &lt;relativePath&gt;http://mvn-srv:8081/artifactory/libs-snapshot-local/com/my_product/quality/sgtest/SGTest-parent/3.0.0/SGTest-parent-3.0.0.pom&lt;/relativePath&gt;
      &lt;/parent&gt;
  
      &lt;properties&gt;
          &lt;xap.home&gt;${env.XAP_LATEST}&lt;/xap.home&gt;
      &lt;/properties&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.my_product&lt;/groupId&gt;
              &lt;artifactId&gt;my_opensource_product&lt;/artifactId&gt;
              &lt;version&gt;${gsVersion}&lt;/version&gt;
              &lt;scope&gt;system&lt;/scope&gt;
              &lt;systemPath&gt;${xap.home}/lib/required/my_opensource_product.jar&lt;/systemPath&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.my_product&lt;/groupId&gt;
              &lt;artifactId&gt;gs-runtime&lt;/artifactId&gt;
              &lt;version&gt;${gsVersion}&lt;/version&gt;
              &lt;scope&gt;system&lt;/scope&gt;
              &lt;systemPath&gt;${xap.home}/lib/required/gs-runtime.jar&lt;/systemPath&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.my_product.quality&lt;/groupId&gt;
              &lt;artifactId&gt;DashboardReporter&lt;/artifactId&gt;
              &lt;version&gt;0.0.1&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;${project.groupId}&lt;/groupId&gt;
              &lt;artifactId&gt;apps&lt;/artifactId&gt;
              &lt;version&gt;${project.version}&lt;/version&gt;
              &lt;type&gt;pom&lt;/type&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.my_product.quality&lt;/groupId&gt;
              &lt;artifactId&gt;webuitf&lt;/artifactId&gt;
              &lt;version&gt;1.0.0&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.my_product.quality&lt;/groupId&gt;
              &lt;artifactId&gt;wanem&lt;/artifactId&gt;
              &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.my_opensource_product.xenserver&lt;/groupId&gt;
              &lt;artifactId&gt;xenserver-machine-provisioning&lt;/artifactId&gt;
              &lt;version&gt;2.0.0&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.swift.common&lt;/groupId&gt;
              &lt;artifactId&gt;confluence-soap&lt;/artifactId&gt;
              &lt;version&gt;0.5&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.testng&lt;/groupId&gt;
              &lt;artifactId&gt;testng&lt;/artifactId&gt;
              &lt;version&gt;6.7&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.ant&lt;/groupId&gt;
              &lt;artifactId&gt;ant-jsch&lt;/artifactId&gt;
              &lt;version&gt;1.8.3&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
              &lt;artifactId&gt;hibernate-entitymanager&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.thoughtworks.xstream&lt;/groupId&gt;
              &lt;artifactId&gt;xstream&lt;/artifactId&gt;
              &lt;version&gt;1.4.2&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;javax.mail&lt;/groupId&gt;
              &lt;artifactId&gt;mail&lt;/artifactId&gt;
              &lt;version&gt;1.4.5&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.codehaus.groovy&lt;/groupId&gt;
              &lt;artifactId&gt;groovy-all&lt;/artifactId&gt;
              &lt;version&gt;1.8.6&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.commons&lt;/groupId&gt;
              &lt;artifactId&gt;commons-vfs2&lt;/artifactId&gt;
              &lt;version&gt;2.0&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.hyperic&lt;/groupId&gt;
              &lt;artifactId&gt;sigar&lt;/artifactId&gt;
              &lt;version&gt;1.6.5&lt;/version&gt;
              &lt;scope&gt;system&lt;/scope&gt;
              &lt;systemPath&gt;${xap.home}/lib/platform/sigar/sigar.jar&lt;/systemPath&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-jms&lt;/artifactId&gt;
              &lt;version&gt;3.1.1.RELEASE&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;hsqldb&lt;/groupId&gt;
              &lt;artifactId&gt;hsqldb&lt;/artifactId&gt;
              &lt;version&gt;1.8.0.10&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.hamcrest&lt;/groupId&gt;
              &lt;artifactId&gt;hamcrest-all&lt;/artifactId&gt;
              &lt;version&gt;1.3&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  
      &lt;build&gt;
          &lt;testSourceDirectory&gt;src/main/java&lt;/testSourceDirectory&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.12.4&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;classpathDependencyExcludes&gt;
                          &lt;classpathDependencyExcludes&gt;com.my_product.quality.sgtest.apps.security:processor&lt;/classpathDependencyExcludes&gt;
                          &lt;classpathDependencyExcludes&gt;com.my_product.quality.sgtest.apps.archives:customSecurityProcessor&lt;/classpathDependencyExcludes&gt;
                          &lt;classpathDependencyScopeExclude&gt;runtime&lt;/classpathDependencyScopeExclude&gt;
                      &lt;/classpathDependencyExcludes&gt;
                      &lt;argLine&gt;-Xmx2048m -XX:MaxPermSize=512m&lt;/argLine&gt;
                      &lt;includes&gt;
                          &lt;include&gt;${includes}&lt;/include&gt;
                      &lt;/includes&gt;
                      &lt;excludes&gt;
                          &lt;exclude&gt;${excludes}&lt;/exclude&gt;
                      &lt;/excludes&gt;
                      &lt;disableXmlReport&gt;true&lt;/disableXmlReport&gt;
                      &lt;reportsDirectory&gt;${sgtest.summary.dir}&lt;/reportsDirectory&gt;
                      &lt;reportFormat&gt;xml&lt;/reportFormat&gt;
                      &lt;properties&gt;
                          &lt;property&gt;
                              &lt;name&gt;configfailurepolicy&lt;/name&gt;
                              &lt;value&gt;continue&lt;/value&gt;
                          &lt;/property&gt;
                          &lt;property&gt;
                              &lt;name&gt;suitename&lt;/name&gt;
                              &lt;value&gt;${sgtest.suiteName}${sgtest.suiteId}&lt;/value&gt;
                          &lt;/property&gt;
                          &lt;property&gt;
                              &lt;name&gt;testname&lt;/name&gt;
                              &lt;value&gt;${sgtest.suiteName}${sgtest.suiteId}&lt;/value&gt;
                          &lt;/property&gt;
                          &lt;property&gt;
                              &lt;name&gt;outputDir&lt;/name&gt;
                              &lt;value&gt;${sgtest.summary.dir}&lt;/value&gt;
                          &lt;/property&gt;
                          &lt;property&gt;
                              &lt;name&gt;listener&lt;/name&gt;
                              &lt;value&gt;framework.testng.SGTestNGListener,framework.testng.SGTestNgSuiteSplitter,framework.testng.report.TestNgReporterImpl&lt;/value&gt;
                          &lt;/property&gt;
                      &lt;/properties&gt;
                      &lt;systemProperties&gt;
                          &lt;sgtest.suiteId&gt;${sgtest.suiteId}&lt;/sgtest.suiteId&gt;
                          &lt;sgtest.numOfSuites&gt;${sgtest.numOfSuites}&lt;/sgtest.numOfSuites&gt;
                          &lt;selenium.browser&gt;${selenium.browser}&lt;/selenium.browser&gt;
                          &lt;org.apache.commons.logging.Log&gt;org.apache.commons.logging.impl.Jdk14Logger&lt;/org.apache.commons.logging.Log&gt;
                          &lt;com.gs.logging.level.config&gt;true&lt;/com.gs.logging.level.config&gt;
                          &lt;java.util.logging.config.file&gt;${basedir}/logging/sgtest_logging.properties&lt;/java.util.logging.config.file&gt;
                          &lt;sgtest.buildFolder&gt;${sgtest.buildFolder}&lt;/sgtest.buildFolder&gt;
                          &lt;sgtest.url&gt;http://192.168.9.121:8087/sgtest3.0-xap/&lt;/sgtest.url&gt;
                          &lt;sgtest.disconnect.machines&gt;${sgtest.disconnect.machines}&lt;/sgtest.disconnect.machines&gt;
                          &lt;com.gs.work&gt;${com.gs.work}&lt;/com.gs.work&gt;
                          &lt;com.gs.deploy&gt;${com.gs.deploy}"&lt;/com.gs.deploy&gt;
                          &lt;cppOS&gt;${cppOS}&lt;/cppOS&gt;
                      &lt;/systemProperties&gt;
                      &lt;testFailureIgnore&gt;true&lt;/testFailureIgnore&gt;
                      &lt;detail&gt;true&lt;/detail&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;artifactId&gt;maven-assembly-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.3&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;descriptors&gt;
                          &lt;descriptor&gt;src/main/assembly/assembly.xml&lt;/descriptor&gt;
                      &lt;/descriptors&gt;
                      &lt;appendAssemblyId&gt;false&lt;/appendAssemblyId&gt;
                  &lt;/configuration&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;make-assembly&lt;/id&gt; &lt;!-- this is used for inheritance merges --&gt;
                          &lt;phase&gt;package&lt;/phase&gt; &lt;!-- bind to the packaging phase --&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;single&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>