java.lang.NullPointerException

Jenkins JIRA | redsolo | 9 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Currently the Hudson maven job is failing due to a maven dependency problem. Besides that I saw that the emai-ext is throwing an NPE when retrieving the content: Steps to reproduce: 1. Create a maven job with email-ext plugin enabled 2. Create a pom.xml that depends on a maven lib that doesnt exist (to provoke the error) 3. Build the job Expected outcome: A mail is sent according to the email-ext configuration Actual outcome: NPE in console: started Updating https://hudson.dev.java.net/svn/hudson/trunk/hudson/plugins U data/jobs/Hudson plugins/workspace/tfs/src/main/java/hudson/plugins/tfs/TfTool.java At revision 11450 Parsing POMs ERROR: Failed to parse POMs org.apache.maven.project.ProjectBuildingException: Cannot find parent: org.jvnet.hudson:hudson for project: org.jvnet.hudson.plugins:plugin:pom:1.247 for project org.jvnet.hudson.plugins:plugin:pom:1.247 at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(DefaultMavenProjectBuilder.java:1370) at org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(DefaultMavenProjectBuilder.java:821) at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileInternal(DefaultMavenProjectBuilder.java:506) at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:215) at hudson.maven.MavenEmbedder.readProject(MavenEmbedder.java:304) at hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:685) at hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:633) at hudson.FilePath.act(FilePath.java:319) at hudson.maven.MavenModuleSetBuild$RunnerImpl.parsePoms(MavenModuleSetBuild.java:383) at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:284) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:231) at hudson.model.Run.run(Run.java:786) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:204) at hudson.model.ResourceController.execute(ResourceController.java:70) at hudson.model.Executor.run(Executor.java:88) Caused by: org.apache.maven.project.ProjectBuildingException: POM 'org.jvnet.hudson:hudson' not found in repository: Unable to download the artifact from any repository org.jvnet.hudson:hudson:pom:1.6 from the specified remote repositories: org.apache (http://people.apache.org/repo/m2-snapshot-repository), central (http://repo1.maven.org/maven2) for project org.jvnet.hudson:hudson at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:603) at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(DefaultMavenProjectBuilder.java:1366) ... 14 more Caused by: org.apache.maven.artifact.resolver.ArtifactNotFoundException: Unable to download the artifact from any repository org.jvnet.hudson:hudson:pom:1.6 from the specified remote repositories: org.apache (http://people.apache.org/repo/m2-snapshot-repository), central (http://repo1.maven.org/maven2) at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:212) at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:74) at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:556) ... 15 more Caused by: org.apache.maven.wagon.ResourceDoesNotExistException: Unable to download the artifact from any repository at org.apache.maven.artifact.manager.DefaultWagonManager.getArtifact(DefaultWagonManager.java:331) at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:200) ... 17 more [WARNINGS] Parsing warnings in log file... [WARNINGS] No annotations have been found. Email was triggered for: Failure There are 1 triggered emails. Sending email for trigger: Failure FATAL: null java.lang.NullPointerException at hudson.plugins.emailext.plugins.content.HudsonURLContent.getContent(HudsonURLContent.java:20) at hudson.plugins.emailext.ExtendedEmailPublisher.replaceTokensWithContent(ExtendedEmailPublisher.java:360) at hudson.plugins.emailext.ExtendedEmailPublisher.replaceTokensWithContent(ExtendedEmailPublisher.java:362) at hudson.plugins.emailext.ExtendedEmailPublisher.transformText(ExtendedEmailPublisher.java:340) at hudson.plugins.emailext.ExtendedEmailPublisher.createMail(ExtendedEmailPublisher.java:295) at hudson.plugins.emailext.ExtendedEmailPublisher.sendMail(ExtendedEmailPublisher.java:265) at hudson.plugins.emailext.ExtendedEmailPublisher._perform(ExtendedEmailPublisher.java:257) at hudson.plugins.emailext.ExtendedEmailPublisher.perform(ExtendedEmailPublisher.java:215) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:309) at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:446) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:282) at hudson.model.Run.run(Run.java:804) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:204) at hudson.model.ResourceController.execute(ResourceController.java:70) at hudson.model.Executor.run(Executor.java:88) Stack

    Jenkins JIRA | 9 years ago | redsolo
    java.lang.NullPointerException
  2. 0

    Currently the Hudson maven job is failing due to a maven dependency problem. Besides that I saw that the emai-ext is throwing an NPE when retrieving the content: Steps to reproduce: 1. Create a maven job with email-ext plugin enabled 2. Create a pom.xml that depends on a maven lib that doesnt exist (to provoke the error) 3. Build the job Expected outcome: A mail is sent according to the email-ext configuration Actual outcome: NPE in console: started Updating https://hudson.dev.java.net/svn/hudson/trunk/hudson/plugins U data/jobs/Hudson plugins/workspace/tfs/src/main/java/hudson/plugins/tfs/TfTool.java At revision 11450 Parsing POMs ERROR: Failed to parse POMs org.apache.maven.project.ProjectBuildingException: Cannot find parent: org.jvnet.hudson:hudson for project: org.jvnet.hudson.plugins:plugin:pom:1.247 for project org.jvnet.hudson.plugins:plugin:pom:1.247 at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(DefaultMavenProjectBuilder.java:1370) at org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(DefaultMavenProjectBuilder.java:821) at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileInternal(DefaultMavenProjectBuilder.java:506) at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:215) at hudson.maven.MavenEmbedder.readProject(MavenEmbedder.java:304) at hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:685) at hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:633) at hudson.FilePath.act(FilePath.java:319) at hudson.maven.MavenModuleSetBuild$RunnerImpl.parsePoms(MavenModuleSetBuild.java:383) at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:284) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:231) at hudson.model.Run.run(Run.java:786) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:204) at hudson.model.ResourceController.execute(ResourceController.java:70) at hudson.model.Executor.run(Executor.java:88) Caused by: org.apache.maven.project.ProjectBuildingException: POM 'org.jvnet.hudson:hudson' not found in repository: Unable to download the artifact from any repository org.jvnet.hudson:hudson:pom:1.6 from the specified remote repositories: org.apache (http://people.apache.org/repo/m2-snapshot-repository), central (http://repo1.maven.org/maven2) for project org.jvnet.hudson:hudson at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:603) at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(DefaultMavenProjectBuilder.java:1366) ... 14 more Caused by: org.apache.maven.artifact.resolver.ArtifactNotFoundException: Unable to download the artifact from any repository org.jvnet.hudson:hudson:pom:1.6 from the specified remote repositories: org.apache (http://people.apache.org/repo/m2-snapshot-repository), central (http://repo1.maven.org/maven2) at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:212) at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:74) at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:556) ... 15 more Caused by: org.apache.maven.wagon.ResourceDoesNotExistException: Unable to download the artifact from any repository at org.apache.maven.artifact.manager.DefaultWagonManager.getArtifact(DefaultWagonManager.java:331) at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:200) ... 17 more [WARNINGS] Parsing warnings in log file... [WARNINGS] No annotations have been found. Email was triggered for: Failure There are 1 triggered emails. Sending email for trigger: Failure FATAL: null java.lang.NullPointerException at hudson.plugins.emailext.plugins.content.HudsonURLContent.getContent(HudsonURLContent.java:20) at hudson.plugins.emailext.ExtendedEmailPublisher.replaceTokensWithContent(ExtendedEmailPublisher.java:360) at hudson.plugins.emailext.ExtendedEmailPublisher.replaceTokensWithContent(ExtendedEmailPublisher.java:362) at hudson.plugins.emailext.ExtendedEmailPublisher.transformText(ExtendedEmailPublisher.java:340) at hudson.plugins.emailext.ExtendedEmailPublisher.createMail(ExtendedEmailPublisher.java:295) at hudson.plugins.emailext.ExtendedEmailPublisher.sendMail(ExtendedEmailPublisher.java:265) at hudson.plugins.emailext.ExtendedEmailPublisher._perform(ExtendedEmailPublisher.java:257) at hudson.plugins.emailext.ExtendedEmailPublisher.perform(ExtendedEmailPublisher.java:215) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:309) at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:446) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:282) at hudson.model.Run.run(Run.java:804) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:204) at hudson.model.ResourceController.execute(ResourceController.java:70) at hudson.model.Executor.run(Executor.java:88) Stack

    Jenkins JIRA | 9 years ago | redsolo
    java.lang.NullPointerException
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    List of plugins used in project: multiple-scms mercurial subversion nant sonar flexible-publish email-ext I perform a fairly simple build, use the flexible-plugin to only archive on success and then send an email. Without "attach build log" checked everything works, with it checked I get the following error: Run condition [Current build status] enabling perform for step [Archive the artifacts] Archiving artifacts Checking for post-build Performing post-build step Checking if email needs to be generated Email was triggered for: Success Sending email for trigger: Success NOT overriding default server settings, using Mailer to create session messageContentType = text/plain; charset=UTF-8 Request made to attach build log Adding recipients from recipient list Successfully created MimeMessage Sending email to: MY.USERNAME@MYPLACEOFEMPLOYMENT.com ERROR: Could not send email as a part of the post-build publishers. java.lang.NullPointerException at hudson.plugins.emailext.ExtendedEmailPublisher.sendMail(ExtendedEmailPublisher.java:311) at hudson.plugins.emailext.ExtendedEmailPublisher._perform(ExtendedEmailPublisher.java:289) at hudson.plugins.emailext.ExtendedEmailPublisher.perform(ExtendedEmailPublisher.java:249) at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:718) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:693) at hudson.model.Build$BuildExecution.cleanUp(Build.java:192) at hudson.model.Run.execute(Run.java:1546) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:237) Some error occured trying to send the email...check the Jenkins log

    Jenkins JIRA | 4 years ago | Mark Orchard
    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 hudson.plugins.emailext.plugins.content.HudsonURLContent.getContent()
    2. Hudson Email Extension Plugin
      ExtendedEmailPublisher.perform
      1. hudson.plugins.emailext.plugins.content.HudsonURLContent.getContent(HudsonURLContent.java:20)
      2. hudson.plugins.emailext.ExtendedEmailPublisher.replaceTokensWithContent(ExtendedEmailPublisher.java:360)
      3. hudson.plugins.emailext.ExtendedEmailPublisher.replaceTokensWithContent(ExtendedEmailPublisher.java:362)
      4. hudson.plugins.emailext.ExtendedEmailPublisher.transformText(ExtendedEmailPublisher.java:340)
      5. hudson.plugins.emailext.ExtendedEmailPublisher.createMail(ExtendedEmailPublisher.java:295)
      6. hudson.plugins.emailext.ExtendedEmailPublisher.sendMail(ExtendedEmailPublisher.java:265)
      7. hudson.plugins.emailext.ExtendedEmailPublisher._perform(ExtendedEmailPublisher.java:257)
      8. hudson.plugins.emailext.ExtendedEmailPublisher.perform(ExtendedEmailPublisher.java:215)
      8 frames
    3. Hudson
      AbstractBuild$AbstractRunner.performAllBuildStep
      1. hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:309)
      1 frame
    4. Hudson Maven Embedder
      MavenModuleSetBuild$RunnerImpl.post2
      1. hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:446)
      1 frame
    5. Hudson
      Run.run
      1. hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:282)
      2. hudson.model.Run.run(Run.java:804)
      2 frames
    6. Hudson Maven Embedder
      MavenModuleSetBuild.run
      1. hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:204)
      1 frame
    7. Hudson
      Executor.run
      1. hudson.model.ResourceController.execute(ResourceController.java:70)
      2. hudson.model.Executor.run(Executor.java:88)
      2 frames