com.atlassian.confluence.upgrade.UpgradeException

Schema upgrade task [ com.atlassian.confluence.upgrade.upgradetask.ContentPermissionConstraintsUpgradeTask@1c669dc ] failed due to : StatementCallback; bad SQL grammar [DELETE FROM CONTENT_PERM WHERE username IS NULL AND groupname IS NULL]; nested exception is java.sql.SQLException: Invalid column name 'username'.

Samebug tips0

We couldn't find tips for this exception.

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

Solutions on the web436

  • via Unknown by Roy Hartono [Atlassian],
  • via Unknown by Roy Hartono [Atlassian],
  • via Unknown by Brian Chiu,
  • Stack trace

    • com.atlassian.confluence.upgrade.UpgradeException: Schema upgrade task [ com.atlassian.confluence.upgrade.upgradetask.ContentPermissionConstraintsUpgradeTask@1c669dc ] failed due to : StatementCallback; bad SQL grammar [DELETE FROM CONTENT_PERM WHERE username IS NULL AND groupname IS NULL]; nested exception is java.sql.SQLException: Invalid column name 'username'. at com.atlassian.confluence.upgrade.AbstractUpgradeManager.runSchemaUpgradeTasks(AbstractUpgradeManager.java:292) at com.atlassian.confluence.upgrade.AbstractUpgradeManager.upgradeSchema(AbstractUpgradeManager.java:235) at com.atlassian.confluence.upgrade.AbstractUpgradeManager.upgrade(AbstractUpgradeManager.java:87) at com.atlassian.confluence.upgrade.impl.DefaultUpgradeManager.upgrade(DefaultUpgradeManager.java:139) 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 [DELETE FROM CONTENT_PERM WHERE username IS NULL AND groupname IS NULL]; nested exception is java.sql.SQLException: Invalid column name 'username'. 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.update(JdbcTemplate.java:469) at com.atlassian.confluence.upgrade.upgradetask.ContentPermissionConstraintsUpgradeTask.removePermissionEntriesWithNoGroupAndUser(ContentPermissionConstraintsUpgradeTask.java:84) at com.atlassian.confluence.upgrade.upgradetask.ContentPermissionConstraintsUpgradeTask.doBeforeUpgrade(ContentPermissionConstraintsUpgradeTask.java:63) at com.atlassian.confluence.upgrade.upgradetask.AbstractConstraintCreationUpgradeTask.doUpgrade(AbstractConstraintCreationUpgradeTask.java:123) 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 org.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.runSchemaUpgradeTasks(AbstractUpgradeManager.java:287) ... 19 more Caused by: java.sql.SQLException: Invalid column name 'username'. at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:368) at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2820) at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2258) at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:632) at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:584) at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:546) at net.sourceforge.jtds.jdbc.JtdsStatement.executeImpl(JtdsStatement.java:723) at net.sourceforge.jtds.jdbc.JtdsStatement.executeUpdate(JtdsStatement.java:1166) at net.sourceforge.jtds.jdbc.JtdsStatement.executeUpdate(JtdsStatement.java:1119) at com.mchange.v2.c3p0.impl.NewProxyStatement.executeUpdate(NewProxyStatement.java:64) at org.springframework.jdbc.core.JdbcTemplate$1UpdateStatementCallback.doInStatement(JdbcTemplate.java:459) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:343) ... 35 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

    oddodd
    72 times, last one
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    EricEric
    3 times, last one
    Unknown visitor
    Unknown visitorOnce,
    22 more bugmates