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


Solutions on the web1

Solution icon of github
No default branch is defined

Stack trace

com.atlassian.bitbucket.repository.NoDefaultBranchException: No default branch is defined
	at com.atlassian.stash.internal.scm.git.RawGitAgent.getHead(RawGitAgent.java:136)[na:na]
	at com.atlassian.stash.internal.scm.git.DefaultGitCommandFactory.branches(DefaultGitCommandFactory.java:109)[na:na]
	at com.atlassian.stash.internal.scm.git.DefaultGitCommandFactory.branches(DefaultGitCommandFactory.java:61)[na:na]
	at com.atlassian.stash.internal.scm.PluginScmCommandFactory.branches(PluginScmCommandFactory.java:46)[bitbucket-service-impl-4.4.1.jar:na]
	at com.atlassian.stash.internal.repository.DefaultRefService.getBranches(DefaultRefService.java:160)[bitbucket-service-impl-4.4.1.jar:na]
	at sun.reflect.GeneratedMethodAccessor710.invoke(Unknown Source)[na:na]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.8.0_74]
	at java.lang.reflect.Method.invoke(Method.java:498)[na:1.8.0_74]
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)[spring-aop-4.2.4.RELEASE.jar:4.2.4.RELEASE]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)[spring-aop-4.2.4.RELEASE.jar:4.2.4.RELEASE]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)[spring-aop-4.2.4.RELEASE.jar:4.2.4.RELEASE]
	at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:85)[spring-aop-4.2.4.RELEASE.jar:4.2.4.RELEASE]
	at com.atlassian.stash.internal.aop.ProfilingAspect.profileMethod(ProfilingAspect.java:48)[bitbucket-platform-4.4.1.jar:na]
	at sun.reflect.GeneratedMethodAccessor144.invoke(Unknown Source)[na:na]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.8.0_74]
	at java.lang.reflect.Method.invoke(Method.java:498)[na:1.8.0_74]
	at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621)[spring-aop-4.2.4.RELEASE.jar:4.2.4.RELEASE]
	at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610)[spring-aop-4.2.4.RELEASE.jar:4.2.4.RELEASE]
	at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:68)[spring-aop-4.2.4.RELEASE.jar:4.2.4.RELEASE]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:168)[spring-aop-4.2.4.RELEASE.jar:4.2.4.RELEASE]
	at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:85)[spring-aop-4.2.4.RELEASE.jar:4.2.4.RELEASE]
	at com.atlassian.stash.internal.aop.ThrottledAspect.throttle(ThrottledAspect.java:52)[bitbucket-platform-4.4.1.jar:na]
	at sun.reflect.GeneratedMethodAccessor706.invoke(Unknown Source)[na:na]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.8.0_74]
	at java.lang.reflect.Method.invoke(Method.java:498)[na:1.8.0_74]
	at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621)[spring-aop-4.2.4.RELEASE.jar:4.2.4.RELEASE]
	at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610)[spring-aop-4.2.4.RELEASE.jar:4.2.4.RELEASE]
	at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:68)[spring-aop-4.2.4.RELEASE.jar:4.2.4.RELEASE]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:168)[spring-aop-4.2.4.RELEASE.jar:4.2.4.RELEASE]
	at org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:64)[spring-security-core-3.2.7.RELEASE.jar:3.2.7.RELEASE]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)[spring-aop-4.2.4.RELEASE.jar:4.2.4.RELEASE]
	at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)[spring-tx-4.2.4.RELEASE.jar:4.2.4.RELEASE]
	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)[spring-tx-4.2.4.RELEASE.jar:4.2.4.RELEASE]
	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)[spring-tx-4.2.4.RELEASE.jar:4.2.4.RELEASE]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)[spring-aop-4.2.4.RELEASE.jar:4.2.4.RELEASE]
	at org.springframework.aop.framework.adapter.ThrowsAdviceInterceptor.invoke(ThrowsAdviceInterceptor.java:125)[spring-aop-4.2.4.RELEASE.jar:4.2.4.RELEASE]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:168)[spring-aop-4.2.4.RELEASE.jar:4.2.4.RELEASE]
	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)[spring-aop-4.2.4.RELEASE.jar:4.2.4.RELEASE]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)[spring-aop-4.2.4.RELEASE.jar:4.2.4.RELEASE]
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208)[spring-aop-4.2.4.RELEASE.jar:4.2.4.RELEASE]
	at com.sun.proxy.$Proxy239.getBranches(Unknown Source)[na:na]
	at sun.reflect.GeneratedMethodAccessor710.invoke(Unknown Source)[na:na]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.8.0_74]
	at java.lang.reflect.Method.invoke(Method.java:498)[na:1.8.0_74]
	at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)[atlassian-plugins-core-4.1.1.jar:na]
	at com.sun.proxy.$Proxy326.getBranches(Unknown Source)[na:na]
	at sun.reflect.GeneratedMethodAccessor710.invoke(Unknown Source)[na:na]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.8.0_74]
	at java.lang.reflect.Method.invoke(Method.java:498)[na:1.8.0_74]
	at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:136)[atlassian-plugins-osgi-bridge-4.1.1.jar:na]
	at com.sun.proxy.$Proxy326.getBranches(Unknown Source)[na:na]
	at com.mohamicorp.stash.searchforstash.repository.RepositoryServiceManagerImpl.getBranchMap(RepositoryServiceManagerImpl.java:78)[plugin.495922907779022355.search-for-stash-2.2_1460749823000.jar:na]
	at com.mohamicorp.stash.searchforstash.updater.SearchUpdaterImpl.reindexAll(SearchUpdaterImpl.java:673)[plugin.495922907779022355.search-for-stash-2.2_1460749823000.jar:na]
	at com.mohamicorp.stash.searchforstash.admin.GlobalSettingsServlet$1$1.perform(GlobalSettingsServlet.java:316)[plugin.495922907779022355.search-for-stash-2.2_1460749823000.jar:na]
	at com.mohamicorp.stash.searchforstash.admin.GlobalSettingsServlet$1$1.perform(GlobalSettingsServlet.java:312)[plugin.495922907779022355.search-for-stash-2.2_1460749823000.jar:na]
	at com.atlassian.stash.internal.user.DefaultEscalatedSecurityContext.call(DefaultEscalatedSecurityContext.java:51)[bitbucket-service-impl-4.4.1.jar:na]
	at com.mohamicorp.stash.searchforstash.admin.GlobalSettingsServlet$1.run(GlobalSettingsServlet.java:312)[plugin.495922907779022355.search-for-stash-2.2_1460749823000.jar:na]
	at java.lang.Thread.run(Thread.java:745)[na:1.8.0_74]

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.