Problem with Confluence Upgrade from 3.4.3 to 3.5.9 on SQL Server 2008

I am trying to upgrade confluence on our testing server and seeing a whole heap of errors in the logs when confluence tries to upgrade the database

2011-08-01 13:45:27,730 ERROR [Thread-2] [atlassian.confluence.upgrade.UpgradeLauncherServletContextListener] contextInitialized Upgrade failed, application will not start: Schema upgrade task [ com.atlassian.confluence.upgrade.upgradetask.AddBandanaConstraintsUpgradeTask@5b2cfeb7 ] failed due to : StatementCallback; uncategorized SQLException for SQL [drop index band_context_idx on BANDANA]; SQL state [S1000]; error code [3964]; Transaction failed because this DDL statement is not allowed inside a snapshot isolation transaction. Since metadata is not versioned, a metadata change can lead to inconsistency if mixed within snapshot isolation.; nested exception is java.sql.SQLException: Transaction failed because this DDL statement is not allowed inside a snapshot isolation transaction. Since metadata is not versioned, a metadata change can lead to inconsistency if mixed within snapshot isolation.
com.atlassian.confluence.upgrade.UpgradeException: Schema upgrade task [ com.atlassian.confluence.upgrade.upgradetask.AddBandanaConstraintsUpgradeTask@5b2cfeb7 ] failed due to : StatementCallback; uncategorized SQLException for SQL [drop index band_context_idx on BANDANA]; SQL state [S1000]; error code [3964]; Transaction failed because this DDL statement is not allowed inside a snapshot isolation transaction. Since metadata is not versioned, a metadata change can lead to inconsistency if mixed within snapshot isolation.; nested exception is java.sql.SQLException: Transaction failed because this DDL statement is not allowed inside a snapshot isolation transaction. Since metadata is not versioned, a metadata change can lead to inconsistency if mixed within snapshot isolation.
at com.atlassian.confluence.upgrade.AbstractUpgradeManager.runSchemaUpgradeTasks(AbstractUpgradeManager.java:301)
at com.atlassian.confluence.upgrade.AbstractUpgradeManager.upgradeSchema(AbstractUpgradeManager.java:235)
at com.atlassian.confluence.upgrade.AbstractUpgradeManager.upgrade(AbstractUpgradeManager.java:87)
at com.atlassian.confluence.upgrade.impl.DefaultUpgradeManager.upgrade(DefaultUpgradeManager.java:139)
at com.atlassian.confluence.upgrade.UpgradeLauncherServletContextListener.contextInitialized(UpgradeLauncherServletContextListener.java:28)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3972)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4467)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1041)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:964)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:519)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)

I have checked the DB settings and run this on the DB to make sure i have the transaction level correctly set

ALTER DATABASE confluence
SET READ_COMMITTED_SNAPSHOT ON
WITH ROLLBACK IMMEDIATE;

Does anyone know what i am doing wrong?

1 answer

This widget could not be displayed.

Hi David,

It looks like you opened a support ticket with us and we were able to figure it out. Please accept this solution if that's right. From what I can tell, it's this:

  1. From confluence.cfg.xml, remove <property name="hibernate.connection.isolation">4096</property>
  2. On the database, run:
ALTER DATABASE confluence
SET ALLOW_SNAPSHOT_ISOLATION OFF

We'll write a KB article for this.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Published Jul 30, 2018 in Confluence

How Manon Soubies-Camy uses Confluence + Trello to organize webinar notes and her knitting stash

@Manon Soubies-Camy is an engineer who has been an avid Atlassian user since 2014. She helps companies of all sizes transform the way they work with the Atlassian stack, including Jira and Confl...

858 views 8 13
Read article

Atlassian User Groups

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!

Find my local user group

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

Groups near you