Uploaded image for project: 'Maven Surefire'
  1. Maven Surefire
  2. SUREFIRE-2209

surefire testng fails to launch due to JPMS error on jdk11

    XMLWordPrintableJSON

Details

    Description

      The diagnostics log basicaly says:

      > *ResolutionException: Module **org.seleniumhq.selenium.remote_driver*
      > contains *package com.tngtech.jgiven.impl*, module
      > com.tngtech.jgiven.core exports package com.tngtech.jgiven.impl to
      > org.seleniumhq.selenium.remote_driver

      But this dependency is not reflected in my `pom.xml`.

       

      Specific project:

      https://github.com/QA-Automation-Starter/qa-automation/pull/203

       

      Surefire args are:

      --add-modules
      org.seleniumhq.selenium.remote_driver
      org.apache.maven.surefire.booter.ForkedBooter
      
      # Created at 2023-11-04T19:23:24.343
      Corrupted channel by directly writing to native stream in forked JVM 3. Stream 'Error occurred during initialization of boot layer'.
      
      # Created at 2023-11-04T19:23:24.380
      Corrupted channel by directly writing to native stream in forked JVM 3. Stream 'java.lang.module.ResolutionException: Module org.seleniumhq.selenium.remote_driver contains package com.tngtech.jgiven.impl, module com.tngtech.jgiven.core exports package com.tngtech.jgiven.impl to org.seleniumhq.selenium.remote_driver'.
      
      19:24:10 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.2.1:test (default-test) on project qa-jgiven-commons: 
      19:24:10 [ERROR] 
      19:24:10 [ERROR] Please refer to C:\projects\qa-automation\qa-jgiven-commons\target\surefire-reports for the individual test results.
      19:24:10 [ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
      19:24:10 [ERROR] The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
      19:24:10 [ERROR] Command was cmd.exe /X /C "C:\Users\aherscu\.jdks\corretto-11.0.21\bin\java --illegal-access=debug @C:\Users\aherscu\AppData\Local\Temp\surefire13030155764457997013\surefireargs-20231104192320582_17 C:\Users\aherscu\AppData\Local\Temp\surefire13030155764457997013 2023-11-04T19-21-54_514-jvmRun3 surefire-20231104192320582_15tmp surefire_4-20231104192320582_16tmp"
      19:24:10 [ERROR] Error occurred in starting fork, check output in log
      19:24:10 [ERROR] Process Exit Code: 1
      19:24:10 [ERROR] org.apache.maven.surefire.booter.SurefireBooterForkException: The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
      19:24:10 [ERROR] Command was cmd.exe /X /C "C:\Users\aherscu\.jdks\corretto-11.0.21\bin\java --illegal-access=debug @C:\Users\aherscu\AppData\Local\Temp\surefire13030155764457997013\surefireargs-20231104192320582_17 C:\Users\aherscu\AppData\Local\Temp\surefire13030155764457997013 2023-11-04T19-21-54_514-jvmRun3 surefire-20231104192320582_15tmp surefire_4-20231104192320582_16tmp"
      19:24:10 [ERROR] Error occurred in starting fork, check output in log
      19:24:10 [ERROR] Process Exit Code: 1
      19:24:10 [ERROR]     at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:643)
      19:24:10 [ERROR]     at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:285)
      
      19:12:56 [INFO] ------------------< dev.aherscu.qa:qa-jgiven-commons >------------------
      19:12:56 [INFO] Building QA JGiven Commons 1.0.0-SNAPSHOT
      19:12:56 [INFO]   from pom.xml
      19:12:56 [INFO] --------------------------------[ jar ]---------------------------------
      19:12:57 [INFO] 
      19:12:57 [INFO] --- dependency:3.6.0:tree (default-cli) @ qa-jgiven-commons ---
      19:12:59 [INFO] dev.aherscu.qa:qa-jgiven-commons:jar:1.0.0-SNAPSHOT
      19:12:59 [INFO] +- org.jooq:jool:jar:0.9.15:compile
      19:12:59 [INFO] +- org.aspectj:aspectjrt:jar:1.9.20.1:compile
      19:12:59 [INFO] +- org.projectlombok:lombok:jar:1.18.30:provided
      19:12:59 [INFO] +- com.github.spotbugs:spotbugs-annotations:jar:4.8.0:compile
      19:12:59 [INFO] |  \- com.google.code.findbugs:jsr305:jar:3.0.2:compile
      19:12:59 [INFO] +- io.dropwizard.metrics:metrics-core:jar:4.2.21:compile
      19:12:59 [INFO] |  \- org.slf4j:slf4j-api:jar:2.0.9:compile
      19:12:59 [INFO] +- dev.aherscu.qa:qa-testing-utils:jar:1.0.0-SNAPSHOT:compile
      19:12:59 [INFO] |  +- javax.validation:validation-api:jar:2.0.1.Final:compile
      19:12:59 [INFO] |  +- org.hamcrest:hamcrest:jar:2.2:compile
      19:12:59 [INFO] |  +- net.coobird:thumbnailator:jar:0.4.20:compile
      19:12:59 [INFO] |  +- com.github.adorow:jcurry:jar:1.0.1:compile
      19:12:59 [INFO] |  +- org.reflections:reflections:jar:0.10.2:compile
      19:12:59 [INFO] |  |  \- org.javassist:javassist:jar:3.28.0-GA:compile
      19:12:59 [INFO] |  +- commons-configuration:commons-configuration:jar:1.10:compile
      19:12:59 [INFO] |  |  \- commons-lang:commons-lang:jar:2.6:compile
      19:12:59 [INFO] |  +- commons-collections:commons-collections:jar:3.2.2:compile
      19:12:59 [INFO] |  +- org.apache.commons:commons-text:jar:1.10.0:compile
      19:12:59 [INFO] |  +- com.google.guava:guava:jar:32.1.3-jre:compile
      19:12:59 [INFO] |  |  +- com.google.guava:failureaccess:jar:1.0.1:compile
      19:12:59 [INFO] |  |  +- com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava:compile
      19:12:59 [INFO] |  |  +- org.checkerframework:checker-qual:jar:3.37.0:compile
      19:12:59 [INFO] |  |  +- com.google.errorprone:error_prone_annotations:jar:2.21.1:compile
      19:12:59 [INFO] |  |  \- com.google.j2objc:j2objc-annotations:jar:2.8:compile
      19:12:59 [INFO] |  +- jakarta.ws.rs:jakarta.ws.rs-api:jar:3.1.0:compile
      19:12:59 [INFO] |  +- org.apache.commons:commons-lang3:jar:3.13.0:compile
      19:12:59 [INFO] |  +- commons-io:commons-io:jar:2.14.0:compile
      19:12:59 [INFO] |  +- commons-codec:commons-codec:jar:1.16.0:compile
      19:12:59 [INFO] |  +- org.slf4j:log4j-over-slf4j:jar:2.0.9:runtime
      19:12:59 [INFO] |  +- org.slf4j:jcl-over-slf4j:jar:2.0.9:runtime
      19:12:59 [INFO] |  +- ch.qos.logback:logback-classic:jar:1.4.11:compile
      19:12:59 [INFO] |  |  \- ch.qos.logback:logback-core:jar:1.4.11:compile
      19:12:59 [INFO] |  +- com.jayway.jsonpath:json-path:jar:2.8.0:compile
      19:12:59 [INFO] |  |  \- net.minidev:json-smart:jar:2.4.10:runtime
      19:12:59 [INFO] |  |     \- net.minidev:accessors-smart:jar:2.4.9:runtime
      19:12:59 [INFO] |  +- org.assertj:assertj-core:jar:3.24.2:compile
      19:12:59 [INFO] |  +- commons-jxpath:commons-jxpath:jar:1.3:compile
      19:12:59 [INFO] |  +- org.wiremock:wiremock:jar:3.0.1:compile
      19:12:59 [INFO] |  |  +- org.eclipse.jetty:jetty-server:jar:11.0.15:compile
      19:12:59 [INFO] |  |  |  +- org.eclipse.jetty.toolchain:jetty-jakarta-servlet-api:jar:5.0.2:compile
      19:12:59 [INFO] |  |  |  +- org.eclipse.jetty:jetty-http:jar:11.0.15:compile
      19:12:59 [INFO] |  |  |  \- org.eclipse.jetty:jetty-io:jar:11.0.15:compile
      19:12:59 [INFO] |  |  +- org.eclipse.jetty:jetty-servlet:jar:11.0.15:compile
      19:12:59 [INFO] |  |  |  \- org.eclipse.jetty:jetty-security:jar:11.0.15:compile
      19:12:59 [INFO] |  |  +- org.eclipse.jetty:jetty-servlets:jar:11.0.15:compile
      19:12:59 [INFO] |  |  |  \- org.eclipse.jetty:jetty-util:jar:11.0.15:compile
      19:12:59 [INFO] |  |  +- org.eclipse.jetty:jetty-webapp:jar:11.0.15:compile
      19:12:59 [INFO] |  |  |  \- org.eclipse.jetty:jetty-xml:jar:11.0.15:compile
      19:12:59 [INFO] |  |  +- org.eclipse.jetty:jetty-proxy:jar:11.0.15:compile
      19:12:59 [INFO] |  |  |  \- org.eclipse.jetty:jetty-client:jar:11.0.15:compile
      19:12:59 [INFO] |  |  +- org.eclipse.jetty.http2:http2-server:jar:11.0.15:compile
      19:12:59 [INFO] |  |  |  \- org.eclipse.jetty.http2:http2-common:jar:11.0.15:compile
      19:12:59 [INFO] |  |  |     \- org.eclipse.jetty.http2:http2-hpack:jar:11.0.15:compile
      19:12:59 [INFO] |  |  +- org.eclipse.jetty:jetty-alpn-server:jar:11.0.15:compile
      19:12:59 [INFO] |  |  +- org.eclipse.jetty:jetty-alpn-java-server:jar:11.0.15:compile
      19:12:59 [INFO] |  |  +- org.eclipse.jetty:jetty-alpn-java-client:jar:11.0.15:compile
      19:12:59 [INFO] |  |  +- org.eclipse.jetty:jetty-alpn-client:jar:11.0.15:compile
      19:12:59 [INFO] |  |  +- com.fasterxml.jackson.core:jackson-core:jar:2.15.2:compile
      19:12:59 [INFO] |  |  +- com.fasterxml.jackson.core:jackson-annotations:jar:2.15.2:compile
      19:12:59 [INFO] |  |  +- com.fasterxml.jackson.core:jackson-databind:jar:2.15.2:compile
      19:12:59 [INFO] |  |  +- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.15.2:compile
      19:12:59 [INFO] |  |  +- net.javacrumbs.json-unit:json-unit-core:jar:2.38.0:compile
      19:12:59 [INFO] |  |  |  \- org.hamcrest:hamcrest-core:jar:2.2:compile
      19:12:59 [INFO] |  |  +- org.ow2.asm:asm:jar:9.5:compile
      19:12:59 [INFO] |  |  +- net.sf.jopt-simple:jopt-simple:jar:5.0.4:compile
      19:12:59 [INFO] |  |  +- commons-fileupload:commons-fileupload:jar:1.5:compile
      19:12:59 [INFO] |  |  \- com.networknt:json-schema-validator:jar:1.0.86:compile
      19:12:59 [INFO] |  |     +- com.ethlo.time:itu:jar:1.7.0:compile
      19:12:59 [INFO] |  |     \- com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:jar:2.15.2:compile
      19:12:59 [INFO] |  |        \- org.yaml:snakeyaml:jar:2.0:compile
      19:12:59 [INFO] |  \- com.samskivert:jmustache:jar:1.15:compile
      19:12:59 [INFO] +- io.appium:java-client:jar:9.0.0:compile
      19:12:59 [INFO] |  +- org.seleniumhq.selenium:selenium-api:jar:4.15.0:compile
      19:12:59 [INFO] |  +- org.seleniumhq.selenium:selenium-remote-driver:jar:4.15.0:compile
      19:12:59 [INFO] |  |  +- com.google.auto.service:auto-service-annotations:jar:1.1.1:compile
      19:12:59 [INFO] |  |  +- io.opentelemetry:opentelemetry-api:jar:1.28.0:compile
      19:12:59 [INFO] |  |  +- io.opentelemetry:opentelemetry-context:jar:1.28.0:compile
      19:12:59 [INFO] |  |  +- io.opentelemetry:opentelemetry-exporter-logging:jar:1.28.0:compile
      19:12:59 [INFO] |  |  |  +- io.opentelemetry:opentelemetry-sdk-metrics:jar:1.28.0:compile
      19:12:59 [INFO] |  |  |  |  \- io.opentelemetry:opentelemetry-extension-incubator:jar:1.28.0-alpha:runtime
      19:12:59 [INFO] |  |  |  \- io.opentelemetry:opentelemetry-sdk-logs:jar:1.28.0:compile
      19:12:59 [INFO] |  |  +- io.opentelemetry:opentelemetry-sdk-common:jar:1.28.0:compile
      19:12:59 [INFO] |  |  +- io.opentelemetry:opentelemetry-sdk-extension-autoconfigure-spi:jar:1.28.0:compile
      19:12:59 [INFO] |  |  +- io.opentelemetry:opentelemetry-sdk-extension-autoconfigure:jar:1.28.0:compile
      19:12:59 [INFO] |  |  |  \- io.opentelemetry:opentelemetry-api-events:jar:1.28.0-alpha:runtime
      19:12:59 [INFO] |  |  +- io.opentelemetry:opentelemetry-sdk-trace:jar:1.28.0:compile
      19:12:59 [INFO] |  |  +- io.opentelemetry:opentelemetry-sdk:jar:1.28.0:compile
      19:12:59 [INFO] |  |  +- io.opentelemetry:opentelemetry-semconv:jar:1.28.0-alpha:compile
      19:12:59 [INFO] |  |  +- org.seleniumhq.selenium:selenium-http:jar:4.15.0:compile
      19:12:59 [INFO] |  |  |  \- dev.failsafe:failsafe:jar:3.3.2:compile
      19:12:59 [INFO] |  |  +- org.seleniumhq.selenium:selenium-json:jar:4.15.0:compile
      19:12:59 [INFO] |  |  +- org.seleniumhq.selenium:selenium-manager:jar:4.15.0:compile
      19:12:59 [INFO] |  |  \- org.seleniumhq.selenium:selenium-os:jar:4.15.0:compile
      19:12:59 [INFO] |  |     \- org.apache.commons:commons-exec:jar:1.3:compile
      19:12:59 [INFO] |  +- org.seleniumhq.selenium:selenium-support:jar:4.15.0:compile
      19:12:59 [INFO] |  \- com.google.code.gson:gson:jar:2.10.1:compile
      19:12:59 [INFO] +- org.seleniumhq.selenium:selenium-java:jar:4.14.1:compile
      19:12:59 [INFO] |  +- org.seleniumhq.selenium:selenium-chrome-driver:jar:4.14.1:compile
      19:12:59 [INFO] |  |  \- org.seleniumhq.selenium:selenium-chromium-driver:jar:4.14.1:compile
      19:12:59 [INFO] |  +- org.seleniumhq.selenium:selenium-devtools-v116:jar:4.14.1:compile
      19:12:59 [INFO] |  +- org.seleniumhq.selenium:selenium-devtools-v117:jar:4.14.1:compile
      19:12:59 [INFO] |  +- org.seleniumhq.selenium:selenium-devtools-v118:jar:4.14.1:compile
      19:12:59 [INFO] |  +- org.seleniumhq.selenium:selenium-devtools-v85:jar:4.14.1:compile
      19:12:59 [INFO] |  +- org.seleniumhq.selenium:selenium-edge-driver:jar:4.14.1:compile
      19:12:59 [INFO] |  +- org.seleniumhq.selenium:selenium-firefox-driver:jar:4.14.1:compile
      19:12:59 [INFO] |  +- org.seleniumhq.selenium:selenium-ie-driver:jar:4.14.1:compile
      19:12:59 [INFO] |  \- org.seleniumhq.selenium:selenium-safari-driver:jar:4.14.1:compile
      19:12:59 [INFO] +- io.github.bonigarcia:webdrivermanager:jar:5.5.3:compile
      19:12:59 [INFO] |  +- org.brotli:dec:jar:0.1.2:compile
      19:12:59 [INFO] |  \- org.apache.httpcomponents.client5:httpclient5:jar:5.2.1:compile
      19:12:59 [INFO] |     +- org.apache.httpcomponents.core5:httpcore5:jar:5.2:compile
      19:12:59 [INFO] |     \- org.apache.httpcomponents.core5:httpcore5-h2:jar:5.2:compile
      19:12:59 [INFO] +- org.mvel:mvel2:jar:2.5.0.Final:compile
      19:12:59 [INFO] +- net.jodah:failsafe:jar:2.4.4:compile
      19:12:59 [INFO] +- com.danhaywood.java:danhaywood-java-assertjext:jar:0.1.0:compile
      19:12:59 [INFO] |  \- junit:junit:jar:4.12:compile
      19:12:59 [INFO] +- commons-dbutils:commons-dbutils:jar:1.8.1:compile
      19:12:59 [INFO] +- commons-beanutils:commons-beanutils:jar:1.9.4:compile
      19:12:59 [INFO] +- org.unitils:unitils-io:jar:3.4.6:compile
      19:12:59 [INFO] |  \- org.unitils:unitils-core:jar:3.4.6:compile
      19:12:59 [INFO] |     \- ognl:ognl:jar:2.6.9:compile
      19:12:59 [INFO] +- org.unitils:unitils-dbunit:jar:3.4.6:compile
      19:12:59 [INFO] |  +- org.unitils:unitils-database:jar:3.4.6:compile
      19:12:59 [INFO] |  |  +- org.unitils:unitils-dbmaintainer:jar:3.4.6:compile
      19:12:59 [INFO] |  |  |  \- org.hibernate:hibernate-core:jar:3.6.10.Final:compile
      19:12:59 [INFO] |  |  |     +- antlr:antlr:jar:2.7.6:compile
      19:12:59 [INFO] |  |  |     +- dom4j:dom4j:jar:1.6.1:compile
      19:12:59 [INFO] |  |  |     +- org.hibernate:hibernate-commons-annotations:jar:3.2.0.Final:compile
      19:12:59 [INFO] |  |  |     \- org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar:1.0.1.Final:compile
      19:12:59 [INFO] |  |  \- commons-dbcp:commons-dbcp:jar:1.4:compile
      19:12:59 [INFO] |  |     \- commons-pool:commons-pool:jar:1.5.4:compile
      19:12:59 [INFO] |  +- org.dbunit:dbunit:jar:2.4.9:compile
      19:12:59 [INFO] |  \- org.springframework:spring-jdbc:jar:4.2.6.RELEASE:compile
      19:12:59 [INFO] |     +- org.springframework:spring-beans:jar:4.2.6.RELEASE:compile
      19:12:59 [INFO] |     +- org.springframework:spring-core:jar:4.2.6.RELEASE:compile
      19:12:59 [INFO] |     |  \- commons-logging:commons-logging:jar:1.2:compile
      19:12:59 [INFO] |     \- org.springframework:spring-tx:jar:4.2.6.RELEASE:compile
      19:12:59 [INFO] +- com.zaxxer:HikariCP:jar:5.0.1:compile
      19:12:59 [INFO] +- com.tngtech.jgiven:jgiven-testng:jar:1.3.0:compile
      19:12:59 [INFO] |  \- com.tngtech.jgiven:jgiven-core:jar:1.3.0:compile
      19:12:59 [INFO] |     +- com.thoughtworks.paranamer:paranamer:jar:2.8:runtime
      19:12:59 [INFO] |     \- org.fusesource.jansi:jansi:jar:1.18:runtime
      19:12:59 [INFO] +- org.testng:testng:jar:7.8.0:compile
      19:12:59 [INFO] |  +- com.beust:jcommander:jar:1.82:compile
      19:12:59 [INFO] |  \- org.webjars:jquery:jar:3.6.1:runtime
      19:12:59 [INFO] +- org.apache.commons:commons-collections4:jar:4.4:compile
      19:12:59 [INFO] +- com.github.rodionmoiseev.c10n:c10n-core:jar:1.3:compile
      19:12:59 [INFO] +- org.slf4j:jul-to-slf4j:jar:2.0.9:compile
      19:12:59 [INFO] +- org.apache.derby:derbyclient:jar:10.15.2.0:provided
      19:12:59 [INFO] |  \- org.apache.derby:derbyshared:jar:10.15.2.0:provided
      19:12:59 [INFO] +- com.google.inject:guice:jar:7.0.0:test
      19:12:59 [INFO] |  +- jakarta.inject:jakarta.inject-api:jar:2.0.1:test
      19:12:59 [INFO] |  \- aopalliance:aopalliance:jar:1.0:test
      19:12:59 [INFO] +- org.mockito:mockito-core:jar:5.6.0:test
      19:12:59 [INFO] |  +- net.bytebuddy:byte-buddy:jar:1.14.8:compile
      19:12:59 [INFO] |  +- net.bytebuddy:byte-buddy-agent:jar:1.14.8:test
      19:12:59 [INFO] |  \- org.objenesis:objenesis:jar:3.3:test
      19:12:59 [INFO] \- org.seleniumhq.selenium:htmlunit-driver:jar:4.13.0:test
      

       

       

      https://stackoverflow.com/questions/77423742/surefire-testng-fails-to-launch-due-to-jpms-error-on-jdk11

      Attachments

        Activity

          People

            Unassigned Unassigned
            adrian.herscu@gmail.com Adrian Herscu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: