com.atlassian.confluence.upgrade.UpgradeException

Upgrade task com.atlassian.confluence.upgrade.upgradetask.EmbeddedCrowdSchemaUpgradeTask@63af5853 failed during the SCHEMA_UPGRADE phase due to: StatementCallback; bad SQL grammar [SELECT mem1.id, mem1.parent_id, mem1.child_group_id, mem1.child_user_id FROM cwd_membership mem1, cwd_membership mem2 WHERE mem1.id <> mem2.id AND mem1.parent_id = mem2.parent_id AND mem1.child_user_id = mem2.child_user_id ORDER BY mem1.parent_id ASC, mem1.child_user_id ASC, mem1.id ASC]; nested exception is java.sql.SQLException: Invalid object name 'cwd_membership'.

Samebug tips0

There are no available Samebug tips.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web434

  • via by Husein Alatas [Atlassian],
  • via by Husein Alatas [Atlassian],
  • Stack trace

    • com.atlassian.confluence.upgrade.UpgradeException: Upgrade task com.atlassian.confluence.upgrade.upgradetask.EmbeddedCrowdSchemaUpgradeTask@63af5853 failed during the SCHEMA_UPGRADE phase due to: StatementCallback; bad SQL grammar [SELECT mem1.id, mem1.parent_id, mem1.child_group_id, mem1.child_user_id FROM cwd_membership mem1, cwd_membership mem2 WHERE mem1.id <> mem2.id AND mem1.parent_id = mem2.parent_id AND mem1.child_user_id = mem2.child_user_id ORDER BY mem1.parent_id ASC, mem1.child_user_id ASC, mem1.id ASC]; nested exception is java.sql.SQLException: Invalid object name 'cwd_membership'. at com.atlassian.confluence.upgrade.AbstractUpgradeManager.executeUpgradeStep(AbstractUpgradeManager.java:216) at com.atlassian.confluence.upgrade.AbstractUpgradeManager.runSchemaUpgradeTasks(AbstractUpgradeManager.java:135) at com.atlassian.confluence.upgrade.AbstractUpgradeManager.upgrade(AbstractUpgradeManager.java:92) at com.atlassian.confluence.upgrade.impl.DefaultUpgradeManager.upgrade(DefaultUpgradeManager.java:140) at com.atlassian.confluence.upgrade.UpgradeLauncherServletContextListener.contextInitialized(UpgradeLauncherServletContextListener.java:28) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4205) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4704) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardHost.start(StandardHost.java:840) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463) at org.apache.catalina.core.StandardService.start(StandardService.java:525) at org.apache.catalina.core.StandardServer.start(StandardServer.java:754) at org.apache.catalina.startup.Catalina.start(Catalina.java:595) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) Caused by: org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [SELECT mem1.id, mem1.parent_id, mem1.child_group_id, mem1.child_user_id FROM cwd_membership mem1, cwd_membership mem2 WHERE mem1.id <> mem2.id AND mem1.parent_id = mem2.parent_id AND mem1.child_user_id = mem2.child_user_id ORDER BY mem1.parent_id ASC, mem1.child_user_id ASC, mem1.id ASC]; nested exception is java.sql.SQLException: Invalid object name 'cwd_membership'. at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.translate(SQLErrorCodeSQLExceptionTranslator.java:230) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:354) at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:405) at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:409) at com.atlassian.confluence.upgrade.upgradetask.EmbeddedCrowdSchemaUpgradeTask.removeDuplicateUserMemberships(EmbeddedCrowdSchemaUpgradeTask.java:106) at com.atlassian.confluence.upgrade.upgradetask.EmbeddedCrowdSchemaUpgradeTask.doBeforeUpgrade(EmbeddedCrowdSchemaUpgradeTask.java:66) at com.atlassian.confluence.upgrade.upgradetask.AbstractConstraintCreationUpgradeTask.doUpgrade(AbstractConstraintCreationUpgradeTask.java:119) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) at EmbeddedCrowdSchemaUpgradeTask.javaorg.springframework.aop.framework.Rorg.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy34.doUpgrade(Unknown Source) at com.atlassian.confluence.upgrade.AbstractUpgradeManager$UpgradeStep$3.execute(AbstractUpgradeManager.java:428) at com.atlassian.confluence.upgrade.AbstractUpgradeManager.executeUpgradeStep(AbstractUpgradeManager.java:190) ... 19 more Caused by: java.sql.SQLException: Invalid object name 'cwd_membership'. 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) at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQLQuery(JtdsStatement.java:477) at net.sourceforge.jtds.jdbc.JtdsStatement.executeQuery(JtdsStatement.java:1301) at com.mchange.v2.c3p0.impl.NewProxyStatement.executeQuery(NewProxyStatement.java:35) at org.springframework.jdbc.core.JdbcTemplate$1QueryStatementCallback.doInStatement(JdbcTemplate.java:390) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:343) ... 37 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    oddodd
    72 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    23 more bugmates