Details
-
Suggestion
-
Resolution: Fixed
Description
Currently Confluence with MySQL 5.7 is affected by this: https://confluence.atlassian.com/display/CONFKB/%27Page+Not+Found%27+when+navigating+to+Confluence+Questions+due+to+com.mysema.query.QueryException
Which is caused by this:
Caused by: com.mysema.query.QueryException: Caught SQLException for delete from `CONTENTPROPERTIES` where `CONTENTPROPERTIES`.`PROPERTYID` in (select `PROPERTY_ID` from (select `answerProperties`.`PROPERTYID` as `PROPERTY_ID` from `CONTENT` `answers` join `CONTENTPROPERTIES` `answerProperties` on `answerProperties`.`CONTENTID` = `answers`.`CONTENTID` left join (select `questionProperties`.`LONGVAL` as `ANSWER_ID` from `CONTENT` `questions` join `CONTENTPROPERTIES` `questionProperties` on `questionProperties`.`CONTENTID` = `questions`.`CONTENTID` where `questions`.`PLUGINKEY` = 'com.atlassian.confluence.plugins.confluence-questions:question' and `questions`.`PREVVER` is null and `questionProperties`.`PROPERTYNAME` = 'accepted') as `ACCEPTED_ANSWER_IDS` on `answers`.`CONTENTID` = `ANSWER_ID` where `answers`.`PLUGINKEY` = 'com.atlassian.confluence.plugins.confluence-questions:answer' and `answers`.`PREVVER` is null and `answerProperties`.`PROPERTYNAME` = 'accepted' and `ANSWER_ID` is null) as `TMP`) at com.mysema.query.sql.DefaultSQLExceptionTranslator.translate(DefaultSQLExceptionTranslator.java:38) at com.mysema.query.sql.Configuration.translate(Configuration.java:451) at com.mysema.query.sql.dml.SQLDeleteClause.execute(SQLDeleteClause.java:169) at com.atlassian.confluence.plugins.questions.internal.upgrade.DuplicatedAcceptedAnswersRemover.deleteDuplicatedAcceptedAnswers(DuplicatedAcceptedAnswersRemover.java:83) ... at com.atlassian.activeobjects.internal.AbstractActiveObjectsFactory.create(AbstractActiveObjectsFactory.java:67) at com.atlassian.activeobjects.internal.DelegatingActiveObjectsFactory.create(DelegatingActiveObjectsFactory.java:32) at com.atlassian.activeobjects.osgi.TenantAwareActiveObjects$1$1$1.call(TenantAwareActiveObjects.java:91) ... 6 more Caused by: java.sql.SQLException: You can't specify target table 'CONTENTPROPERTIES' for update in FROM clause
Different syntax in MySQL 5.7. This seems to only affect Confluence Questions add-on.
UPDATE: The SQLException above was fixed in Questions for Confluence 1.0.618. If you install the latest version, it won't be a problem.