0 Replies Latest reply on Jun 6, 2018 4:52 PM by Webster Homer

    Arquillan Unit tests don't run from Eclipse Oxygen

    Webster Homer Newbie

      I'm not sure if this is a Jboss tools problem or an Eclipse problem. I'm using Eclipse Oxygen 3a, with Jboss tools 4.5.3 installed

      I am moving a codebase from Wildfly 8.2 to Wilfly 12. There are a number of Arquillian unit tests.

      The tests run from the maven command line. However, if I try to run them from inside Eclipse with a right-click on the test and Run As-> Junit test they fail to execute

       

      java.lang.NoSuchFieldError: INSTANCE
      at org
      .apache.http.conn.ssl.SSLConnectionSocketFactory.<clinit>(SSLConnectionSocketFactory.java:146)
      at org
      .jboss.resteasy.client.jaxrs.ClientHttpEngineBuilder43.build(ClientHttpEngineBuilder43.java:122)
      at org
      .jboss.resteasy.client.jaxrs.ResteasyClientBuilder.build(ResteasyClientBuilder.java:406)
      at org
      .jboss.resteasy.client.jaxrs.ResteasyClientBuilder.build(ResteasyClientBuilder.java:38)
      at javax
      .ws.rs.client.ClientBuilder.newClient(ClientBuilder.java:121)
      at org
      .jboss.arquillian.extension.rest.client.RestEnricher.enrichByType(RestEnricher.java:45)
      at org
      .jboss.arquillian.extension.rest.client.BaseRestEnricher.resolve(BaseRestEnricher.java:74)
      at org
      .jboss.arquillian.container.test.impl.execution.LocalTestExecuter.enrichArguments(LocalTestExecuter.java:94)
      at org
      .jboss.arquillian.container.test.impl.execution.LocalTestExecuter.execute(LocalTestExecuter.java:60)
      at sun
      .reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun
      .reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun
      .reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java
      .lang.reflect.Method.invoke(Method.java:498)
      at org
      .jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:96)
      at org
      .jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:103)
      at org
      .jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:85)
      at org
      .jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:143)
      at org
      .jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:114)
      at org
      .jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
      at org
      .jboss.arquillian.container.test.impl.execution.ClientTestExecuter.execute(ClientTestExecuter.java:53)
      at sun
      .reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun
      .reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun
      .reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java
      .lang.reflect.Method.invoke(Method.java:498)
      at org
      .jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:96)
      at org
      .jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:103)
      at org
      .jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:85)
      at org
      .jboss.arquillian.container.test.impl.client.ContainerEventController.createContext(ContainerEventController.java:142)
      at org
      .jboss.arquillian.container.test.impl.client.ContainerEventController.createTestContext(ContainerEventController.java:129)
      at sun
      .reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun
      .reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun
      .reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java
      .lang.reflect.Method.invoke(Method.java:498)
      at org
      .jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:96)
      at org
      .jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:92)
      at org
      .jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:130)
      at sun
      .reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun
      .reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun
      .reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java
      .lang.reflect.Method.invoke(Method.java:498)
      at org
      .jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:96)
      at org
      .jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:92)
      at org
      .jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:92)
      at sun
      .reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun
      .reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun
      .reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java
      .lang.reflect.Method.invoke(Method.java:498)
      at org
      .jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:96)
      at org
      .jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:92)
      at org
      .jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:73)
      at sun
      .reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun
      .reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun
      .reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java
      .lang.reflect.Method.invoke(Method.java:498)
      at org
      .jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:96)
      at org
      .jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:92)
      at org
      .jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:143)
      at org
      .jboss.arquillian.test.impl.EventTestRunnerAdaptor.test(EventTestRunnerAdaptor.java:136)
      at org
      .jboss.arquillian.junit.Arquillian$8.evaluate(Arquillian.java:372)
      at org
      .jboss.arquillian.junit.Arquillian$4.evaluate(Arquillian.java:246)
      at org
      .jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:431)
      at org
      .jboss.arquillian.junit.Arquillian.access$200(Arquillian.java:55)
      at org
      .jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:260)
      at org
      .jboss.arquillian.junit.Arquillian$7$1.invoke(Arquillian.java:324)
      at org
      .jboss.arquillian.container.test.impl.execution.ClientBeforeAfterLifecycleEventExecuter.execute(ClientBeforeAfterLifecycleEventExecuter.java:99)
      at org
      .jboss.arquillian.container.test.impl.execution.ClientBeforeAfterLifecycleEventExecuter.on(ClientBeforeAfterLifecycleEventExecuter.java:72)
      at sun
      .reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun
      .reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun
      .reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java
      .lang.reflect.Method.invoke(Method.java:498)
      at org
      .jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:96)
      at org
      .jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:103)
      at org
      .jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:85)
      at org
      .jboss.arquillian.container.test.impl.client.ContainerEventController.createContext(ContainerEventController.java:142)
      at org
      .jboss.arquillian.container.test.impl.client.ContainerEventController.createBeforeContext(ContainerEventController.java:124)
      at sun
      .reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun
      .reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun
      .reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java
      .lang.reflect.Method.invoke(Method.java:498)
      at org
      .jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:96)
      at org
      .jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:92)
      at org
      .jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:130)
      at sun
      .reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun
      .reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun
      .reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java
      .lang.reflect.Method.invoke(Method.java:498)
      at org
      .jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:96)
      at org
      .jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:92)
      at org
      .jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:92)
      at sun
      .reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun
      .reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun
      .reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java
      .lang.reflect.Method.invoke(Method.java:498)
      at org
      .jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:96)
      at org
      .jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:92)
      at org
      .jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:73)
      at sun
      .reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun
      .reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun
      .reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java
      .lang.reflect.Method.invoke(Method.java:498)
      at org
      .jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:96)
      at org
      .jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:92)
      at org
      .jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:143)
      at org
      .jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:114)
      at org
      .jboss.arquillian.test.impl.EventTestRunnerAdaptor.fireCustomLifecycle(EventTestRunnerAdaptor.java:159)
      at org
      .jboss.arquillian.junit.Arquillian$7.evaluate(Arquillian.java:317)
      at org
      .junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
      at org
      .junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
      at org
      .junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
      at org
      .junit.runners.ParentRunner$3.run(ParentRunner.java:290)
      at org
      .junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
      at org
      .junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
      at org
      .junit.runners.ParentRunner.access$000(ParentRunner.java:58)
      at org
      .junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
      at org
      .jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:205)
      at org
      .jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:431)
      at org
      .jboss.arquillian.junit.Arquillian.access$200(Arquillian.java:55)
      at org
      .jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:219)
      at org
      .junit.runners.ParentRunner.run(ParentRunner.java:363)
      at org
      .jboss.arquillian.junit.Arquillian.run(Arquillian.java:167)
      at org
      .eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
      at org
      .eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
      at org
      .eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:538)
      at org
      .eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:760)
      at org
      .eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:460)
      at org
      .eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:206)

       

      This is specific to Eclipse Oxygen, the Wildfly 8.2 version ran fine from Eclipse Neon.3 and earlier versions. The tests run from the shell command line. Googling this appears to be a mismatched httpclient library in the classpath. Strange that it only effects running the tests from Eclipse. JBoss Tools seems to include two different versions of the httpclient jars