'Page Not Found' when navigating to Confluence Questions due to com.mysema.query.QueryException
プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Fisheye および Crucible は除く
問題
Navigating to the Questions section of Confluence results in this:
atlassian-confluence
.log
に次のメッセージが表示される
2015-12-29 09:12:15,187 ERROR [AtlassianEvent::CustomizableThreadFactory-2] [atlassian.event.internal.AsynchronousAbleEventDispatcher] run There was an exception thrown trying to dispatch event [com.atlassian.confluence.plugins.questions.internal.lifecycle.ActiveObjectsController$AsyncEvent@c52477f] from the invoker [com.atlassian.confluence.event.ConfluenceListenerHandlersConfiguration$TimingListenerHandler$1$1@52251701]
java.lang.RuntimeException: com.atlassian.activeobjects.internal.ActiveObjectsInitException: bundle [com.atlassian.confluence.plugins.confluence-questions]
...
at java.lang.Thread.run(Thread.java:745)
Caused by: java.util.concurrent.ExecutionException: com.atlassian.activeobjects.internal.ActiveObjectsInitException: bundle [com.atlassian.confluence.plugins.confluence-questions]
at com.google.common.util.concurrent.AbstractFuture$Sync.getValue(AbstractFuture.java:331)
at com.google.common.util.concurrent.AbstractFuture$Sync.get(AbstractFuture.java:318)
....
at java.lang.reflect.Method.invoke(Method.java:497)
at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:36)
... 5 more
Caused by: com.atlassian.activeobjects.internal.ActiveObjectsInitException: bundle [com.atlassian.confluence.plugins.confluence-questions]
at com.atlassian.activeobjects.osgi.TenantAwareActiveObjects$1$1$1.call(TenantAwareActiveObjects.java:95)
at com.atlassian.activeobjects.osgi.TenantAwareActiveObjects$1$1$1.call(TenantAwareActiveObjects.java:86)
at com.atlassian.sal.core.executor.ThreadLocalDelegateCallable.call(ThreadLocalDelegateCallable.java:38)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
... 3 more
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
原因
This is a problem caused by MySQL 5.7 which has new rules related to syntax. From Supported Platforms, Confluence 5.9.x only supports MySQL 5.6.x and 5.5.x (not tested with 5.7).
ソリューション
Migrate to MySQL 5.6 or 5.5