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

NullPointerException on JDK10

Attach filesAttach ScreenshotVotersStop watchingWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.20.1
    • 2.21.0
    • Maven Surefire Plugin
    • None

    Description

      I'm having a NPE when testing the build on early access version of OpenJDK 10.

      Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.20.1:test failed.: NullPointerException ->

      more verbose:

      org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.20.1:test (default-test) on project hibernate-search-build-config: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.20.1:test failed.
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
      	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
      	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
      	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
      	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
      	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
      	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
      	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
      	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
      	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
      	at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
      Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.20.1:test failed.
      	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:145)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
      	... 20 more
      Caused by: java.lang.NullPointerException
      	at org.apache.maven.surefire.shade.org.apache.commons.lang3.SystemUtils.isJavaVersionAtLeast(SystemUtils.java:1626)
      	at org.apache.maven.plugin.surefire.AbstractSurefireMojo.getEffectiveJvm(AbstractSurefireMojo.java:2107)
      	at org.apache.maven.plugin.surefire.AbstractSurefireMojo.getForkConfiguration(AbstractSurefireMojo.java:1976)
      	at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1111)
      	at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:954)
      	at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:832)
      	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
      	... 21 more
      
      

      To reproduce, checkout te Hibernate Search project:

      But I believe it doesn't matter which project and/or settings are being used.

      For the record, I was using git commit id cda6a02d1 - which coincidentally was about upgrading to latest surefire version.
      The parent commit 451449cac seems unaffected.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            tibordigana Tibor Digana
            sanne Sanne Grinovero
            Votes:
            2 Vote for this issue
            Watchers:
            9 Stop watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment