Hi,
I was running BB v5.11 with postgres V9.2 on Linux machine. I upgraded postgres to v9.5 using steps here https://www.2daygeek.com/install-postgresql-on-ubuntu-centos-debian-fedora-mint-rhel-opensuse/# .
But after this upgrade I am getting below error while accessing BB.
==============================
The following problem occurred, which prevents Atlassian Bitbucket from starting:
==============================
cd /var/atlassian/application-data/bitbucket/log/
view atlassian-bitbucket.log
2018-07-02 08:01:42,394 ERROR [spring-startup] c.a.j.s.w.s.JohnsonDispatcherServlet SpringMVC dispatcher [springMvc] could not be started
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'crowdUserDao' defined in class path resource [crowd-spi-context.xml]: Unsatisfied dependency expressed through constructor argument with index 1 of type [com.atlassian.stash.internal.project.ProjectDao]: : Error creating bean with name 'projectDao' defined in URL [jar:file:/App/atlassian/application-data/bitbucket/atlassian-bitbucket/WEB-INF/lib/bitbucket-dao-impl-4.3.2.jar!/com/atlassian/stash/internal/project/HibernateProjectDao.class]: Unsatisfied dependency expressed through constructor argument with index 0 of type [org.hibernate.SessionFactory]: : Error creating bean with name 'sessionFactory' defined in class path resource [stash-context.xml]: Cannot resolve reference to bean 'sessionFactoryPrototype' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactoryPrototype' defined in class path resource [stash-context.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Missing table: sta_cmt_disc_comment_activity; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [stash-context.xml]: Cannot resolve reference to bean 'sessionFactoryPrototype' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactoryPrototype' defined in class path resource [stash-context.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Missing table: sta_cmt_disc_comment_activity; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'projectDao' defined in URL [jar:file:/App/atlassian/application-data/bitbucket/atlassian-bitbucket/WEB-INF/lib/bitbucket-dao-impl-4.3.2.jar!/com/atlassian/stash/internal/project/HibernateProjectDao.class]: Unsatisfied dependency expressed through constructor argument with index 0 of type [org.hibernate.SessionFactory]: : Error creating bean with name 'sessionFactory' defined in class path resource [stash-context.xml]: Cannot resolve reference to bean 'sessionFactoryPrototype' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactoryPrototype' defined in class path resource [stash-context.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Missing table: sta_cmt_disc_comment_activity; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [stash-context.xml]: Cannot resolve reference to bean 'sessionFactoryPrototype' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactoryPrototype' defined in class path resource [stash-context.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Missing table: sta_cmt_disc_comment_activity
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'projectDao' defined in URL [jar:file:/App/atlassian/application-data/bitbucket/atlassian-bitbucket/WEB-INF/lib/bitbucket-dao-impl-4.3.2.jar!/com/atlassian/stash/internal/project/HibernateProjectDao.class]: Unsatisfied dependency expressed through constructor argument with index 0 of type [org.hibernate.SessionFactory]: : Error creating bean with name 'sessionFactory' defined in class path resource [stash-context.xml]: Cannot resolve reference to bean 'sessionFactoryPrototype' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactoryPrototype' defined in class path resource [stash-context.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Missing table: sta_cmt_disc_comment_activity; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [stash-context.xml]: Cannot resolve reference to bean 'sessionFactoryPrototype' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactoryPrototype' defined in class path resource [stash-context.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Missing table: sta_cmt_disc_comment_activity
... 6 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [stash-context.xml]: Cannot resolve reference to bean 'sessionFactoryPrototype' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactoryPrototype' defined in class path resource [stash-context.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Missing table: sta_cmt_disc_comment_activity
Hi there,
It seems like the issue is with the database table missing. This issue occurs when the database schema mismatch the Bitbucket Server version. This is not related to the upgrading the database but due to following possibilities:
Please attempt the solution suggest in the following link - Bitbucket Server fails to start - Missing column or missing table
Best Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.