Lost data after upgrading to User Profile Plugin Version 1.10.1

This problem has been tracked with the following ticket and been fixed with version 1.10.2 UPP-502 - Getting issue details... STATUS

Background

There are two possible options for database configuration in Confluence.

1) A direct JDBC connection via <CONFLUENCE_HOME>/confluence.cfg.xml file (done during standard installarion process)

2) Datasource in Apache Tomcat via conf/server.xml file in your Tomcat installation

  1. For PostgreSQL see: https://confluence.atlassian.com/display/DOC/Configuring+a+PostgreSQL+Datasource+in+Apache+Tomcat
  2. For MySQL see: https://confluence.atlassian.com/display/DOC/Configuring+a+MySQL+Datasource+in+Apache+Tomcat
  3. For SQL Server see: https://confluence.atlassian.com/display/DOC/Configuring+a+SQL+Server+Datasource+in+Apache+Tomcat
  4. For Oracle see: https://confluence.atlassian.com/display/DOC/Configuring+an+Oracle+Datasource+in+Apache+Tomcat

Solution

If you have configured it with datasource in your Apache Tomcat, you have to take the following steps to be able to upgrade your User Profile plugin successfully and get back the data which still exists in the database: 

1) Edit the <CONFLUENCE_HOME>/confluence.cfg.xml file

2) Depending on your database configuration, insert one of the following code snippets at the start of the <properties> section:

  1. For PostgreSQL (see: Confluence documentation):
    <property name="hibernate.setup"><![CDATA[true]]></property>
    <property name="hibernate.dialect"><![CDATA[net.sf.hibernate.dialect.PostgreSQLDialect]]></property>
    <property name="hibernate.connection.driver_class"><![CDATA[org.postgresql.Driver]]></property>
    <property name="hibernate.connection.datasource"><![CDATA[java:comp/env/jdbc/confluence]]></property>

  2. For MySQL (see: Confluence documentation):
    <property name="hibernate.setup"><![CDATA[true]]></property>
    <property name="hibernate.dialect"><![CDATA[net.sf.hibernate.dialect.MySQLDialect]]></property>
    <property name="hibernate.connection.driver_class"><![CDATA[com.mysql.jdbc.Driver]]</property>
    <property name="hibernate.connection.datasource"><![CDATA[java:comp/env/jdbc/confluence]]></property>

  3. For SQL Server (see: Confluence documentation):
    <property name="hibernate.setup"><![CDATA[true]]></property>
    <property name="hibernate.dialect"><![CDATA[net.sf.hibernate.dialect.SQLServerDialect]]></property><property name="hibernate.connection.driver_class"><![CDATA[net.sourceforge.jtds.jdbc.Driver]]</property>
    <property name="hibernate.connection.datasource"><![CDATA[java:comp/env/jdbc/confluence]]></property>

  4. For Oracle (see: Confluence documentation):
    <property name="hibernate.setup"><![CDATA[true]]></property>
    <property name="hibernate.dialect"><![CDATA[net.sf.hibernate.dialect.OracleDialect]]></property>
    <property name="hibernate.connection.driver_class"><![CDATA[oracle.jdbc.OracleDriver]]</property>
    <property name="hibernate.connection.datasource"><![CDATA[java:comp/env/jdbc/confluence]]></property>

3) Deactivate the User Profile plugin in the Confluence Administration via Manage Plugins (UPM)

4) Restart your Confluence installation

5) Activate the User Profile plugin in the Confluence Administration via Manage Plugins (UPM)

 

Adding the value to the confluence.cfg.xml should only be seen as a temporary solution and should be removed after a successful migration. Where possible, the value should be the same as in the datasource.

If you need any further help with your configuration, please contact us at products@communardo.de