'Page Not Found' when navigating to Confluence Questions due to com.mysema.query.QueryException

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform Notice: Server and Data Center Only. This article only applies to Atlassian products on the server and data center platforms.

Problem

Navigating to the Questions section of Confluence results in this:

The following appears in the 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

Cause

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).

Resolution

Migrate to MySQL 5.6 or 5.5

Last modified on Nov 2, 2018

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.