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

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Atlassian JIRA by Roy Hartono [Atlassian], 1 year ago
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'.
via Atlassian JIRA by Roy Hartono [Atlassian], 1 year ago
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'.
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 org.springframework.jdbc.core.JdbcTemplate$1UpdateStatementCallback.doInStatement(JdbcTemplate.java:459)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:343)
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:171)
at undefined.$Proxy34.doUpgrade(Unknown Source)
at com.atlassian.confluence.upgrade.AbstractUpgradeManager.runSchemaUpgradeTasks(AbstractUpgradeManager.java:287)
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 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)

Users with the same issue

72 times, 7 months ago
3 times, 8 months ago
Once, 1 year ago
2 times, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 8 months ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.