[JIRA] [accurev-plugin] (JENKINS-31316) AccuRev plugin throws NullPointerException on server rename

1 view
Skip to first unread message

koarth@hotmail.ca (JIRA)

unread,
Oct 30, 2015, 11:07:01 AM10/30/15
to jenkinsc...@googlegroups.com
Dylan Walker created an issue
 
Jenkins / Bug JENKINS-31316
AccuRev plugin throws NullPointerException on server rename
Issue Type: Bug Bug
Assignee: Scott Tatum
Components: accurev-plugin
Created: 30/Oct/15 3:06 PM
Environment: Ubuntu 12.04.5 LTS 64-bit
Jenkins 1.635
AccuRev Plugin 0.6.35
Priority: Major Major
Reporter: Dylan Walker

When an AccuRev server is renamed in the global system settings, configurations for existing jobs retain the old server name, and throw a NullPointerException when run:

Building in workspace /var/lib/jenkins/workspace/1.9.X.X_NIGHTLY_client
FATAL: null
java.lang.NullPointerException
at hudson.plugins.accurev.FindAccurevClientExe.invoke(FindAccurevClientExe.java:69)
at hudson.plugins.accurev.FindAccurevClientExe.invoke(FindAccurevClientExe.java:13)
at hudson.FilePath.act(FilePath.java:991)
at hudson.FilePath.act(FilePath.java:969)
at hudson.plugins.accurev.AccurevSCM.checkout(AccurevSCM.java:503)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1275)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:610)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:532)
at hudson.model.Run.execute(Run.java:1741)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
Skipped archiving because build is not successful
[WS-CLEANUP] Deleting project workspace...[WS-CLEANUP] done
Finished: FAILURE

This continues until the server name is reverted, or the job configuration is manually updated with the new server name.

Major because:

  • Can break a large number of existing jobs.
  • Stack trace is quite misleading - it took me a long time to nail down the root cause of the exception.
  • Zero information from the plugin is logged to jenkins.log

This case should be handled, or give a relevant error message when a job's AccuRev configuration is invalid.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

josephp90@gmail.com (JIRA)

unread,
Sep 21, 2016, 1:28:02 PM9/21/16
to jenkinsc...@googlegroups.com
Joseph Petersen assigned an issue to Joseph Petersen
Change By: Joseph Petersen
Assignee: Scott Tatum Joseph Petersen
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

josephp90@gmail.com (JIRA)

unread,
Sep 22, 2016, 11:04:01 AM9/22/16
to jenkinsc...@googlegroups.com
Joseph Petersen started work on Bug JENKINS-31316
 
Change By: Joseph Petersen
Status: Open In Progress

josephp90@gmail.com (JIRA)

unread,
Sep 22, 2016, 11:06:01 AM9/22/16
to jenkinsc...@googlegroups.com
Joseph Petersen commented on Bug JENKINS-31316
 
Re: AccuRev plugin throws NullPointerException on server rename

PR #28 includes fix to server rename, by adding unique identifier.

scm_issue_link@java.net (JIRA)

unread,
Sep 28, 2016, 11:14:03 AM9/28/16
to jenkinsc...@googlegroups.com

Code changed in jenkins
User: Joseph
Path:
src/main/java/hudson/plugins/accurev/AccurevLauncher.java
src/main/java/hudson/plugins/accurev/AccurevPlugin.java
src/main/java/hudson/plugins/accurev/AccurevSCM.java
src/main/java/hudson/plugins/accurev/AccurevStream.java
src/main/java/hudson/plugins/accurev/AccurevTransaction.java
src/main/java/hudson/plugins/accurev/ParseChangeLog.java
src/main/java/hudson/plugins/accurev/UUIDUtils.java
src/main/java/hudson/plugins/accurev/cmd/Login.java
src/main/java/hudson/plugins/accurev/cmd/PopulateCmd.java
src/main/java/hudson/plugins/accurev/cmd/ShowStreams.java
src/main/java/hudson/plugins/accurev/delegates/AbstractModeDelegate.java
src/main/java/hudson/plugins/accurev/delegates/ReftreeDelegate.java
src/main/java/hudson/plugins/accurev/delegates/SnapshotDelegate.java
src/main/java/hudson/plugins/accurev/delegates/WorkspaceDelegate.java
src/main/java/hudson/plugins/accurev/parsers/xml/ParseShowStreams.java
src/main/java/hudson/plugins/jetty/security/Password.java
src/main/resources/hudson/plugins/accurev/AccurevSCM/config.jelly
src/main/resources/hudson/plugins/accurev/AccurevSCM/global.jelly
http://jenkins-ci.org/commit/accurev-plugin/b8296bb9c55c924f48c91356fe9ba7d9e35d4298
Log:
Merged PR #28 from casz/master

Poll failed searching in parents when “Show one stream at a time” was
checked.
Fixed regression in PR #25

  • Improved logic for Workspace

Was not working with “One stream at a time” settings.

  • Fixed Change log on Ignore Parent

getChangesFromStreams did not respect Ignore Stream Parent.

  • Fixed getStreamRules.

IgnoreStreamParent should be the first to be considered, then One
Stream at a time on server, then find all streams.

Introduced unique identifiers, also added a migrator to ensure best
compatibility moving forward.

  • Fixed backwards compatibility

Made the Server UUID change fully backwards compatibility :tada:

I cannot believe this has been open since 2012...

  • StringUtils used
  • Allow empty password even with OBF
  • Javadoc and removed unused migrate field

These usually originate from accurev sync.

  • PR #24 fix PollOnMaster enabled when build using workspace

builds that use workspace or reftree definitely requires workspace even
if PollOnMaster enabled.

scm_issue_link@java.net (JIRA)

unread,
Oct 4, 2016, 6:04:07 AM10/4/16
to jenkinsc...@googlegroups.com

Code changed in jenkins
User: Joseph
Path:

src/main/java/hudson/plugins/accurev/AccurevSCM.java
http://jenkins-ci.org/commit/accurev-plugin/a3d11a023425c41ad0cbaa971081246583c2fb05
Log:
JENKINS-31316 fix remaining serverName usage (#31)

josephp90@gmail.com (JIRA)

unread,
Oct 4, 2016, 7:44:02 AM10/4/16
to jenkinsc...@googlegroups.com

Latest code change finally fixes it completely I will release a new version shortly (within 1 week) to fix this issue.

josephp90@gmail.com (JIRA)

unread,
Oct 14, 2016, 1:54:03 PM10/14/16
to jenkinsc...@googlegroups.com

josephp90@gmail.com (JIRA)

unread,
Oct 14, 2016, 1:55:01 PM10/14/16
to jenkinsc...@googlegroups.com
 

This is fixed in latest release.

Change By: Joseph Petersen
Status: In Review Resolved
Resolution: Fixed

josephp90@gmail.com (JIRA)

unread,
Mar 7, 2020, 1:08:16 AM3/7/20
to jenkinsc...@googlegroups.com
Joseph Petersen assigned an issue to Joseph Petersen
Change By: Joseph Petersen
Assignee: Joseph Petersen (old)
This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages