3 Replies Latest reply on Jul 11, 2018 6:20 AM by l.fugaro

    Disabling resteasy for Arquillian Cube

    nickarls

      Hi,

       

      I've tried the ARQ forums Cube JAX-RS dependency  but I didn't get any response so I'll try to reformulate it as a WildFly question.

       

      Since I can't convince docker-java to use the mounted docker.sock, how can I disable RestEasy so I can use Jersey? I've tried include a jboss-deployment-structure.xml that does a

       

              <exclude-subsystems>
                  <subsystem name="resteasy"/>
                  <subsystem name="jaxrs"/>
              </exclude-subsystems>

      I've understood that the EE-dep no longer pulls them back on later WF:s but in any case I have a maven

       

      <systemPropertyVariables>

         <!--  Force Jersey to be used when RestEasy is auto-discovered. Jersey is required by docker-java -->

        <javax.ws.rs.ext.RuntimeDelegate>org.glassfish.jersey.internal.RuntimeDelegateImpl</javax.ws.rs.ext.RuntimeDelegate>

        </systemPropertyVariables>

       

      But still I get a

       

      Caused by: org.jboss.modules.ModuleNotFoundException: org.jboss.resteasy.resteasy-jaxrs-api:main

              at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:240)

              ... 72 more

       

      What? Where does that even come from? That module doesn't even exist in WF11/12(?). Still, it looks like it's looking for some implementation on the server-side

       

      Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException

              at javax.ws.rs.client.ClientBuilder.newBuilder(ClientBuilder.java:103)

              at com.github.dockerjava.jaxrs.JerseyDockerCmdExecFactory.init(JerseyDockerCmdExecFactory.java:229)

              at com.github.dockerjava.core.DockerClientImpl.withDockerCmdExecFactory(DockerClientImpl.java:161)

              at com.github.dockerjava.core.DockerClientBuilder.build(DockerClientBuilder.java:47)

              at org.arquillian.cube.docker.impl.util.DefaultDocker.getDefaultDockerClient(DefaultDocker.java:13)

              at

       

      Thanks in advance,

      Nik

        • 1. Re: Disabling resteasy for Arquillian Cube
          l.fugaro

          Hi Nik,

          I'm also having trouble with it, and looking around it seems like the dependencies is hard-coded.

          Take a look at the following:

          Resteasy/FactoryFinder.java at master · resteasy/Resteasy · GitHub

           

          By the way, didi you find a solution?

           

          Thanks

          Regards

          Luigi

          • 2. Re: Disabling resteasy for Arquillian Cube
            nickarls

            Unfortunately no, I had to drop Cube altogether and do the container startup/teardown manually in the Jenkins pipeline

            • 3. Re: Disabling resteasy for Arquillian Cube
              l.fugaro

              I got it to work.

              Don't know exactly what was the right combo-configuration, but that's what I did.

              Removed the EAP 7.1 BOM and the Arquillian BOM as well.

              Added all the versions manually, and for my JAX-RS application that's what I needed:

                  javax.enterprise
                  cdi-api
                  1.2
                  provided
              
              
                  org.jboss.spec.javax.annotation
                  jboss-annotations-api_1.2_spec
                  1.0.0.Final
                  provided
              
              
                  org.jboss.spec.javax.ws.rs
                  jboss-jaxrs-api_2.0_spec
                  1.0.0.Final
                  provided
              
              
                  org.jboss.spec.javax.ejb
                  jboss-ejb-api_3.2_spec
                  1.0.0.Final
                  provided
              
              
              
                  junit
                  junit
                  4.12
                  test
              
              
                  org.jboss.arquillian.core
                  arquillian-core-api
                  1.1.13.Final
                  test
              
              
                  org.jboss.arquillian.junit
                  arquillian-junit-container
                  1.1.13.Final
                  test
              
              
                  org.arquillian.cube
                  arquillian-cube-docker
                  1.15.3
                  test
              
              
                  org.arquillian.cube
                  arquillian-cube-requirement
                  1.15.3
                  test
              
              
                  org.jboss.arquillian.protocol
                  arquillian-protocol-servlet
                  1.1.13.Final
                  test
              
              
                  org.wildfly.arquillian
                  wildfly-arquillian-container-managed
                  2.0.1.Final
                  test
              
              
                  org.apache.httpcomponents
                  httpclient
                  4.5.3
                  test
              
              
                  org.jboss.resteasy
                  resteasy-jaxrs
                  3.0.24.Final
                  test
              
              

               

              And here is my arquillian.xml file:

                          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                          xsi:schemaLocation="http://jboss.org/schema/arquillian
                      http://jboss.org/schema/arquillian/arquillian_1_0.xsd">
               
                  
               
                  
                      STARTANDSTOP
                      
                  
               
                  
                      true
                      
                      CUBE
                      
                          wildfly:
                            buildImage:
                              dockerfileLocation: src/test/resources
                              dockerfileName: Dockerfile.eap.71
                              noCache: true
                              remove: true
                            exposedPorts: [8080/tcp, 9990/tcp]
                            killContainer: true
                            await:
                              strategy: log
                              match: WFLYSRV0051
                              stdOut: true
                              stdErr: true
                              iterations: 100
                              sleepPollingTime: 1 s
                            portBindings: [8080->8080/tcp, 9990->9990/tcp]
                      
                  
               
                  
                      
                          172.17.0.2
                          9990
                          
                          true
                          8080 9990
                          admin
                          admin
                      
                  
              
              

               

               

               

               

               

              So, it might be a mix of few things, but I'm pretty sure with proper dependencies versions the error disappears.

               

              IHIH,

              Regards,

              Luigi