Stash Does Not Start - Missing column: remote_address_binary
症状
Stash cannot be started and the message below can be found on the logs.
atlassian-stash.log
に次のメッセージが表示される。
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'pluginStateDao' defined in URL [jar:file:/path/to/atlassian-stash-2.1.2/atlassian-stash/WEB-INF/lib/stash-dao-impl-.1.2.jar!/com/atlassian/stash/internal/plugin/HibernatePluginStateDao.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 column: remote_address_binary in PUBLIC.PUBLIC.CWD_APPLICATION_ADDRESS; 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 column: remote_address_binary in PUBLIC.PUBLIC.CWD_APPLICATION_ADDRESS*
原因
This error happens when the Stash application binary files are of an earlier version than the Stash data files located in the STASH_HOME
directory.
Let's suppose that we have these folders and sym link file:
/applications/stash_home
/applications/stash-2.4.1
/applications/stash-2.5.1
/applications/stash that is a symlink to /applications/stash-2.4.1 (
)
-> /applications/stash-2.4.1e.g. stash
If the Stash from "/applications/stash-2.5.1" is started it will upgrade the installation of /applications/stash_home to 2.5.1, so if you start the instance installed on "/applications/stash-2.4.1" (or starting by way of the symlink) the error above will be presented on the logs because the version mismatch by the installation folder and the STASH_HOME.
ソリューション
Start Stash with binaries that are of equal or higher version (upgrade) than the version of data in STASH_HOME
.