Git plugin NPE while merging "onto null"

13 views
Skip to first unread message

Sami Tikka

unread,
Jun 6, 2011, 3:40:31 AM6/6/11
to jenkins...@googlegroups.com
Hello! I upgraded Jenkins 1.413 to 1.414. For some reason that
triggered one job to build and it fails with an interesting message:

Started by upstream project "tzimmotest" build number 28
Building remotely on buildserver-osx106
Checkout:osx106 /
/Users/autobuilder/hudson-slave/workspace/tzimmotest/label/osx106 -
hudson.remoting.Channel@7c20ba62:buildserver-osx106
Using strategy: Default
Last Built Revision: Revision 94c76c09f340af5da22862ee51072a085dfb1ca4
(origin/trunk_tzimmo)
Checkout:osx106 /
/Users/autobuilder/hudson-slave/workspace/tzimmotest/label/osx106 -
hudson.remoting.LocalChannel@72d37f4b
Cloning the remote Git repository
Cloning repository origin
Fetching upstream changes from ssh://fscvs.f-secure.com/share/git/tzimmotest.git
Cleaning workspace
Commencing build of Revision 94c76c09f340af5da22862ee51072a085dfb1ca4
(origin/trunk_tzimmo)
Merging Revision 94c76c09f340af5da22862ee51072a085dfb1ca4
(origin/trunk_tzimmo) onto null
FATAL: null
java.lang.NullPointerException
at hudson.plugins.git.opt.PreBuildMergeOptions.getRemoteBranchName(PreBuildMergeOptions.java:41)
at hudson.plugins.git.GitSCM$3.invoke(GitSCM.java:1057)
at hudson.plugins.git.GitSCM$3.invoke(GitSCM.java:1040)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:1980)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:270)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
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:680)


This is a job we have been using to try pre-tested commit workflow.

The <scm> section of config.xml looks like this:

<scm class="hudson.plugins.git.GitSCM">
<configVersion>1</configVersion>
<userRemoteConfigs>
<hudson.plugins.git.UserRemoteConfig>
<name>origin</name>
<refspec>+refs/heads/*:refs/remotes/origin/*</refspec>
<url>ssh://SERVERNAME/share/git/tzimmotest.git</url>
</hudson.plugins.git.UserRemoteConfig>
</userRemoteConfigs>
<branches>
<hudson.plugins.git.BranchSpec>
<name>origin/trunk_**</name>
</hudson.plugins.git.BranchSpec>
</branches>
<userMergeOptions>
<mergeRemote>origin/master</mergeRemote>
<mergeTarget>master</mergeTarget>
</userMergeOptions>
<recursiveSubmodules>false</recursiveSubmodules>
<doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
<authorOrCommitter>false</authorOrCommitter>
<clean>true</clean>
<wipeOutWorkspace>false</wipeOutWorkspace>
<pruneBranches>false</pruneBranches>
<buildChooser class="hudson.plugins.git.util.DefaultBuildChooser"/>
<gitTool>Default</gitTool>
<submoduleCfg class="list"/>
<relativeTargetDir></relativeTargetDir>
<excludedRegions></excludedRegions>
<excludedUsers></excludedUsers>
<skipTag>false</skipTag>
</scm>

I tried to clean the workspace and trigger a new build but it still
fails with the same message.

I'm a bit lost. Can anyone spot anything obviously wrong or can anyone
suggest how to debug this problem further.

-- Sami

Nigel Magnay

unread,
Jun 6, 2011, 4:04:44 AM6/6/11
to jenkins...@googlegroups.com
I *think* that <mergeRemote> is suspect - it's failing when it's trying to work out the name of the branch name. The remote name should be 'origin' and the merge target should be 'master' - but - mergeRemote is an RemoteConfig object, which has many fields.

I'd try removing the merge option - saving - and re-adding it to check what the config xml does.
Reply all
Reply to author
Forward
0 new messages