1 Reply Latest reply on Aug 17, 2015 9:48 AM by simon.jongsma

    How to fix BrokenPipeException that occurs in Arquillian after adding jbossweb dependency?

    simon.jongsma

      We have a lot of unit tests that are executed against a local JBoss and also against two remote JBoss instances that run on Windows/Oracle and Linux/PostgreSQL respectively.
      This all worked well. Now for a particular software component we needed this dependency:

      <dependency>
      <groupId>org.jboss.web</groupId>
      <artifactId>jbossweb</artifactId>
      <version>7.3.1.Final-redhat-1</version>

                 <scope>provided</scope>

      </dependency>

      This appears to be standard module of the JBoss EAP 6.2.2. that we are currently using.

      Compilation went ok and also the new software worked ok.

      But the communication between Arquillian and JBoss was now corrupted causing all unit tests in this project to fail:

      java.lang.NoClassDefFoundError: org/xnio/BrokenPipeException

       

      Arquillian component versions are orchestrated with this BOM:

      <dependencyManagement>
      <dependencies>
             <dependency>
                 <groupId>org.jboss.bom.eap</groupId>
                 <artifactId>jboss-javaee-6.0-with-tools</artifactId>
                 <version>6.2.0-redhat-1</version>
                 <type>pom</type>
                 <scope>import</scope>
              </dependency>
      </dependencies>
      </dependencyManagement>

      It seems that the new jbossweb artifact brings in a different xnio version causing a conflict with Arquillian xnio version? How to solve this?

      Full Surefire report with stacktrace was added to this question.

        • 1. Re: How to fix BrokenPipeException that occurs in Arquillian after adding jbossweb dependency?
          simon.jongsma

          Issue was caused by jbossweb using a different xnio version (3.07) than jboss remoting.

          A transitive dependency problem between different JBoss modules.

          So  the new dependency gets 3.07 xnio classes loaded.

          Then the call from arquillian to remoting fails because this requires the 3.09 xnio objects to communicate.

           

          Fixed by forcing xnio to 3.09 for jbossweb with this dependency in the top level pom.

          <dependencyManagement>
          <dependencies>
                <dependency>
                  <groupId>org.jboss.xnio</groupId>
                  <artifactId>xnio-nio</artifactId>
                  <version>3.0.9.GA-redhat-1</version>
                </dependency>
                <dependency>
                  <groupId>org.jboss.xnio</groupId>
                  <artifactId>xnio-api</artifactId>
                  <version>3.0.9.GA-redhat-1</version>
                </dependency>
          </dependencies>
          </dependencyManagement>