I'm trying to upgrade our sandbox/test instance of Stash from 2.1.2 (what Prod is currently on) to the 2.2.0 release, and after the upgrade (which on our test instance is merely unzipping the new 2.2.0 folder, stopping the old release, updating the service wrapper in /etc/init.d, and starting the new version) the web UI shows the following:
The following problem occurred which prevents Atlassian Stash from starting correctly:
The stash log shows the following:
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 0 of type [org.springframework.transaction.PlatformTransactionManager]: : Error creating bean with name 'pluginConfiguration' defined in class path resource [stash-context.xml]: Cannot resolve reference to bean 'pluginPersistentStateStore' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pluginPersistentStateStore' defined in class path resource [stash-context.xml]: Cannot create inner bean 'com.atlassian.stash.internal.plugin.DefaultPluginPersistentStateStore#79720870' of type [com.atlassian.stash.internal.plugin.DefaultPluginPersistentStateStore] while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.atlassian.stash.internal.plugin.DefaultPluginPersistentStateStore#79720870' defined in class path resource [stash-context.xml]: Cannot resolve reference to bean 'pluginStateDao' while setting constructor argument; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'pluginStateDao' defined in URL [jar:file:/opt/atlassian/atlassian-stash-2.2.0/atlassian-stash/WEB-INF/lib/stash-dao-impl-2.2.0.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 'databaseService': Invocation of init method failed; nested exception is com.atlassian.util.concurrent.LazyReference$InitializationException: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: Unable to open a test connection to the given database. JDBC url = jdbc:sqlserver://XXX;databaseName=XXX;, username = XXX. Terminating connection pool. Original Exception: ------
com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for user 'XXX'. ClientConnectionId:656e6fe7-88c3-4d39-9e70-4642c5135447
The stash-config.properties was migrated to jdbc in the 2.1.x upgrade, and is the following (anonymized of course):
I figured it out. There was a space at the end of the password line. Whatever Atlassian used in Stash 2.1.2 stopped at the end of the alpha-numeric character string, Stash 2.2.0's parser is now including everything, including the space. I removed the space and now Stash 2.2.0 starts up fine. Marking as resolved.
There were some changes around how the connections are opened in 2.2, though nothing that should affect how it handles special characters in the username or password. Could you please open a support request so that we can work with you more directly? Once we've found the root cause, we can then update this question with an answer to hopefully benefit anyone else who encounters the issue.
Looking forward to hearing from you,
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs