Database Error
Asked by atsflex:

i am getting the following error, when I research it, its giving me MySQL options and I am running an Oracle database

Upgrade failed. Please consult the system logs for details. You will need to fix these problems, restore your database and confluence home directory to the pre upgrade state. Then retry the upgrade. Upgrade error message: Upgrade task com.atlassian.confluence.upgrade.upgradetask.DropSpaceGroupTablesUpgradeTask@15058912 failed during the SCHEMA_UPGRADE phase due to: null


Answers:
author: AnnWorley
body: Hi Nik,

I think I found a relevant guide to fix the issue, even if it's in the MySQL space in our docs. The error "DropSpaceGroupTablesUpgradeTask failed during the SCHEMA_UPGRADE phase due to: null" is the one in the article.

Please restore your database and confluence home directory to the pre-upgrade state from backups and then run the queries in this article to fix the database before upgrading again:

[Upgrading to Confluence 5.9.x or 5.10.x fails with error 'failed during the SCHEMA_UPGRADE phase due to: null'](https://confluence.atlassian.com/confkb/upgrading-to-confluence-5-9-x-or-5-10-x-fails-with-error-failed-during-the-schema_upgrade-phase-due-to-null-794212749.html)

Best of luck,

Ann

comments: author: atsflex
body: I saw this link before, but the link is for MySQL and I am running oracle. Any advice/suggestions for Oracle?


author: AnnWorley
body: I understand that the article is in the MySQL section of our docs but the bug report ([Upgrade fail when FK9228242D16994414 is missing from the spaces table](https://jira.atlassian.com/browse/CONFSERVER-43759)) is DBMS agnostic, as are foreign key constraints. If you restore from backup then add the expected constraint to your Oracle database as described in the bug report, the upgrade task will no longer detect a null value for the constraint. Then the upgrade can continue.


author: atsflex
body: okay, I am getting the following error

com.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.IllegalStateException: Spring Application context has not been set  
at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:149)

caused by: java.lang.IllegalStateException: Spring Application context has not been set  
at com.atlassian.spring.container.SpringContainerContext.getComponent(SpringContainerContext.java:48)

Is it okay to delete "apps" folder in the bin directory to address this error. I have correct permission to confluence.cfg.xml


author: AnnWorley
body: Hi Nik,

Deleting the apps folder in the bin directory is not a common approach to the error you are seeing, "Spring Application context has not been set".

Unfortunately there are several possible causes. There is a list of conditions to check for in this article: [Confluence does not start due to Spring Application context has not been set](https://confluence.atlassian.com/confkb/confluence-does-not-start-due-to-spring-application-context-has-not-been-set-218278311.html)

Thanks,

Ann


author: atsflex
body: Thanks for your assistance in this matter. I discovered the issue, I had the confluence home setting wrong. As a result, it create a additional apps folder, once I made the changes I was able to resolve this issue.


author: AnnWorley
body: I very much appreciate your following up to let us know the resolution, so the matter would not remain a mystery. Have a great day.