Commit does not exist in repo exception

Issue #38 resolved
Rob Bankers created an issue

Hi,

Thxs for you're response the nullpointer exceptions are gone. But with the delete action we still got a NoSuchCommitException and no delete hook is send by the plugin.

2017-06-27 13:03:24,243 WARN [AtlassianEvent::thread-1] fp-release @1ST67YOx783x738x0 10.195.135.123 "POST /scm/viadgs/deploy-via-jboss.git/git-receive-pack HTTP/1.1" c.a.s.i.h.r.DefaultRepositoryHookService [VIADGS/deploy-via-jboss[3014]] Error calling CompositeRepositoryHook.postUpdate com.atlassian.bitbucket.commit.NoSuchCommitException: Commit '0000000000000000000000000000000000000000' does not exist in repository 'Deploy Via Jboss'. at com.atlassian.bitbucket.scm.git.command.GitCommandExitHandler.newNoSuchCommitException(GitCommandExitHandler.java:167) at com.atlassian.bitbucket.scm.git.command.GitCommandExitHandler.evaluateStdErr(GitCommandExitHandler.java:70) at com.atlassian.bitbucket.scm.git.command.GitCommandExitHandler.onError(GitCommandExitHandler.java:197) at com.atlassian.bitbucket.scm.DefaultCommandExitHandler.onExit(DefaultCommandExitHandler.java:31) at com.atlassian.bitbucket.scm.BaseCommand.callExitHandler(BaseCommand.java:146) at com.atlassian.bitbucket.scm.BaseCommand$CommandFuture.internalGet(BaseCommand.java:280) at com.atlassian.bitbucket.scm.BaseCommand$CommandFuture.get(BaseCommand.java:244) at com.atlassian.bitbucket.scm.BaseCommand.call(BaseCommand.java:83) at com.atlassian.stash.internal.commit.DefaultCommitService.getCommit(DefaultCommitService.java:159) at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26) at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56) at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60) at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70) at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53) at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57) at de.aeffle.stash.plugin.hook.http.location.UrlTemplateTranslator.addCommitMessage(UrlTemplateTranslator.java:124) at de.aeffle.stash.plugin.hook.http.location.UrlTemplateTranslator.<init>(UrlTemplateTranslator.java:73) at de.aeffle.stash.plugin.hook.HttpRequestPostReceiveHook.postReceive(HttpRequestPostReceiveHook.java:122) at com.atlassian.stash.internal.plugin.legacy.AsyncPostReceiveRepositoryHookAdapter.postUpdate(AsyncPostReceiveRepositoryHookAdapter.java:22) at com.atlassian.stash.internal.plugin.legacy.CompositeRepositoryHook.lambda$postUpdate$1(CompositeRepositoryHook.java:58) at com.atlassian.stash.internal.plugin.legacy.CompositeRepositoryHook.handlingExceptions(CompositeRepositoryHook.java:86) at com.atlassian.stash.internal.plugin.legacy.CompositeRepositoryHook.postUpdate(CompositeRepositoryHook.java:57) at com.atlassian.stash.internal.hook.repository.DefaultRepositoryHookService.postUpdate(DefaultRepositoryHookService.java:573) at com.atlassian.stash.internal.hook.repository.DefaultRepositoryHookService.doPostUpdate(DefaultRepositoryHookService.java:417) at com.atlassian.stash.internal.hook.repository.DefaultRepositoryHookService.postUpdate(DefaultRepositoryHookService.java:235) at com.atlassian.stash.internal.hook.repository.CoreRefChangeEventToRepositoryHookAdapter.onRefsChanged(CoreRefChangeEventToRepositoryHookAdapter.java:49) at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:40) at com.atlassian.stash.internal.event.AsyncBatchingInvokersTransformer$AsyncInvokerBatch.invoke(AsyncBatchingInvokersTransformer.java:109) at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$1$1.run(AsynchronousAbleEventDispatcher.java:38) at com.atlassian.sal.core.executor.ThreadLocalDelegateRunnable.run(ThreadLocalDelegateRunnable.java:34) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.lang.Thread.run(Thread.java:748) ... 84 frames trimmed 2017-06-27 13:03:24,244 ERROR [AtlassianEvent::thread-1] fp-release @1ST67YOx783x738x0 10.195.135.123 "POST /scm/viadgs/deploy-via-jboss.git/git-receive-pack HTTP/1.1" c.a.s.i.e.AsyncBatchingInvokersTransformer There was an exception thrown trying to dispatch event 'com.atlassian.bitbucket.event.repository.RepositoryPushEvent[source=com.atlassian.stash.internal.hook.PushPostReceiveHook@72217b86]' for the invoker 'SingleParameterMethodListenerInvoker{method=public void com.atlassian.stash.internal.hook.repository.CoreRefChangeEventToRepositoryHookAdapter.onRefsChanged(com.atlassian.bitbucket.event.repository.RepositoryRefsChangedEvent), listener=com.atlassian.stash.internal.hook.repository.CoreRefChangeEventToRepositoryHookAdapter@19056086}' java.lang.RuntimeException: Transaction rolled back because it has been marked as rollback-only. Listener: com.atlassian.stash.internal.hook.repository.CoreRefChangeEventToRepositoryHookAdapter event: com.atlassian.bitbucket.event.repository.RepositoryPushEvent at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:55) at com.atlassian.stash.internal.event.AsyncBatchingInvokersTransformer$AsyncInvokerBatch.invoke(AsyncBatchingInvokersTransformer.java:109) at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$1$1.run(AsynchronousAbleEventDispatcher.java:38) at com.atlassian.sal.core.executor.ThreadLocalDelegateRunnable.run(ThreadLocalDelegateRunnable.java:34) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.lang.Thread.run(Thread.java:748) ... 1 frame trimmed Caused by: org.springframework.transaction.UnexpectedRollbackException: Transaction rolled back because it has been marked as rollback-only at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:724) at com.atlassian.stash.internal.hook.repository.CoreRefChangeEventToRepositoryHookAdapter.onRefsChanged(CoreRefChangeEventToRepositoryHookAdapter.java:49) at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:40) ... 6 common frames omitted

Regards Rob

Comments (6)

  1. Alexander Renteln

    Damn it, that comes from only doing unit tests and not even trying it out once...

    Anyways, I fixed it - and build a new release for you. I put a build in the download section, so that you can confirm that it's been fixed.

    4.3.3-SNAPSHOT

    Sorry again, was too tired yesterday :-)

  2. Rob Bankers Account Deactivated reporter

    Thxs for new snapshot version and this one works fine! But could you make a new version without a try catch?

    I couldn't make a brach on remote because of authorization issues: git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=manager-st push -v --tags --set-upstream origin feature/remove_try_catch:feature/remove_try_catch remote: Unauthorized

  3. Alexander Renteln

    Unauthorized shouldn't be a problem from the plugin. I still removed that try-catch and put a try-catch around all the methods that add translations to the translationMap. This way the request will be made anyway.

    There is a new SNAPSHOT in the download section - try it out :-)

  4. Rob Bankers Account Deactivated reporter

    Yeah it still works. And the error about authorization is when I want to push something to this remote repository. Do you got a ETA for a official release?

  5. Log in to comment