Upgrading Confluence to 5.2.3 using SQL Server error

Asked By 10 points N/A Posted on -
qa-featured

When upgrading Confluence to 5.2.3 using SQL Server, I am receiving an error

"WARN 14 Aug 2013 17:31:03,939 [main] org.apache.tomcat.jdbc.pool.interceptor.SlowQueryReport "Failed Query Report SQL=alter table FOLLOW_CONNECTIONS add constraint FK_FOLLOW_CONNECTIONS_FOLLOWER foreign key (FOLLOWER) references user_mapping; time=17 ms;" ERROR 14 Aug 2013 17:31:03,939 [main] net.sf.hibernate.tool.hbm2ddl.SchemaUpdate "Unsuccessful: alter table FOLLOW_CONNECTIONS add constraint FK_FOLLOW_CONNECTIONS_FOLLOWER foreign key (FOLLOWER) references user_mapping" ERROR 14 Aug 2013 17:31:03,940 [main] net.sf.hibernate.tool.hbm2ddl.SchemaUpdate "Column 'user_mapping.user_key' is not the same data type as referencing column 'FOLLOW_CONNECTIONS.FOLLOWER' in foreign key 'FK_FOLLOW_CONNECTIONS_FOLLOWER'." ERROR 14 Aug 2013 17:31:03,942 [main] net.sf.hibernate.tool.hbm2ddl.SchemaUpdate "could not complete schema update" java.sql.SQLException: Column 'user_mapping.user_key' is not the same data type as referencing column 'FOLLOW_CONNECTIONS.FOLLOWER' in foreign key 'FK_FOLLOW_CONNECTIONS_FOLLOWER'. at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:368) at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2816) at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2254) at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:631)"

Anyone know how to get rid of this error ?

SHARE
Answered By 5 points N/A #159589

Upgrading Confluence to 5.2.3 using SQL Server error

qa-featured

The problem you are experiencing is caused by the fact that the Dialect being used in confluence.cfg.xml is incorrect.

(The line <property name="hibernate.dialect">net.sf.hibernate.dialect.SQLServerDialect</property> is incorrect)

To fix it do the following:

  1. Close Confluence completely
  2. Backup the file called confluence.cfg.xml
  3. Edit the line <property name="hibernate.dialect">net.sf.hibernate.dialect.SQLServerDialect</property>to be

<property name="hibernate.dialect">net.sf.hibernate.dialect.SQLServerIntlDialect</property>

  1. Save
  2. Restart Confluence

Related Questions