org.apache.maven.InternalErrorException: Internal error: java.lang.NullPointerException

Jenkins JIRA | Stanton Sievers | 4 years ago
  1. 0

    [JENKINS-17034] NullPointerException when publishing Checkstyle results - Jenkins JIRA

    jenkins-ci.org | 1 year ago
    org.apache.maven.InternalErrorException: Internal error: java.lang.NullPointerException
  2. 0

    I upgraded my version of the Checkstyle plugin from 3.32 to 3.34 and started getting NullPointerExceptions when building the Apache Shindig project. The exception is coming from code that was introduced by this changeset: https://github.com/jenkinsci/checkstyle-plugin/commit/e79892bdb3873059ab04ad1e0569311262353f4c My guess is that "mojo.getConfigurationValue("outputFile", String.class)" is null or empty. I'm not sure what that should be returning or how it gets set in the environment. Have I missed some newly required configuration? Here's the NPE: mavenExecutionResult exceptions not empty message : Internal error: java.lang.NullPointerException cause : null Stack trace : org.apache.maven.InternalErrorException: Internal error: java.lang.NullPointerException at org.apache.maven.lifecycle.internal.BuilderCommon.handleBuildError(BuilderCommon.java:128) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:95) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:79) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239) at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:158) at hudson.maven.Maven3Builder.call(Maven3Builder.java:100) at hudson.maven.Maven3Builder.call(Maven3Builder.java:66) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:326) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722) Caused by: java.lang.NullPointerException at java.util.regex.Matcher.getTextLength(Matcher.java:1234) at java.util.regex.Matcher.reset(Matcher.java:308) at java.util.regex.Matcher.<init>(Matcher.java:228) at java.util.regex.Pattern.matcher(Pattern.java:1088) at hudson.FilePath.normalize(FilePath.java:250) at hudson.FilePath.<init>(FilePath.java:196) at hudson.plugins.checkstyle.CheckStyleReporter.getFileName(CheckStyleReporter.java:128) at hudson.plugins.checkstyle.CheckStyleReporter.perform(CheckStyleReporter.java:123) at hudson.plugins.analysis.core.HealthAwareReporter.postExecute(HealthAwareReporter.java:313) at hudson.maven.Maven3Builder$MavenExecutionListener.recordMojoEnded(Maven3Builder.java:453) at hudson.maven.Maven3Builder$MavenExecutionListener.mojoSucceeded(Maven3Builder.java:435) at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:87) at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:42) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:228) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) ... 24 more

    Jenkins JIRA | 4 years ago | Stanton Sievers
    org.apache.maven.InternalErrorException: Internal error: java.lang.NullPointerException
  3. 0

    [JENKINS-17034] NullPointerException when publishing Checkstyle results - Jenkins JIRA

    jenkins-ci.org | 6 months ago
    org.apache.maven.InternalErrorException: Internal error: java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    I upgraded my version of the Checkstyle plugin from 3.32 to 3.34 and started getting NullPointerExceptions when building the Apache Shindig project. The exception is coming from code that was introduced by this changeset: https://github.com/jenkinsci/checkstyle-plugin/commit/e79892bdb3873059ab04ad1e0569311262353f4c My guess is that "mojo.getConfigurationValue("outputFile", String.class)" is null or empty. I'm not sure what that should be returning or how it gets set in the environment. Have I missed some newly required configuration? Here's the NPE: mavenExecutionResult exceptions not empty message : Internal error: java.lang.NullPointerException cause : null Stack trace : org.apache.maven.InternalErrorException: Internal error: java.lang.NullPointerException at org.apache.maven.lifecycle.internal.BuilderCommon.handleBuildError(BuilderCommon.java:128) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:95) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:79) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239) at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:158) at hudson.maven.Maven3Builder.call(Maven3Builder.java:100) at hudson.maven.Maven3Builder.call(Maven3Builder.java:66) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:326) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722) Caused by: java.lang.NullPointerException at java.util.regex.Matcher.getTextLength(Matcher.java:1234) at java.util.regex.Matcher.reset(Matcher.java:308) at java.util.regex.Matcher.<init>(Matcher.java:228) at java.util.regex.Pattern.matcher(Pattern.java:1088) at hudson.FilePath.normalize(FilePath.java:250) at hudson.FilePath.<init>(FilePath.java:196) at hudson.plugins.checkstyle.CheckStyleReporter.getFileName(CheckStyleReporter.java:128) at hudson.plugins.checkstyle.CheckStyleReporter.perform(CheckStyleReporter.java:123) at hudson.plugins.analysis.core.HealthAwareReporter.postExecute(HealthAwareReporter.java:313) at hudson.maven.Maven3Builder$MavenExecutionListener.recordMojoEnded(Maven3Builder.java:453) at hudson.maven.Maven3Builder$MavenExecutionListener.mojoSucceeded(Maven3Builder.java:435) at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:87) at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:42) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:228) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) ... 24 more

    Jenkins JIRA | 4 years ago | Stanton Sievers
    org.apache.maven.InternalErrorException: Internal error: java.lang.NullPointerException
  6. 0

    Evver since upgrading the plugin to the latest version, all my projects (all using Jenkin's built-in Maven2 builder, haven't tried with other types of projects) fail with the following stacktrace. [JENKINS] Archiving redacted [INFO] ------------------------------------------------------------------------ [ERROR] FATAL ERROR [INFO] ------------------------------------------------------------------------ [INFO] null [INFO] ------------------------------------------------------------------------ [INFO] Trace java.lang.NullPointerException at java.util.regex.Matcher.getTextLength(Matcher.java:1140) at java.util.regex.Matcher.reset(Matcher.java:291) at java.util.regex.Matcher.<init>(Matcher.java:211) at java.util.regex.Pattern.matcher(Pattern.java:888) at hudson.FilePath.normalize(FilePath.java:248) at hudson.FilePath.<init>(FilePath.java:194) at hudson.plugins.findbugs.FindBugsReporter.getOutputPath(FindBugsReporter.java:180) at hudson.plugins.findbugs.FindBugsReporter.perform(FindBugsReporter.java:175) at hudson.plugins.analysis.core.HealthAwareReporter.postExecute(HealthAwareReporter.java:313) at hudson.maven.Maven2Builder.postExecute(Maven2Builder.java:155) at hudson.maven.MavenBuilder$Adapter.postExecute(MavenBuilder.java:310) at hudson.maven.agent.PluginManagerInterceptor$1MojoIntercepterImpl.callPost(PluginManagerInterceptor.java:170) at hudson.maven.agent.PluginManagerInterceptor.executeMojo(PluginManagerInterceptor.java:183) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) at org.apache.maven.lifecycle.LifecycleExecutorInterceptor.execute(LifecycleExecutorInterceptor.java:65) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at hudson.maven.agent.Main.launch(Main.java:185) at hudson.maven.MavenBuilder.call(MavenBuilder.java:151) at hudson.maven.Maven2Builder.call(Maven2Builder.java:77) at hudson.maven.Maven2Builder.call(Maven2Builder.java:53) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:326) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) The problem happens on both Jenkins 1.480.2 and 1.480.3.

    Jenkins JIRA | 4 years ago | Juan Sotuyo
    java.lang.NullPointerException
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.NullPointerException

    No message provided

    at java.util.regex.Matcher.getTextLength()
  2. Java RT
    Pattern.matcher
    1. java.util.regex.Matcher.getTextLength(Matcher.java:1234)
    2. java.util.regex.Matcher.reset(Matcher.java:308)
    3. java.util.regex.Matcher.<init>(Matcher.java:228)
    4. java.util.regex.Pattern.matcher(Pattern.java:1088)
    4 frames
  3. Hudson
    FilePath.<init>
    1. hudson.FilePath.normalize(FilePath.java:250)
    2. hudson.FilePath.<init>(FilePath.java:196)
    2 frames
  4. Checkstyle Plug-in
    CheckStyleReporter.perform
    1. hudson.plugins.checkstyle.CheckStyleReporter.getFileName(CheckStyleReporter.java:128)
    2. hudson.plugins.checkstyle.CheckStyleReporter.perform(CheckStyleReporter.java:123)
    2 frames
  5. Static Analysis Utilities
    HealthAwareReporter.postExecute
    1. hudson.plugins.analysis.core.HealthAwareReporter.postExecute(HealthAwareReporter.java:313)
    1 frame
  6. Hudson Maven Embedder
    Maven3Builder$MavenExecutionListener.mojoSucceeded
    1. hudson.maven.Maven3Builder$MavenExecutionListener.recordMojoEnded(Maven3Builder.java:453)
    2. hudson.maven.Maven3Builder$MavenExecutionListener.mojoSucceeded(Maven3Builder.java:435)
    2 frames
  7. Maven Core
    DefaultMaven.execute
    1. org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:87)
    2. org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:42)
    3. org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:228)
    4. org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    5. org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    6. org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
    7. org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
    8. org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
    9. org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
    10. org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
    11. org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
    11 frames
  8. M3 Interceptor
    Maven3Launcher.main
    1. org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:79)
    1 frame
  9. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:601)
    4 frames
  10. Plexus
    Launcher.launch
    1. org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329)
    2. org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239)
    2 frames
  11. M3 Agent
    Maven3Main.launch
    1. org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:158)
    1 frame
  12. Hudson Maven Embedder
    Maven3Builder.call
    1. hudson.maven.Maven3Builder.call(Maven3Builder.java:100)
    2. hudson.maven.Maven3Builder.call(Maven3Builder.java:66)
    2 frames
  13. Hudson :: Remoting Layer
    InterceptingExecutorService$1.call
    1. hudson.remoting.UserRequest.perform(UserRequest.java:118)
    2. hudson.remoting.UserRequest.perform(UserRequest.java:48)
    3. hudson.remoting.Request$2.run(Request.java:326)
    4. hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
    4 frames
  14. Java RT
    Thread.run
    1. java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    2. java.util.concurrent.FutureTask.run(FutureTask.java:166)
    3. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    4. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    5. java.lang.Thread.run(Thread.java:722)
    5 frames