I followed the Stash backup-restore document and I'm running into an issue with the database schema. I did a backup of version 2.10.1 and I restored the data into a newer version 2.12.1 then ran the startup script. I went to the servername:port/setup to connect to our oracle database and it gave me the below error.
Error:
The Hibernate SessionFactory could not be created. The database schema may not have been correctly applied
com.atlassian.stash.internal.db.DefaultDatabaseManager.createSessionFactory(DefaultDatabaseManager.java:339)
com.atlassian.stash.internal.db.DefaultDatabaseManager.prepareDatabase(DefaultDatabaseManager.java:159)
com.atlassian.stash.internal.maintenance.SpringMaintenanceTaskFactory.setupTask(SpringMaintenanceTaskFactory.java:145)
...
Missing column: is_active in JIRA.CWD_APPLICATION
org.hibernate.mapping.Table.validateColumns(Table.java:365)
org.hibernate.cfg.Configuration.validateSchema(Configuration.java:1336)
org.hibernate.tool.hbm2ddl.SchemaValidator.validate(SchemaValidator.java:155)
...
Is there a reason it is looking for Jira.cwd_application? Just a note, we also have Jira DB running on the same server as Stash DB, but I checked the user and the database and they look fine. Is there an error with either the backup/restore or the initial setup page in Stash?
DB Properties File:
#>*******************************************************
#> Migrated to database at jdbc:oracle:thin:@//asdbsxxxxxxx:port/stash_dev
#> Updated by StashAdmin on 2014-01-02T09:39:53.326-05:00
#>*******************************************************
#jdbc.driver=oracle.jdbc.driver.OracleDriver
#jdbc.url=jdbc:oracle:thin:@//asdxxxxxxxxx:port/stash_dev
#jdbc.user=stash_dev
#jdbc.password=password
#>********************************************************************************
#> Overridden during restore from backup by stashuser on Apr 22, 2014 8:54:56 AM
#>********************************************************************************
jdbc.driver=oracle.jdbc.driver.OracleDriver
jdbc.url=jdbc:oracle:thin:@//asdxxxxxxx:port/CSD11UTF
jdbc.user=STASH_UAT
jdbc.password=password