java.lang.RuntimeException: com.atlassian.bamboo.repository.RepositoryException: Runtime exception.

Atlassian JIRA | Rene Verschoor [Atlassian] | 7 months ago
  1. 0

    Tested against a Bitbucket Cloud repo. Source Code Checkout task in Deployment fails with: {noformat} simple 24-May-2016 17:39:12 Finished task 'Download release contents' with result: Success simple 24-May-2016 17:39:12 Starting task 'get Code' of type 'com.atlassian.bamboo.plugins.vcs:task.vcs.checkout' simple 24-May-2016 17:39:15 Updating source code to revision: 42b96809f4600841e8b369fe281eb2e12d9e5668 simple 24-May-2016 17:39:16 Updating source code to revision: 42b96809f4600841e8b369fe281eb2e12d9e5668 simple 24-May-2016 17:39:17 Updating source code to revision: 42b96809f4600841e8b369fe281eb2e12d9e5668 error 24-May-2016 17:39:17 Error occurred while running Task 'get Code(3)' of type com.atlassian.bamboo.plugins.vcs:task.vcs.checkout. error 24-May-2016 17:39:17 java.lang.RuntimeException: com.atlassian.bamboo.repository.RepositoryException: Runtime exception. error 24-May-2016 17:39:17 at com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(RetryingTaskExecutor.java:144) error 24-May-2016 17:39:17 at com.atlassian.bamboo.executor.RetryingTaskExecutor.runTask(RetryingTaskExecutor.java:88) error 24-May-2016 17:39:17 at com.atlassian.bamboo.executor.RetryingTaskExecutor.retry(RetryingTaskExecutor.java:203) error 24-May-2016 17:39:17 at com.atlassian.bamboo.executor.RetryingTaskExecutor.retry(RetryingTaskExecutor.java:188) error 24-May-2016 17:39:17 at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.execute(VcsCheckoutTask.java:144) error 24-May-2016 17:39:17 at com.atlassian.bamboo.task.TaskExecutorImpl.lambda$executeTasks$272(TaskExecutorImpl.java:317) error 24-May-2016 17:39:17 at com.atlassian.bamboo.task.TaskExecutorImpl$$Lambda$276/850358159.call(Unknown Source) error 24-May-2016 17:39:17 at com.atlassian.bamboo.task.TaskExecutorImpl.executeTaskWithPrePostActions(TaskExecutorImpl.java:246) error 24-May-2016 17:39:17 at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:317) error 24-May-2016 17:39:17 at com.atlassian.bamboo.task.TaskExecutorImpl.execute(TaskExecutorImpl.java:118) error 24-May-2016 17:39:17 at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:74) error 24-May-2016 17:39:17 at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:215) error 24-May-2016 17:39:17 at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl$1.call(BuildAgentControllerImpl.java:139) error 24-May-2016 17:39:17 at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl$1.call(BuildAgentControllerImpl.java:130) error 24-May-2016 17:39:17 at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:221) error 24-May-2016 17:39:17 at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:129) error 24-May-2016 17:39:17 at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:137) error 24-May-2016 17:39:17 at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:51) error 24-May-2016 17:39:17 at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31) error 24-May-2016 17:39:17 at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20) error 24-May-2016 17:39:17 at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:52) error 24-May-2016 17:39:17 at java.lang.Thread.run(Thread.java:745) error 24-May-2016 17:39:17 Caused by: com.atlassian.bamboo.repository.RepositoryException: Runtime exception. error 24-May-2016 17:39:17 at com.atlassian.bamboo.plugins.git.GitRepository.retrieveSourceCode(GitRepository.java:534) error 24-May-2016 17:39:17 at com.atlassian.bamboo.plugins.git.GitRepository.retrieveSourceCode(GitRepository.java:427) error 24-May-2016 17:39:17 at com.atlassian.bamboo.plugins.git.GitRepository.retrieveSourceCode(GitRepository.java:419) error 24-May-2016 17:39:17 at com.atlassian.bamboo.plugins.bitbucket.BitbucketRepository.retrieveSourceCode(BitbucketRepository.java:324) error 24-May-2016 17:39:17 at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.fillWorkingDirFromVcs(VcsCheckoutTask.java:295) error 24-May-2016 17:39:17 at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.access$000(VcsCheckoutTask.java:56) error 24-May-2016 17:39:17 at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask$1.call(VcsCheckoutTask.java:149) error 24-May-2016 17:39:17 at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask$1.call(VcsCheckoutTask.java:145) error 24-May-2016 17:39:17 at com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(RetryingTaskExecutor.java:108) error 24-May-2016 17:39:17 ... 21 more error 24-May-2016 17:39:17 Caused by: io.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.NullPointerException error 24-May-2016 17:39:17 at io.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:156) error 24-May-2016 17:39:17 at io.atlassian.util.concurrent.LazyReference.get(LazyReference.java:116) error 24-May-2016 17:39:17 at com.atlassian.bamboo.build.logger.BuildLoggerImpl.streamEntry(BuildLoggerImpl.java:73) error 24-May-2016 17:39:17 at com.atlassian.bamboo.build.logger.BuildLoggerImpl.onAddLogEntry(BuildLoggerImpl.java:61) error 24-May-2016 17:39:17 at com.atlassian.bamboo.build.logger.AbstractBuildLogger.addLogEntry(AbstractBuildLogger.java:153) error 24-May-2016 17:39:17 at com.atlassian.bamboo.build.logger.AbstractBuildLogger.addBuildLogEntry(AbstractBuildLogger.java:105) error 24-May-2016 17:39:17 at com.atlassian.bamboo.build.logger.AbstractBuildLogger.addBuildLogEntry(AbstractBuildLogger.java:163) error 24-May-2016 17:39:17 at com.atlassian.bamboo.plugins.git.GitRepository.rethrowOrRemoveDirectory(GitRepository.java:1179) error 24-May-2016 17:39:17 at com.atlassian.bamboo.plugins.git.GitRepository.access$000(GitRepository.java:109) error 24-May-2016 17:39:17 at com.atlassian.bamboo.plugins.git.GitRepository$2.call(GitRepository.java:479) error 24-May-2016 17:39:17 at com.atlassian.bamboo.plugins.git.GitRepository$2.call(GitRepository.java:464) error 24-May-2016 17:39:17 at io.atlassian.util.concurrent.ManagedLocks$ManagedLockImpl.withLock(ManagedLocks.java:293) error 24-May-2016 17:39:17 at com.atlassian.bamboo.plugins.git.GitRepository.retrieveSourceCode(GitRepository.java:463) error 24-May-2016 17:39:17 ... 29 more error 24-May-2016 17:39:17 Caused by: java.lang.NullPointerException error 24-May-2016 17:39:17 at com.atlassian.bamboo.storage.location.StorageLocationServiceImpl.getStorageLabel(StorageLocationServiceImpl.java:124) error 24-May-2016 17:39:17 at com.atlassian.bamboo.storage.location.StorageLocationServiceImpl.getBuildDataDirectory(StorageLocationServiceImpl.java:62) error 24-May-2016 17:39:17 at com.atlassian.bamboo.storage.location.StorageLocationServiceImpl.getBuildDownloadDataDirectory(StorageLocationServiceImpl.java:74) error 24-May-2016 17:39:17 at com.atlassian.bamboo.storage.location.StorageLocationServiceImpl.getBuildLogsDirectory(StorageLocationServiceImpl.java:80) error 24-May-2016 17:39:17 at com.atlassian.bamboo.build.logger.LoggerIds$PersistentLogger.getLogFileDirectory(LoggerIds.java:40) error 24-May-2016 17:39:17 at com.atlassian.bamboo.build.logger.BuildLogFileWriter.<init>(BuildLogFileWriter.java:62) error 24-May-2016 17:39:17 at com.atlassian.bamboo.build.logger.BuildLoggerImpl$1.create(BuildLoggerImpl.java:24) error 24-May-2016 17:39:17 at com.atlassian.bamboo.build.logger.BuildLoggerImpl$1.create(BuildLoggerImpl.java:20) error 24-May-2016 17:39:17 at io.atlassian.util.concurrent.LazyReference$Sync.run(LazyReference.java:332) error 24-May-2016 17:39:17 at io.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:150) error 24-May-2016 17:39:17 at io.atlassian.util.concurrent.LazyReference.get(LazyReference.java:116) error 24-May-2016 17:39:17 at com.atlassian.bamboo.build.logger.BuildLoggerImpl.streamEntry(BuildLoggerImpl.java:73) error 24-May-2016 17:39:17 at com.atlassian.bamboo.build.logger.BuildLoggerImpl.onAddLogEntry(BuildLoggerImpl.java:61) error 24-May-2016 17:39:17 at com.atlassian.bamboo.build.logger.AbstractBuildLogger.addLogEntry(AbstractBuildLogger.java:153) error 24-May-2016 17:39:17 at com.atlassian.bamboo.build.logger.AbstractBuildLogger.addBuildLogEntry(AbstractBuildLogger.java:105) error 24-May-2016 17:39:17 at com.atlassian.bamboo.build.logger.AbstractBuildLogger.addBuildLogEntry(AbstractBuildLogger.java:163) error 24-May-2016 17:39:17 at com.atlassian.bamboo.plugins.git.NativeGitOperationHelper.fetch(NativeGitOperationHelper.java:425) error 24-May-2016 17:39:17 at com.atlassian.bamboo.plugins.git.GitRepository$2.call(GitRepository.java:470) error 24-May-2016 17:39:17 at com.atlassian.bamboo.plugins.git.GitRepository$2.call(GitRepository.java:464) error 24-May-2016 17:39:17 at io.atlassian.util.concurrent.ManagedLocks$ManagedLockImpl.withLock(ManagedLocks.java:293) error 24-May-2016 17:39:17 at com.atlassian.bamboo.plugins.git.GitRepository.retrieveSourceCode(GitRepository.java:463) error 24-May-2016 17:39:17 at com.atlassian.bamboo.plugins.git.GitRepository.retrieveSourceCode(GitRepository.java:427) error 24-May-2016 17:39:17 at com.atlassian.bamboo.plugins.git.GitRepository.retrieveSourceCode(GitRepository.java:419) error 24-May-2016 17:39:17 at com.atlassian.bamboo.plugins.bitbucket.BitbucketRepository.retrieveSourceCode(BitbucketRepository.java:324) error 24-May-2016 17:39:17 at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.fillWorkingDirFromVcs(VcsCheckoutTask.java:295) error 24-May-2016 17:39:17 at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.execute(VcsCheckoutTask.java:136) error 24-May-2016 17:39:17 ... 17 more {noformat} *Workarounds* There are two possible workarounds here, but first we need to remove the _Source Code Checkout_ task from the Environment task configuration to prevent the deployment from failing. h6. 1. Artifact A workaround would be to download the code, from the target repository, using the _Source Code Checkout_ in the source build plan. It is possible to create a [shared artifact|https://confluence.atlassian.com/display/BAMBOO/Sharing+artifacts] to wrap up all the downloaded code and then use the *Artifact download* task in the Environment to download the artifact containing the source code downloaded from the source build plan. h6. 2. Script A different workaround would be to use a [Script|https://confluence.atlassian.com/display/BAMBOO/Script] task inside the Environment to manually clone the repository, the same way that it's done using the Terminal or Command Prompt.

    Atlassian JIRA | 7 months ago | Rene Verschoor [Atlassian]
    java.lang.RuntimeException: com.atlassian.bamboo.repository.RepositoryException: Runtime exception.
  2. 0

    Stack trace is not emitted when exception is thrown

    htmlunit | 10 months ago | davidoo
    java.lang.RuntimeException: Runtime Exception
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    GitHub comment 2672#6938523

    GitHub | 4 years ago | jdcheesman
    java.lang.RuntimeException: runtime exception

    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.RuntimeException

      com.atlassian.bamboo.repository.RepositoryException: Runtime exception.

      at com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun()
    2. com.atlassian.bamboo
      TaskExecutorImpl.lambda$executeTasks$272
      1. com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(RetryingTaskExecutor.java:144)
      2. com.atlassian.bamboo.executor.RetryingTaskExecutor.runTask(RetryingTaskExecutor.java:88)
      3. com.atlassian.bamboo.executor.RetryingTaskExecutor.retry(RetryingTaskExecutor.java:203)
      4. com.atlassian.bamboo.executor.RetryingTaskExecutor.retry(RetryingTaskExecutor.java:188)
      5. com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.execute(VcsCheckoutTask.java:144)
      6. com.atlassian.bamboo.task.TaskExecutorImpl.lambda$executeTasks$272(TaskExecutorImpl.java:317)
      6 frames