1 Reply Latest reply on Sep 20, 2018 2:46 PM by getarbind

    Could not create AdminClient: ADMC0016E: The system cannot create a SOAP connector to connect to host localhost at port 8880.

    balaajichander

      I have configured to run WAS 8 remote to run arquillian integration tests using the following GitHub repository,

       

       

      GitHub - arquillian/arquillian-container-was: Arquillian WebSphere Containers

       

       

      I have built the jar locally using my Websphere 8.0.0.9 Home jars.  Now when I try to run the following tests,

       

      @RunWith(Arquillian.class)

      public class AppTest {

       

          public static Archive<?> createDeploymentArchive() {

              File[] libs = Maven.resolver().loadPomFromFile("pom.xml").

                              importRuntimeAndTestDependencies().asFile();

              final JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "test.jar").

                                       addClasses(EmployeeService.class);

              final WebArchive war = ShrinkWrap.create(WebArchive.class, "test.war").

                                      addAsLibraries(libs).

                                      addAsManifestResource("beans.xml");

              final EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, "test.ear").

                                            setApplicationXML("test-application.xml");

              ear.addAsModule(jar);

              ear.addAsModule(war);

              System.out.println(jar.toString(true));

              System.out.println(war.toString(true));

              System.out.println(ear.toString(true));

              return ear;

          }

       

          @EJB

          EmployeeService employeeService;

       

          @Test

          public void emptyTest() {

              Assert.fail("Not yet implemented");

          }

       

      }

       

      I am getting the following error,

       

      org.jboss.arquillian.container.spi.client.container.LifecycleException: Could not create AdminClient: ADMC0016E: The system cannot create a SOAP connector to connect to host localhost at port 8880.

          at org.jboss.arquillian.container.was.remote_8.WebSphereRemoteContainer.start(WebSphereRemoteContainer.java:163)

          at org.jboss.arquillian.container.impl.ContainerImpl.start(ContainerImpl.java:199)

          at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController$8.perform(ContainerLifecycleController.java:163)

          at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController$8.perform(ContainerLifecycleController.java:157)

          at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController.forContainer(ContainerLifecycleController.java:255)

          at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController.startContainer(ContainerLifecycleController.java:156)

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)

          at java.lang.reflect.Method.invoke(Method.java:611)

          at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)

          at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)

          at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)

          at org.jboss.arquillian.container.impl.client.ContainerDeploymentContextHandler.createContainerContext(ContainerDeploymentContextHandler.java:57)

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)

          at java.lang.reflect.Method.invoke(Method.java:611)

          at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)

          at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)

          at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)

          at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)

          at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)

          at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController$2.perform(ContainerLifecycleController.java:77)

          at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController$2.perform(ContainerLifecycleController.java:70)

          at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController.forEachSuiteContainer(ContainerLifecycleController.java:221)

          at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController.startSuiteContainers(ContainerLifecycleController.java:69)

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)

          at java.lang.reflect.Method.invoke(Method.java:611)

          at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)

          at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)

          at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)

          at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)

          at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)

          at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)

          at org.jboss.arquillian.container.test.impl.client.ContainerEventController.execute(ContainerEventController.java:86)

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)

          at java.lang.reflect.Method.invoke(Method.java:611)

          at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)

          at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)

          at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)

          at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:60)

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)

          at java.lang.reflect.Method.invoke(Method.java:611)

          at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)

          at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)

          at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)

          at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)

          at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.beforeSuite(EventTestRunnerAdaptor.java:68)

          at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:97)

          at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)

          at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)

          at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)

          at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)

          at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)

          at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

      Caused by: com.ibm.websphere.management.exception.ConnectorException: ADMC0016E: The system cannot create a SOAP connector to connect to host localhost at port 8880.

          at com.ibm.websphere.management.AdminClientFactory.createAdminClientPrivileged(Unknown Source)

          at com.ibm.websphere.management.AdminClientFactory.access$000(Unknown Source)

          at com.ibm.websphere.management.AdminClientFactory$1.run(Unknown Source)

          at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:63)

          at com.ibm.websphere.management.AdminClientFactory.createAdminClient(Unknown Source)

          at org.jboss.arquillian.container.was.remote_8.WebSphereRemoteContainer.start(WebSphereRemoteContainer.java:149)

          ... 61 more

      Caused by: java.lang.reflect.InvocationTargetException

          at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

          at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:56)

          at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:39)

          at java.lang.reflect.Constructor.newInstance(Constructor.java:527)

          ... 67 more

      Caused by: com.ibm.websphere.management.exception.ConnectorNotAvailableException: [SOAPException: faultCode=SOAP-ENV:Client; msg=Unable to find a valid IP for host localhost]

          at com.ibm.ws.management.connector.soap.SOAPConnectorClient.reconnect(SOAPConnectorClient.java:429)

          at com.ibm.ws.management.connector.soap.SOAPConnectorClient.<init>(SOAPConnectorClient.java:228)

          ... 71 more

      Caused by: [SOAPException: faultCode=SOAP-ENV:Client; msg=Unable to find a valid IP for host localhost]

          at org.apache.soap.rpc.Call.WASinvoke(Call.java:484)

          at com.ibm.ws.management.connector.soap.SOAPConnectorClient$4.run(SOAPConnectorClient.java:379)

          at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)

          at com.ibm.ws.management.connector.soap.SOAPConnectorClient.reconnect(SOAPConnectorClient.java:372)

          ... 72 more

       

       

      My test-application.xml looks like this ,

       

      <?xml version="1.0" encoding="UTF-8" standalone="yes"?>

      <arquillian xmlns="http://www.jboss.org/arquillian-1.0"

          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

          xsi:schemaLocation="http://www.jboss.org/arquillian-1.0 http://jboss.org/schema/arquillian/arquillian-1.0.xsd">

       

          <engine>

              <property name="deploymentExportPath">target/</property>

          </engine>

       

          <container qualifier="websphere" default="true">

              <configuration>

                  <property name="remoteServerAddress">localhost</property>

                  <property name="remoteServerSoapPort">8880</property>

                  <property name="securityEnabled">true</property>

                  <property name="username">wasadmin</property>

                  <property name="password">wasadmin</property>

              </configuration>

          </container>

      </arquillian>

       

       

       

       

      Any workaround for this, Pom.xml has the following dependencies,

       

       

         <dependencyManagement>

              <dependencies>

                  <dependency>

                      <groupId>org.jboss.shrinkwrap.resolver</groupId>

                      <artifactId>shrinkwrap-resolver-bom</artifactId>

                      <version>2.0.0-alpha-5</version>

                      <scope>import</scope>

                      <type>pom</type>

                  </dependency>

                  <dependency>

                      <groupId>org.jboss.arquillian</groupId>

                      <artifactId>arquillian-bom</artifactId>

                      <version>1.0.3.Final</version>

                      <scope>import</scope>

                      <type>pom</type>

                  </dependency>

              </dependencies>

          </dependencyManagement>


          <dependencies>

              <dependency>

                  <groupId>net.sf.json-lib</groupId>

                  <artifactId>json-lib</artifactId>

                  <version>2.4</version>

                  <classifier>jdk15</classifier>

              </dependency>


              <!-- JUNIT -->

              <dependency>

                  <groupId>junit</groupId>

                  <artifactId>junit</artifactId>

                  <version>4.12</version>

                  <scope>test</scope>

              </dependency>

              <!-- ARQUILILAN JUNIT -->

              <dependency>

                  <groupId>org.jboss.arquillian.junit</groupId>

                  <artifactId>arquillian-junit-container</artifactId>

                  <scope>test</scope>

              </dependency>


              <!-- ARQUILLIAN SHRINKWRAP -->

              <dependency>

                  <groupId>org.jboss.shrinkwrap.resolver</groupId>

                  <artifactId>shrinkwrap-resolver-api</artifactId>

                  <version>2.0.0-alpha-5</version>

                  <scope>test</scope>

              </dependency>

              <dependency>

                  <groupId>org.jboss.shrinkwrap.resolver</groupId>

                  <artifactId>shrinkwrap-resolver-impl-maven</artifactId>

                  <version>2.0.0-alpha-5</version>

                  <scope>test</scope>

              </dependency>

              <dependency>

                  <groupId>org.jboss.shrinkwrap.resolver</groupId>

                  <artifactId>shrinkwrap-resolver-api-maven</artifactId>

                  <version>2.0.0-alpha-5</version>

                  <scope>test</scope>

              </dependency>


              <!-- ARQUILIIAN EMBEDDED CONTAINER -->

              <dependency>

                  <groupId>org.jboss.arquillian.container</groupId>

                  <artifactId>arquillian-was-remote-8</artifactId>

                  <version>1.0.0.Final-SNAPSHOT</version>

                  <scope>test</scope>

              </dependency>

              <dependency>

                  <groupId>org.jboss.weld</groupId>

                  <artifactId>weld-core</artifactId>

                  <version>1.1.34.Final</version>

                  <scope>test</scope>

              </dependency>

              <dependency>

                  <groupId>org.slf4j</groupId>

                  <artifactId>slf4j-simple</artifactId>

                  <version>1.6.4</version>

                  <scope>test</scope>

              </dependency> 

          </dependencies>

       

       

      Thanks.