SVN update fails with NullpointerException

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Symptoms

Performing a build fails with the exception below:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 2009-01-08 08:09:47,109 WARN [BAM::appstack-build.srv.ambientia.fi::Agent] [BuildAgentControllerImpl] Error occurred while executing the build for LVI-ADMIN-12077 com.atlassian.bamboo.repository.RepositoryException: Unable to retrieve source code to '75994' for 'LVI-ADMIN' at com.atlassian.bamboo.repository.svn.SvnRepository.retrieveSourceCode(SvnRepository.java:372) at com.atlassian.bamboo.v2.build.task.CheckoutUpdateForBuild.call(CheckoutUpdateForBuild.java:94) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:192) at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:89) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:105) at com.atlassian.bamboo.build.pipeline.concurrent.NamedThreadFactory$1.run(NamedThreadFactory.java:32) at edu.emory.mathcs.backport.java.util.concurrent.helpers.ThreadHelpers$1.run(ThreadHelpers.java:34) at java.lang.Thread.run(Thread.java:595) Caused by: org.tmatesoft.svn.core.SVNException: svn: Error while dispatching event: null at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:64) at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:51) at org.tmatesoft.svn.core.internal.io.svn.SVNEditModeReader.driveEditor(SVNEditModeReader.java:231) at org.tmatesoft.svn.core.internal.io.svn.SVNRepositoryImpl.update(SVNRepositoryImpl.java:1481) at org.tmatesoft.svn.core.wc.SVNUpdateClient.doUpdate(SVNUpdateClient.java:446) at com.atlassian.bamboo.repository.svn.SvnRepository.update(SvnRepository.java:814) at com.atlassian.bamboo.repository.svn.SvnRepository.retreiveSourceCodeWithException(SvnRepository.java:412) at com.atlassian.bamboo.repository.svn.SvnRepository.retrieveSourceCode(SvnRepository.java:333) ... 7 more Caused by: java.lang.NullPointerException at com.atlassian.bamboo.repository.svn.UpdateEventHandler.handleEvent(UpdateEventHandler.java:149) at org.tmatesoft.svn.core.wc.SVNBasicClient.dispatchEvent(SVNBasicClient.java:365) at org.tmatesoft.svn.core.wc.SVNBasicClient.handleEvent(SVNBasicClient.java:428) at org.tmatesoft.svn.core.internal.wc.admin.SVNWCAccess.handleEvent(SVNWCAccess.java:94) at org.tmatesoft.svn.core.internal.wc.admin.SVNWCAccess.handleEvent(SVNWCAccess.java:78) at org.tmatesoft.svn.core.internal.wc.SVNUpdateEditor.openFile(SVNUpdateEditor.java:984) at org.tmatesoft.svn.core.internal.wc.SVNUpdateEditor.openFile(SVNUpdateEditor.java:542) at org.tmatesoft.svn.core.internal.wc.SVNCancellableEditor.openFile(SVNCancellableEditor.java:113) at org.tmatesoft.svn.core.internal.io.svn.SVNEditModeReader.processCommand(SVNEditModeReader.java:149) at org.tmatesoft.svn.core.internal.io.svn.SVNEditModeReader.driveEditor(SVNEditModeReader.java:214) ... 12 more 2009-01-08 08:09:47,109 INFO [BAM::appstack-build.srv.ambientia.fi::Agent] [RemoteBuildResultProcessor] Build LVI-ADMIN-12077 completed on Bamboo agent. Sending results to server.

Cause

SVN issues a SKIP event which is skipping a file during the update process and the UpdateEventHandler thinks it must be an error and expects an error message coming with that event. The event does not contain an error message thus a NPE is thrown when trying to retrieve the 'message'

When SVNEvent has its action set to SKIP, it is not necessary that there will be an error message - skipping conflicting file is not actually an error, but rather expected behavior of update.

Resolution

Configure the plan to perform "clean checkout", this will remove all files from the working copy and avoid a conflict next time sources are checked out.

This issue has actually been resolved in Bamboo 2.2x. Atlassian recommends upgrading to the latest release for a proper fix.

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.