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

NullPointerException when generating a test report

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 3.5.0
    • None
    • None

    Description

      I am getting NullPointerException when trying to generate test report.

      The problem is NOT reproducible with version 3.4.0.

       

      Step to reproduce:

      1. `git clone git@github.com:selenide-examples/cucumber.git`
      2. `mvn surefire-report:report -Dselenide.headless=true -e`

      Result:

      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-report-plugin:3.5.0:report-only (default-cli) on project selenide-cucumber: Execution default-cli of goal org.apache.maven.plugins:maven-surefire-report-plugin:3.5.0:report-only failed: Cannot invoke "Object.toString()" because "value" is null -> [Help 1]
      org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-surefire-report-plugin:3.5.0:report-only (default-cli) on project selenide-cucumber: Execution default-cli of goal org.apache.maven.plugins:maven-surefire-report-plugin:3.5.0:report-only failed: Cannot invoke "Object.toString()" because "value" is null
          at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:333)
          at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
          at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
          at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
          at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
          at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
          at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
          at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
          at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
          at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
          at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
          at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
          at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
          at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke (Method.java:569)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:255)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:201)
          at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:361)
          at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:314)
      Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal org.apache.maven.plugins:maven-surefire-report-plugin:3.5.0:report-only failed: Cannot invoke "Object.toString()" because "value" is null
          at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:133)
          at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328)
          at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
          at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
          at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
          at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
          at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
          at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
          at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
          at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
          at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
          at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
          at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
          at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
          at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke (Method.java:569)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:255)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:201)
          at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:361)
          at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:314)
      Caused by: java.lang.NullPointerException: Cannot invoke "Object.toString()" because "value" is null
          at org.apache.maven.doxia.sink.impl.SinkUtils.getAttributeString (SinkUtils.java:188)
          at org.apache.maven.doxia.sink.impl.AbstractXmlSink.writeStartTag (AbstractXmlSink.java:126)
          at org.apache.maven.doxia.sink.impl.Xhtml5BaseSink.writeStartTag (Xhtml5BaseSink.java:1647)
          at org.apache.maven.doxia.sink.impl.AbstractXmlSink.writeStartTag (AbstractXmlSink.java:95)
          at org.apache.maven.doxia.sink.impl.Xhtml5BaseSink.anchor (Xhtml5BaseSink.java:1204)
          at org.apache.maven.doxia.sink.impl.AbstractSink.anchor (AbstractSink.java:354)
          at org.apache.maven.reporting.AbstractMavenReportRenderer.startSection (AbstractMavenReportRenderer.java:132)
          at org.apache.maven.reporting.AbstractMavenReportRenderer.startSection (AbstractMavenReportRenderer.java:116)
          at org.apache.maven.plugins.surefire.report.SurefireReportRenderer.renderSectionPackages (SurefireReportRenderer.java:220)
          at org.apache.maven.plugins.surefire.report.SurefireReportRenderer.renderBody (SurefireReportRenderer.java:119)
          at org.apache.maven.reporting.AbstractMavenReportRenderer.render (AbstractMavenReportRenderer.java:93)
          at org.apache.maven.plugins.surefire.report.AbstractSurefireReport.executeReport (AbstractSurefireReport.java:159)
          at org.apache.maven.reporting.AbstractMavenReport.generate (AbstractMavenReport.java:354)
          at org.apache.maven.reporting.AbstractMavenReport.reportToSite (AbstractMavenReport.java:262)
          at org.apache.maven.reporting.AbstractMavenReport.execute (AbstractMavenReport.java:208)
          at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
          at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328)
          at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
          at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
          at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
          at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
          at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
          at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
          at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
          at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
          at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
          at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
          at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
          at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
          at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke (Method.java:569)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:255)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:201)
          at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:361)
          at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:314)
      [ERROR] 
      [ERROR] Re-run Maven using the -X switch to enable full debug logging.
      [ERROR] 
      [ERROR] For more information about the errors and possible solutions, please read the following articles:
      [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              asolntsev Andrei Solntsev
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: