com.atlassian.bitbucket.repository.NoDefaultBranchException: No default branch is defined

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via GitHub by mdavoodi
, 11 months ago
com.atlassian.bitbucket.repository.NoDefaultBranchException: No default branch is defined
at com.atlassian.stash.internal.scm.git.RawGitAgent.getHead(RawGitAgent.java:136)
at com.atlassian.stash.internal.scm.git.DefaultGitCommandFactory.branches(DefaultGitCommandFactory.java:109)
at com.atlassian.stash.internal.scm.git.DefaultGitCommandFactory.branches(DefaultGitCommandFactory.java:61)
at com.atlassian.stash.internal.scm.PluginScmCommandFactory.branches(PluginScmCommandFactory.java:46)
at com.atlassian.stash.internal.repository.DefaultRefService.getBranches(DefaultRefService.java:160)
at sun.reflect.GeneratedMethodAccessor710.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
at com.atlassian.stash.internal.aop.ProfilingAspect.profileMethod(ProfilingAspect.java:48)
at sun.reflect.GeneratedMethodAccessor144.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610)
at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:68)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:168)
at com.atlassian.stash.internal.aop.ThrottledAspect.throttle(ThrottledAspect.java:52)
at sun.reflect.GeneratedMethodAccessor706.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610)
at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:68)
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.adapter.ThrowsAdviceInterceptor.invoke(ThrowsAdviceInterceptor.java:125)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:168)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at com.sun.proxy.$Proxy239.getBranches(Unknown Source)
at sun.reflect.GeneratedMethodAccessor710.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)
at com.sun.proxy.$Proxy326.getBranches(Unknown Source)
at sun.reflect.GeneratedMethodAccessor710.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:136)
at com.sun.proxy.$Proxy326.getBranches(Unknown Source)
at com.mohamicorp.stash.searchforstash.repository.RepositoryServiceManagerImpl.getBranchMap(RepositoryServiceManagerImpl.java:78)
at com.mohamicorp.stash.searchforstash.updater.SearchUpdaterImpl.reindexAll(SearchUpdaterImpl.java:673)
at com.mohamicorp.stash.searchforstash.admin.GlobalSettingsServlet$1$1.perform(GlobalSettingsServlet.java:316)
at com.mohamicorp.stash.searchforstash.admin.GlobalSettingsServlet$1$1.perform(GlobalSettingsServlet.java:312)
at com.atlassian.stash.internal.user.DefaultEscalatedSecurityContext.call(DefaultEscalatedSecurityContext.java:51)
at com.mohamicorp.stash.searchforstash.admin.GlobalSettingsServlet$1.run(GlobalSettingsServlet.java:312)
at java.lang.Thread.run(Thread.java:745)

Users with the same issue

You are the first who have seen this exception.

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.