6 Replies Latest reply on Apr 18, 2019 6:17 AM by Björn Martin

    Arquillian support for Java 11?

    Björn Martin Newbie

      I recently started migrating an existing in-house project from Java 8 / Wildfly 8 / Java EE 7 to Java 11 / Wildfly 15 / Java EE 8. While the project itself is now 100% working on the new versions, I ran into issues with Arquillian. My first impression was that I was "too recent" Wildfly-wise, as Wildfly 14 seemed to have been the most recent version supported. But then I stumbled upon Error running Arquillian tests on Wildfly 15.0.0.Final (ArquillianServletRunner not found). Works on 14.0.1.Final and older which gave me a reference project that works with Wildfly 15 (I made a minor adjustment compared to that article by using Wildfly 15.0.1.Final but it worked just as fine). But even the sample project mentioned there, GitHub - OctopusDeploy/ArquillianTest , does not work when running it on Java 11, at least not for me. I bumped Arquillian's BOM to 1.4.1.Final in addition but to no avail: the project still runs on Java 8 only.


      Question: Does Arquillian already support Java 11 (and I am making some kind of mistake) or is my search for Java 11 compatibility in vain?


      If it helps I'd fork the sample project on Github and make the few adjustments that ultimately make it not work for me on Java 11.


      Thanks for any input on this!

        • 1. Re: Arquillian support for Java 11?
          James Perkins Master

          What version of org.wildfly.arquillian are you using?



          James R. Perkins

          • 2. Re: Arquillian support for Java 11?
            Björn Martin Newbie

            As per the referenced article I used 2.1.1.Final there, the most recent version that I could find on https://search.maven.org/search?q=g:org.wildfly.arquillian


            EDIT: I took the liberty of forking the project to GitHub - bjoernmartin/ArquillianTest  and making the adjustments mentioned. While testing if I still get the error (just to be sure...) I noticed that both the Maven Compiler + Surefire Plugin versions used were "a bit old" considering the recentness of Java 11. So I pulled them up to the newest versions I know of. But I still get an error:


            [INFO] -------------------------------------------------------

            [INFO]  T E S T S

            [INFO] -------------------------------------------------------

            [INFO] Running org.example.arquilliantest.ArquillianTest

            Mar 25, 2019 7:48:34 PM org.jboss.as.arquillian.container.managed.ManagedDeployableContainer startInternal

            INFO: Starting container with: [C:\opt\jdk11\bin\java, -D[Standalone], -Xms64m, -Xmx512m, -Djava.net.preferIPv4Stack=true, -Djava.awt.headless=true, -Djboss.modules.system.pkgs=org.jboss.byteman, -ea, -Djboss.home.dir=C:\dev\_3rdparty\ArquillianTest\target\wildfly-15.0.1.Final, -Dorg.jboss.boot.log.file=C:\dev\_3rdparty\ArquillianTest\target\wildfly-15.0.1.Final\standalone\log\server.log, -Dlogging.configuration=file:C:\dev\_3rdparty\ArquillianTest\target\wildfly-15.0.1.Final\standalone\configuration\logging.properties, -jar, C:\dev\_3rdparty\ArquillianTest\target\wildfly-15.0.1.Final\jboss-modules.jar, -mp, C:\dev\_3rdparty\ArquillianTest\target\wildfly-15.0.1.Final\modules, org.jboss.as.standalone, -Djboss.home.dir=C:\dev\_3rdparty\ArquillianTest\target\wildfly-15.0.1.Final, -Djboss.server.base.dir=C:\dev\_3rdparty\ArquillianTest\target\wildfly-15.0.1.Final\standalone, -Djboss.server.log.dir=C:\dev\_3rdparty\ArquillianTest\target\wildfly-15.0.1.Final\standalone\log, -Djboss.server.config.dir=C:\dev\_3rdparty\ArquillianTest\target\wildfly-15.0.1.Final\standalone\configuration]

            Mar 25, 2019 7:48:34 PM org.jboss.remoting3.EndpointImpl <clinit>

            INFO: JBoss Remoting version 5.0.0.Final

            Mar 25, 2019 7:48:34 PM org.xnio.Xnio <clinit>

            INFO: XNIO version 3.5.1.Final

            Mar 25, 2019 7:48:34 PM org.xnio.nio.NioXnio <clinit>

            INFO: XNIO NIO Implementation Version 3.5.1.Final

            org.jboss.modules.ModuleNotFoundException: java.se

                    at org.jboss.modules.Module.addPaths(Module.java:1266)

                    at org.jboss.modules.Module.link(Module.java:1622)

                    at org.jboss.modules.Module.relinkIfNecessary(Module.java:1650)

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

                    at org.jboss.modules.Main.main(Main.java:437)

            Mar 25, 2019 7:48:34 PM org.wildfly.security.Version <clinit>

            INFO: ELY00001: WildFly Elytron version 1.1.0.Final

            [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 3.548 s <<< FAILURE! - in org.example.arquilliantest.ArquillianTest

            [ERROR] org.example.arquilliantest.ArquillianTest  Time elapsed: 3.546 s  <<< ERROR!


            The red line lead me to org.jboss.modules.ModuleNotFoundException: java.se which suggests a fix for Wildfly's startup scripts by making sure --add-modules java.se is present. But the command line (marked violet) lacks that parameter. So maybe that is the issue?

            • 3. Re: Arquillian support for Java 11?
              James Perkins Master

              This looks like there's not currently a version of WildFly Arquillian that works with Java 11. It looks like a 2.2.0.Final release will need to be done soon or we need to get 2.1.x to work with Java 11. A 2.2.0.Final release is probably a better option IMO. I'll add a task to get this done.



              James R. Perkins

              • 4. Re: Arquillian support for Java 11?
                James Perkins Master

                I just realized I forgot to add the workaround for you. You can add a javaVmArguments property to your arquillian.xml with --add-modules=java.se that should work around the issue.

                <property name="javaVmArguments">--add-modules=java.se</property>



                James R. Perkins

                • 5. Re: Arquillian support for Java 11?
                  James Perkins Master

                  Just an FYI 2.2.0.Final of wildfly-arquillian has been released and should work with Java 11.



                  James R. Perkins

                  • 6. Re: Arquillian support for Java 11?
                    Björn Martin Newbie

                    Sorry for the late reply, I was unavailable the last few weeks.


                    I skipped the workaround and went directly for 2.2.0.Final - now it works. I also updated GitHub - bjoernmartin/ArquillianTest to specify that version, so checking it out and building now works out of the box for Java 11.


                    Thanks a lot for the quick help, much appreciated!