java.lang.NullPointerException

Jenkins JIRA | Cees Bos | 7 years ago
  1. 0

    [...] Deploying the main artifact eu.educator.ws-3.0.0-SNAPSHOT.jar [INFO ] Retrieving previous build number from [INFO ] Retrieving previous metadata from [INFO ] Uploading repository metadata for: 'artifact eu.educator:eu.educator.ws' [INFO ] Retrieving previous metadata from [INFO ] Uploading repository metadata for: 'snapshot eu.educator:eu.educator.ws:3.0.0-SNAPSHOT' [INFO ] Uploading project information for eu.educator.ws 3.0.0-SNAPSHOT [WARNINGS] Parsing warnings in console log... [WARNINGS] Found 0 annotations (0 new, 0 high, 0 normal, 0 low) [WARNINGS] Not changing build status, since no threshold has been exceeded FATAL: null java.lang.NullPointerException at java.lang.String.replace(String.java:2208) at hudson.plugins.descriptionsetter.DescriptionSetterPublisher.getExpandedDescription(DescriptionSetterPublisher.java:157) at hudson.plugins.descriptionsetter.DescriptionSetterPublisher.perform(DescriptionSetterPublisher.java:80) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:577) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:563) at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:594) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:535) at hudson.model.Run.run(Run.java:1199) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:304) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:123) Used expression: (Total time: \d+ minutes \d+ seconds)|(Build timed out. Aborting) Text which should be matched: [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESSFUL [INFO] ------------------------------------------------------------------------ [INFO] Total time: 11 minutes 53 seconds [INFO] Finished at: Tue Dec 01 09:21:04 CET 2009 [INFO] Final Memory: 272M/508M [INFO] ------------------------------------------------------------------------

    Jenkins JIRA | 7 years ago | Cees Bos
    java.lang.NullPointerException
  2. 0

    [...] Deploying the main artifact eu.educator.ws-3.0.0-SNAPSHOT.jar [INFO ] Retrieving previous build number from [INFO ] Retrieving previous metadata from [INFO ] Uploading repository metadata for: 'artifact eu.educator:eu.educator.ws' [INFO ] Retrieving previous metadata from [INFO ] Uploading repository metadata for: 'snapshot eu.educator:eu.educator.ws:3.0.0-SNAPSHOT' [INFO ] Uploading project information for eu.educator.ws 3.0.0-SNAPSHOT [WARNINGS] Parsing warnings in console log... [WARNINGS] Found 0 annotations (0 new, 0 high, 0 normal, 0 low) [WARNINGS] Not changing build status, since no threshold has been exceeded FATAL: null java.lang.NullPointerException at java.lang.String.replace(String.java:2208) at hudson.plugins.descriptionsetter.DescriptionSetterPublisher.getExpandedDescription(DescriptionSetterPublisher.java:157) at hudson.plugins.descriptionsetter.DescriptionSetterPublisher.perform(DescriptionSetterPublisher.java:80) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:577) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:563) at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:594) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:535) at hudson.model.Run.run(Run.java:1199) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:304) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:123) Used expression: (Total time: \d+ minutes \d+ seconds)|(Build timed out. Aborting) Text which should be matched: [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESSFUL [INFO] ------------------------------------------------------------------------ [INFO] Total time: 11 minutes 53 seconds [INFO] Finished at: Tue Dec 01 09:21:04 CET 2009 [INFO] Final Memory: 272M/508M [INFO] ------------------------------------------------------------------------

    Jenkins JIRA | 7 years ago | Cees Bos
    java.lang.NullPointerException
  3. 0

    If my regex is: ^URL: (\S)+( .*)?$ And my replacement text is: <a href="\1">My URL\2</a> It is possible that the regex can succeed and the matcher.group(2) will be null. If that happens the description setter fails like this: ERROR: Publisher hudson.plugins.descriptionsetter.DescriptionSetterPublisher aborted due to exception java.lang.NullPointerException at java.lang.String.replace(String.java:2208) at hudson.plugins.descriptionsetter.DescriptionSetterPublisher.getExpandedDescription(DescriptionSetterPublisher.java:158) at hudson.plugins.descriptionsetter.DescriptionSetterPublisher.perform(DescriptionSetterPublisher.java:80) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:644) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:623) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:601) at hudson.model.Build$RunnerImpl.post2(Build.java:159) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:570) at hudson.model.Run.run(Run.java:1386) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:145) This can probably be fixed by changing: result = result.replace("\\" + i, matcher.group(i)) to result = result.replace("\\" + i, matcher.group(i) == null ? '' : matcher.group(i)) But I haven't actually checked it.

    Jenkins JIRA | 6 years ago | pgweiss
    java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    If my regex is: ^URL: (\S)+( .*)?$ And my replacement text is: <a href="\1">My URL\2</a> It is possible that the regex can succeed and the matcher.group(2) will be null. If that happens the description setter fails like this: ERROR: Publisher hudson.plugins.descriptionsetter.DescriptionSetterPublisher aborted due to exception java.lang.NullPointerException at java.lang.String.replace(String.java:2208) at hudson.plugins.descriptionsetter.DescriptionSetterPublisher.getExpandedDescription(DescriptionSetterPublisher.java:158) at hudson.plugins.descriptionsetter.DescriptionSetterPublisher.perform(DescriptionSetterPublisher.java:80) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:644) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:623) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:601) at hudson.model.Build$RunnerImpl.post2(Build.java:159) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:570) at hudson.model.Run.run(Run.java:1386) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:145) This can probably be fixed by changing: result = result.replace("\\" + i, matcher.group(i)) to result = result.replace("\\" + i, matcher.group(i) == null ? '' : matcher.group(i)) But I haven't actually checked it.

    Jenkins JIRA | 6 years ago | pgweiss
    java.lang.NullPointerException

  1. bpbhat77 6 times, last 2 months ago
  2. abrazeneb 3 times, last 5 months ago
4 unregistered visitors
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.lang.String.replace()
  2. Java RT
    String.replace
    1. java.lang.String.replace(String.java:2208)
    1 frame
  3. hudson.plugins.descriptionsetter
    DescriptionSetterPublisher.perform
    1. hudson.plugins.descriptionsetter.DescriptionSetterPublisher.getExpandedDescription(DescriptionSetterPublisher.java:157)
    2. hudson.plugins.descriptionsetter.DescriptionSetterPublisher.perform(DescriptionSetterPublisher.java:80)
    2 frames
  4. Hudson
    AbstractBuild$AbstractRunner.performAllBuildStep
    1. hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
    2. hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:577)
    3. hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:563)
    3 frames
  5. Hudson Maven Embedder
    MavenModuleSetBuild$RunnerImpl.post2
    1. hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:594)
    1 frame
  6. Hudson
    Run.run
    1. hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:535)
    2. hudson.model.Run.run(Run.java:1199)
    2 frames
  7. Hudson Maven Embedder
    MavenModuleSetBuild.run
    1. hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:304)
    1 frame
  8. Hudson
    Executor.run
    1. hudson.model.ResourceController.execute(ResourceController.java:88)
    2. hudson.model.Executor.run(Executor.java:123)
    2 frames