com.atlassian.confluence.upgrade.UpgradeException: Upgrade task com.atlassian.confluence.upgrade.upgradetask.ContentPermissionConstraintsUpgradeTask@fa328aa failed during the SCHEMA_UPGRADE phase due to: StatementCallback; uncategorized SQLException for SQL [alter table CONTENT_PERM alter column CPS_ID numeric(19,0) not null]; SQL state [S1000]; error code [5074]; The object 'cp_unique_group' is dependent on column 'CPS_ID'.; nested exception is java.sql.SQLException: The object 'cp_unique_group' is dependent on column 'CPS_ID'.

Atlassian JIRA | Vincent Choy [Atlassian] | 5 years ago
  1. 0

    h2. When upgrading from 3.5.2 to 3.5.13 or higher with SQL Server h4. Problem description Confluence throws an error like this: {noformat} 2011-09-08 07:53:52,733 ERROR [Thread-2] [atlassian.confluence.upgrade.UpgradeLauncherServletContextListener] contextInitialized Upgrade failed, application will not start: Upgrade task com.atlassian.confluence.upgrade.upgradetask.ContentPermissionConstraintsUpgradeTask@fa328aa failed during the SCHEMA_UPGRADE phase due to: StatementCallback; uncategorized SQLException for SQL [alter table CONTENT_PERM alter column CPS_ID numeric(19,0) not null]; SQL state [S1000]; error code [5074]; The object 'cp_unique_group' is dependent on column 'CPS_ID'.; nested exception is java.sql.SQLException: The object 'cp_unique_group' is dependent on column 'CPS_ID'. com.atlassian.confluence.upgrade.UpgradeException: Upgrade task com.atlassian.confluence.upgrade.upgradetask.ContentPermissionConstraintsUpgradeTask@fa328aa failed during the SCHEMA_UPGRADE phase due to: StatementCallback; uncategorized SQLException for SQL [alter table CONTENT_PERM alter column CPS_ID numeric(19,0) not null]; SQL state [S1000]; error code [5074]; The object 'cp_unique_group' is dependent on column 'CPS_ID'.; nested exception is java.sql.SQLException: The object 'cp_unique_group' is dependent on column 'CPS_ID'. 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:3972) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4467) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardHost.start(StandardHost.java:785) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:519) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:581) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) 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.UncategorizedSQLException: StatementCallback; uncategorized SQLException for SQL [alter table CONTENT_PERM alter column CPS_ID numeric(19,0) not null]; SQL state [S1000]; error code [5074]; The object 'cp_unique_group' is dependent on column 'CPS_ID'.; nested exception is java.sql.SQLException: The object 'cp_unique_group' is dependent on column 'CPS_ID'. at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.translate(SQLStateSQLExceptionTranslator.java:120) at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.translate(SQLErrorCodeSQLExceptionTranslator.java:276) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:354) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:376) at com.atlassian.confluence.upgrade.ddl.DdlExecutor.executeDdlStatements(DdlExecutor.java:50) at com.atlassian.confluence.upgrade.ddl.DdlExecutor$$FastClassByCGLIB$$cf93a722.invoke(<generated>) at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149) at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:696) 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.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:631) at com.atlassian.confluence.upgrade.ddl.DdlExecutor$$EnhancerByCGLIB$$d4db43d3.executeDdlStatements(<generated>) at com.atlassian.confluence.upgrade.ddl.AlterTableExecutor.alterTableGrouped(AlterTableExecutor.java:81) at com.atlassian.confluence.upgrade.ddl.AlterTableExecutor.alterTable(AlterTableExecutor.java:61) at com.atlassian.confluence.upgrade.ddl.AlterTableExecutor$$FastClassByCGLIB$$d4efbaa8.invoke(<generated>) at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149) at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:696) 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.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:631) at com.atlassian.confluence.upgrade.ddl.AlterTableExecutor$$EnhancerByCGLIB$$237a89d9.alterTable(<generated>) at com.atlassian.confluence.upgrade.upgradetask.ContentPermissionConstraintsUpgradeTask.doUpgrade(ContentPermissionConstraintsUpgradeTask.java:163) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) 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 $Proxy35.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) ... 28 more Caused by: java.sql.SQLException: The object 'cp_unique_group' is dependent on column 'CPS_ID'. 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.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.execute(JtdsStatement.java:1157) at com.mchange.v2.c3p0.impl.NewProxyStatement.execute(NewProxyStatement.java:1006) at org.springframework.jdbc.core.JdbcTemplate$1ExecuteStatementCallback.doInStatement(JdbcTemplate.java:369) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:343) ... 62 more caused by: java.sql.SQLException: The object 'cp_unique_user' is dependent on column 'CPS_ID'. 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:636) 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.execute(JtdsStatement.java:1157) at com.mchange.v2.c3p0.impl.NewProxyStatement.execute(NewProxyStatement.java:1006) at org.springframework.jdbc.core.JdbcTemplate$1ExecuteStatementCallback.doInStatement(JdbcTemplate.java:369) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:343) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:376) at com.atlassian.confluence.upgrade.ddl.DdlExecutor.executeDdlStatements(DdlExecutor.java:50) at com.atlassian.confluence.upgrade.ddl.DdlExecutor$$FastClassByCGLIB$$cf93a722.invoke(<generated>) at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149) at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:696) 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.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:631) at com.atlassian.confluence.upgrade.ddl.DdlExecutor$$EnhancerByCGLIB$$d4db43d3.executeDdlStatements(<generated>) at com.atlassian.confluence.upgrade.ddl.AlterTableExecutor.alterTableGrouped(AlterTableExecutor.java:81) at com.atlassian.confluence.upgrade.ddl.AlterTableExecutor.alterTable(AlterTableExecutor.java:61) at com.atlassian.confluence.upgrade.ddl.AlterTableExecutor$$FastClassByCGLIB$$d4efbaa8.invoke(<generated>) at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149) at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:696) 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.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:631) at com.atlassian.confluence.upgrade.ddl.AlterTableExecutor$$EnhancerByCGLIB$$237a89d9.alterTable(<generated>) at com.atlassian.confluence.upgrade.upgradetask.ContentPermissionConstraintsUpgradeTask.doUpgrade(ContentPermissionConstraintsUpgradeTask.java:163) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) 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 $Proxy35.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) 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:3972) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4467) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardHost.start(StandardHost.java:785) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:519) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:581) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) caused by: java.sql.SQLException: ALTER TABLE ALTER COLUMN CPS_ID failed because one or more objects access this column. 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:636) 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.execute(JtdsStatement.java:1157) at com.mchange.v2.c3p0.impl.NewProxyStatement.execute(NewProxyStatement.java:1006) at org.springframework.jdbc.core.JdbcTemplate$1ExecuteStatementCallback.doInStatement(JdbcTemplate.java:369) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:343) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:376) at com.atlassian.confluence.upgrade.ddl.DdlExecutor.executeDdlStatements(DdlExecutor.java:50) at com.atlassian.confluence.upgrade.ddl.DdlExecutor$$FastClassByCGLIB$$cf93a722.invoke(<generated>) at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149) at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:696) 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.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:631) at com.atlassian.confluence.upgrade.ddl.DdlExecutor$$EnhancerByCGLIB$$d4db43d3.executeDdlStatements(<generated>) at com.atlassian.confluence.upgrade.ddl.AlterTableExecutor.alterTableGrouped(AlterTableExecutor.java:81) at com.atlassian.confluence.upgrade.ddl.AlterTableExecutor.alterTable(AlterTableExecutor.java:61) at com.atlassian.confluence.upgrade.ddl.AlterTableExecutor$$FastClassByCGLIB$$d4efbaa8.invoke(<generated>) at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149) at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:696) 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.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:631) at com.atlassian.confluence.upgrade.ddl.AlterTableExecutor$$EnhancerByCGLIB$$237a89d9.alterTable(<generated>) at com.atlassian.confluence.upgrade.upgradetask.ContentPermissionConstraintsUpgradeTask.doUpgrade(ContentPermissionConstraintsUpgradeTask.java:163) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) 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 $Proxy35.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) 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:3972) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4467) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardHost.start(StandardHost.java:785) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:519) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:581) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) {noformat} h4. Cause The constraints should not exist for SQL Server, and were accidentally added in 3.5.2 - SQL Server requires other constraints that will be added by the upgrade. h4. Workaround h5. Recommended Workaround * Roll back the database and home ("data") directory to pre-upgraded state * Upgrade to Confluence 3.5.17 h5. Manual Workaround * Roll back the database and home ("data") directory to pre-upgraded state * Run these SQL statements: {noformat} alter table CONTENT_PERM drop constraint cp_unique_user; alter table CONTENT_PERM drop constraint cp_unique_group; alter table CONTENT_PERM_SET drop constraint cps_unique_type; {noformat} * Upgrade to 3.5.13 or higher as usual h2. When upgrading to Confluence >3.5 with non-english locales (MySQL, Postgres, HSQLDB, Sql Server) h4. Problem description {noformat} [atlassian.confluence.upgrade.UpgradeLauncherServletContextListener] contextInitialized Upgrade failed, application will not start: Upgrade task com.atlassian.confluence.upgrade.upgradetask.ContentPermissionConstraintsUpgradeTask@6f4ea4a2 failed during the SCHEMA_UPGRADE phase due to: StatementCallback; bad SQL grammar [alter table CONTENT_PERM alter column CPS_ID set not null, add constraint cp_unique_user unique (CPS_ID, CP_TYPE, USERNAME), add constraint cp_unique_group unique (CPS_ID, CP_TYPE, GROUPNAME)]; nested exception is org.postgresql.util.PSQLException: FEHLER: Relation »cp_unique_user« existiert bereits {noformat} h4. Cause For MySQL, Postgres, Sql Server and HSQLDB the upgrade tasks will fail to detect that the constraints already exist on non-english locales, so the upgrade for these DB types will fail. h4. Workaround h5. Recommended Workaround * Roll back the database and home ("data") directory to pre-upgraded state * Upgrade to 4.2 or higher as usual h5. Manual Workaround * Roll back the database and home ("data") directory to pre-upgraded state * Run these SQL statements: {noformat} alter table CONTENT_PERM drop constraint cp_unique_user; alter table CONTENT_PERM drop constraint cp_unique_group; alter table CONTENT_PERM_SET drop constraint cps_unique_type; {noformat} * Upgrade to 3.5.13 or higher as usual

    Atlassian JIRA | 5 years ago | Vincent Choy [Atlassian]
    com.atlassian.confluence.upgrade.UpgradeException: Upgrade task com.atlassian.confluence.upgrade.upgradetask.ContentPermissionConstraintsUpgradeTask@fa328aa failed during the SCHEMA_UPGRADE phase due to: StatementCallback; uncategorized SQLException for SQL [alter table CONTENT_PERM alter column CPS_ID numeric(19,0) not null]; SQL state [S1000]; error code [5074]; The object 'cp_unique_group' is dependent on column 'CPS_ID'.; nested exception is java.sql.SQLException: The object 'cp_unique_group' is dependent on column 'CPS_ID'.
  2. 0

    h2. When upgrading from 3.5.2 to 3.5.13 or higher with SQL Server h4. Problem description Confluence throws an error like this: {noformat} 2011-09-08 07:53:52,733 ERROR [Thread-2] [atlassian.confluence.upgrade.UpgradeLauncherServletContextListener] contextInitialized Upgrade failed, application will not start: Upgrade task com.atlassian.confluence.upgrade.upgradetask.ContentPermissionConstraintsUpgradeTask@fa328aa failed during the SCHEMA_UPGRADE phase due to: StatementCallback; uncategorized SQLException for SQL [alter table CONTENT_PERM alter column CPS_ID numeric(19,0) not null]; SQL state [S1000]; error code [5074]; The object 'cp_unique_group' is dependent on column 'CPS_ID'.; nested exception is java.sql.SQLException: The object 'cp_unique_group' is dependent on column 'CPS_ID'. com.atlassian.confluence.upgrade.UpgradeException: Upgrade task com.atlassian.confluence.upgrade.upgradetask.ContentPermissionConstraintsUpgradeTask@fa328aa failed during the SCHEMA_UPGRADE phase due to: StatementCallback; uncategorized SQLException for SQL [alter table CONTENT_PERM alter column CPS_ID numeric(19,0) not null]; SQL state [S1000]; error code [5074]; The object 'cp_unique_group' is dependent on column 'CPS_ID'.; nested exception is java.sql.SQLException: The object 'cp_unique_group' is dependent on column 'CPS_ID'. 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:3972) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4467) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardHost.start(StandardHost.java:785) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:519) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:581) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) 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.UncategorizedSQLException: StatementCallback; uncategorized SQLException for SQL [alter table CONTENT_PERM alter column CPS_ID numeric(19,0) not null]; SQL state [S1000]; error code [5074]; The object 'cp_unique_group' is dependent on column 'CPS_ID'.; nested exception is java.sql.SQLException: The object 'cp_unique_group' is dependent on column 'CPS_ID'. at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.translate(SQLStateSQLExceptionTranslator.java:120) at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.translate(SQLErrorCodeSQLExceptionTranslator.java:276) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:354) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:376) at com.atlassian.confluence.upgrade.ddl.DdlExecutor.executeDdlStatements(DdlExecutor.java:50) at com.atlassian.confluence.upgrade.ddl.DdlExecutor$$FastClassByCGLIB$$cf93a722.invoke(<generated>) at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149) at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:696) 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.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:631) at com.atlassian.confluence.upgrade.ddl.DdlExecutor$$EnhancerByCGLIB$$d4db43d3.executeDdlStatements(<generated>) at com.atlassian.confluence.upgrade.ddl.AlterTableExecutor.alterTableGrouped(AlterTableExecutor.java:81) at com.atlassian.confluence.upgrade.ddl.AlterTableExecutor.alterTable(AlterTableExecutor.java:61) at com.atlassian.confluence.upgrade.ddl.AlterTableExecutor$$FastClassByCGLIB$$d4efbaa8.invoke(<generated>) at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149) at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:696) 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.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:631) at com.atlassian.confluence.upgrade.ddl.AlterTableExecutor$$EnhancerByCGLIB$$237a89d9.alterTable(<generated>) at com.atlassian.confluence.upgrade.upgradetask.ContentPermissionConstraintsUpgradeTask.doUpgrade(ContentPermissionConstraintsUpgradeTask.java:163) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) 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 $Proxy35.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) ... 28 more Caused by: java.sql.SQLException: The object 'cp_unique_group' is dependent on column 'CPS_ID'. 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.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.execute(JtdsStatement.java:1157) at com.mchange.v2.c3p0.impl.NewProxyStatement.execute(NewProxyStatement.java:1006) at org.springframework.jdbc.core.JdbcTemplate$1ExecuteStatementCallback.doInStatement(JdbcTemplate.java:369) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:343) ... 62 more caused by: java.sql.SQLException: The object 'cp_unique_user' is dependent on column 'CPS_ID'. 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:636) 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.execute(JtdsStatement.java:1157) at com.mchange.v2.c3p0.impl.NewProxyStatement.execute(NewProxyStatement.java:1006) at org.springframework.jdbc.core.JdbcTemplate$1ExecuteStatementCallback.doInStatement(JdbcTemplate.java:369) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:343) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:376) at com.atlassian.confluence.upgrade.ddl.DdlExecutor.executeDdlStatements(DdlExecutor.java:50) at com.atlassian.confluence.upgrade.ddl.DdlExecutor$$FastClassByCGLIB$$cf93a722.invoke(<generated>) at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149) at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:696) 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.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:631) at com.atlassian.confluence.upgrade.ddl.DdlExecutor$$EnhancerByCGLIB$$d4db43d3.executeDdlStatements(<generated>) at com.atlassian.confluence.upgrade.ddl.AlterTableExecutor.alterTableGrouped(AlterTableExecutor.java:81) at com.atlassian.confluence.upgrade.ddl.AlterTableExecutor.alterTable(AlterTableExecutor.java:61) at com.atlassian.confluence.upgrade.ddl.AlterTableExecutor$$FastClassByCGLIB$$d4efbaa8.invoke(<generated>) at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149) at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:696) 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.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:631) at com.atlassian.confluence.upgrade.ddl.AlterTableExecutor$$EnhancerByCGLIB$$237a89d9.alterTable(<generated>) at com.atlassian.confluence.upgrade.upgradetask.ContentPermissionConstraintsUpgradeTask.doUpgrade(ContentPermissionConstraintsUpgradeTask.java:163) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) 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 $Proxy35.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) 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:3972) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4467) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardHost.start(StandardHost.java:785) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:519) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:581) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) caused by: java.sql.SQLException: ALTER TABLE ALTER COLUMN CPS_ID failed because one or more objects access this column. 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:636) 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.execute(JtdsStatement.java:1157) at com.mchange.v2.c3p0.impl.NewProxyStatement.execute(NewProxyStatement.java:1006) at org.springframework.jdbc.core.JdbcTemplate$1ExecuteStatementCallback.doInStatement(JdbcTemplate.java:369) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:343) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:376) at com.atlassian.confluence.upgrade.ddl.DdlExecutor.executeDdlStatements(DdlExecutor.java:50) at com.atlassian.confluence.upgrade.ddl.DdlExecutor$$FastClassByCGLIB$$cf93a722.invoke(<generated>) at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149) at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:696) 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.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:631) at com.atlassian.confluence.upgrade.ddl.DdlExecutor$$EnhancerByCGLIB$$d4db43d3.executeDdlStatements(<generated>) at com.atlassian.confluence.upgrade.ddl.AlterTableExecutor.alterTableGrouped(AlterTableExecutor.java:81) at com.atlassian.confluence.upgrade.ddl.AlterTableExecutor.alterTable(AlterTableExecutor.java:61) at com.atlassian.confluence.upgrade.ddl.AlterTableExecutor$$FastClassByCGLIB$$d4efbaa8.invoke(<generated>) at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149) at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:696) 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.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:631) at com.atlassian.confluence.upgrade.ddl.AlterTableExecutor$$EnhancerByCGLIB$$237a89d9.alterTable(<generated>) at com.atlassian.confluence.upgrade.upgradetask.ContentPermissionConstraintsUpgradeTask.doUpgrade(ContentPermissionConstraintsUpgradeTask.java:163) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) 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 $Proxy35.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) 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:3972) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4467) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardHost.start(StandardHost.java:785) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:519) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:581) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) {noformat} h4. Cause The constraints should not exist for SQL Server, and were accidentally added in 3.5.2 - SQL Server requires other constraints that will be added by the upgrade. h4. Workaround h5. Recommended Workaround * Roll back the database and home ("data") directory to pre-upgraded state * Upgrade to Confluence 3.5.17 h5. Manual Workaround * Roll back the database and home ("data") directory to pre-upgraded state * Run these SQL statements: {noformat} alter table CONTENT_PERM drop constraint cp_unique_user; alter table CONTENT_PERM drop constraint cp_unique_group; alter table CONTENT_PERM_SET drop constraint cps_unique_type; {noformat} * Upgrade to 3.5.13 or higher as usual h2. When upgrading to Confluence >3.5 with non-english locales (MySQL, Postgres, HSQLDB, Sql Server) h4. Problem description {noformat} [atlassian.confluence.upgrade.UpgradeLauncherServletContextListener] contextInitialized Upgrade failed, application will not start: Upgrade task com.atlassian.confluence.upgrade.upgradetask.ContentPermissionConstraintsUpgradeTask@6f4ea4a2 failed during the SCHEMA_UPGRADE phase due to: StatementCallback; bad SQL grammar [alter table CONTENT_PERM alter column CPS_ID set not null, add constraint cp_unique_user unique (CPS_ID, CP_TYPE, USERNAME), add constraint cp_unique_group unique (CPS_ID, CP_TYPE, GROUPNAME)]; nested exception is org.postgresql.util.PSQLException: FEHLER: Relation »cp_unique_user« existiert bereits {noformat} h4. Cause For MySQL, Postgres, Sql Server and HSQLDB the upgrade tasks will fail to detect that the constraints already exist on non-english locales, so the upgrade for these DB types will fail. h4. Workaround h5. Recommended Workaround * Roll back the database and home ("data") directory to pre-upgraded state * Upgrade to 4.2 or higher as usual h5. Manual Workaround * Roll back the database and home ("data") directory to pre-upgraded state * Run these SQL statements: {noformat} alter table CONTENT_PERM drop constraint cp_unique_user; alter table CONTENT_PERM drop constraint cp_unique_group; alter table CONTENT_PERM_SET drop constraint cps_unique_type; {noformat} * Upgrade to 3.5.13 or higher as usual

    Atlassian JIRA | 5 years ago | Vincent Choy [Atlassian]
    com.atlassian.confluence.upgrade.UpgradeException: Upgrade task com.atlassian.confluence.upgrade.upgradetask.ContentPermissionConstraintsUpgradeTask@fa328aa failed during the SCHEMA_UPGRADE phase due to: StatementCallback; uncategorized SQLException for SQL [alter table CONTENT_PERM alter column CPS_ID numeric(19,0) not null]; SQL state [S1000]; error code [5074]; The object 'cp_unique_group' is dependent on column 'CPS_ID'.; nested exception is java.sql.SQLException: The object 'cp_unique_group' is dependent on column 'CPS_ID'.
  3. 0

    new JDBC support in lift-mapper

    Google Groups | 8 years ago | alm4...@gmail.com
    java.sql.SQLException: There is already an object named 'modifiers' in the database.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    GitHub comment 14#4264083

    GitHub | 8 years ago | tjweir
    java.sql.SQLException: Incorrect syntax near the keyword 'COLUMN'.
  6. 0

    Exception during upgrade in build #7888

    YouTrack | 8 years ago
    org.springframework.jdbc.UncategorizedSQLException: ConnectionCallback; uncategorized SQLException for SQL []; SQL state [S1000]; error code [5074]; The object 'PK__duplicate_fragme__5AEE82B9' is dependent on column 'FRAGMENT_ID'.; nested exception is java.sql.SQLException: The object 'PK__duplicate_fragme__5AEE82B9' is dependent on column 'FRAGMENT_ID'.

  1. abrazeneb 8 times, last 4 months ago
1 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.sql.SQLException

    The object 'cp_unique_group' is dependent on column 'CPS_ID'.

    at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic()
  2. jTDS
    JtdsStatement.execute
    1. net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:368)
    2. net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2816)
    3. net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2254)
    4. net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:631)
    5. net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:584)
    6. net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:546)
    7. net.sourceforge.jtds.jdbc.JtdsStatement.executeImpl(JtdsStatement.java:723)
    8. net.sourceforge.jtds.jdbc.JtdsStatement.execute(JtdsStatement.java:1157)
    8 frames
  3. c3p0:JDBC DataSources/Resource Pools
    NewProxyStatement.execute
    1. com.mchange.v2.c3p0.impl.NewProxyStatement.execute(NewProxyStatement.java:1006)
    1 frame
  4. Spring Framework
    JdbcTemplate.execute
    1. org.springframework.jdbc.core.JdbcTemplate$1ExecuteStatementCallback.doInStatement(JdbcTemplate.java:369)
    2. org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:343)
    3. org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:376)
    3 frames
  5. com.atlassian.confluence
    DdlExecutor$$FastClassByCGLIB$$cf93a722.invoke
    1. com.atlassian.confluence.upgrade.ddl.DdlExecutor.executeDdlStatements(DdlExecutor.java:50)
    2. com.atlassian.confluence.upgrade.ddl.DdlExecutor$$FastClassByCGLIB$$cf93a722.invoke(<generated>)
    2 frames
  6. IDEA
    MethodProxy.invoke
    1. net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
    1 frame
  7. Spring AOP
    ReflectiveMethodInvocation.proceed
    1. org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:696)
    2. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
    2 frames
  8. Spring Tx
    TransactionInterceptor.invoke
    1. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
    1 frame
  9. Spring AOP
    Cglib2AopProxy$DynamicAdvisedInterceptor.intercept
    1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    2. org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:631)
    2 frames
  10. com.atlassian.confluence
    AlterTableExecutor$$FastClassByCGLIB$$d4efbaa8.invoke
    1. com.atlassian.confluence.upgrade.ddl.DdlExecutor$$EnhancerByCGLIB$$d4db43d3.executeDdlStatements(<generated>)
    2. com.atlassian.confluence.upgrade.ddl.AlterTableExecutor.alterTableGrouped(AlterTableExecutor.java:81)
    3. com.atlassian.confluence.upgrade.ddl.AlterTableExecutor.alterTable(AlterTableExecutor.java:61)
    4. com.atlassian.confluence.upgrade.ddl.AlterTableExecutor$$FastClassByCGLIB$$d4efbaa8.invoke(<generated>)
    4 frames
  11. IDEA
    MethodProxy.invoke
    1. net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
    1 frame
  12. Spring AOP
    ReflectiveMethodInvocation.proceed
    1. org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:696)
    2. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
    2 frames
  13. Spring Tx
    TransactionInterceptor.invoke
    1. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
    1 frame
  14. Spring AOP
    Cglib2AopProxy$DynamicAdvisedInterceptor.intercept
    1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    2. org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:631)
    2 frames
  15. com.atlassian.confluence
    ContentPermissionConstraintsUpgradeTask.doUpgrade
    1. com.atlassian.confluence.upgrade.ddl.AlterTableExecutor$$EnhancerByCGLIB$$237a89d9.alterTable(<generated>)
    2. com.atlassian.confluence.upgrade.upgradetask.ContentPermissionConstraintsUpgradeTask.doUpgrade(ContentPermissionConstraintsUpgradeTask.java:163)
    2 frames
  16. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    4. java.lang.reflect.Method.invoke(Unknown Source)
    4 frames
  17. Spring AOP
    ReflectiveMethodInvocation.proceed
    1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
    2. org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
    3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
    3 frames
  18. Spring Tx
    TransactionInterceptor.invoke
    1. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
    1 frame
  19. Spring AOP
    JdkDynamicAopProxy.invoke
    1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
    2 frames
  20. Unknown
    $Proxy35.doUpgrade
    1. $Proxy35.doUpgrade(Unknown Source)
    1 frame
  21. com.atlassian.confluence
    UpgradeLauncherServletContextListener.contextInitialized
    1. com.atlassian.confluence.upgrade.AbstractUpgradeManager$UpgradeStep$3.execute(AbstractUpgradeManager.java:428)
    2. com.atlassian.confluence.upgrade.AbstractUpgradeManager.executeUpgradeStep(AbstractUpgradeManager.java:190)
    3. com.atlassian.confluence.upgrade.AbstractUpgradeManager.runSchemaUpgradeTasks(AbstractUpgradeManager.java:135)
    4. com.atlassian.confluence.upgrade.AbstractUpgradeManager.upgrade(AbstractUpgradeManager.java:92)
    5. com.atlassian.confluence.upgrade.impl.DefaultUpgradeManager.upgrade(DefaultUpgradeManager.java:140)
    6. com.atlassian.confluence.upgrade.UpgradeLauncherServletContextListener.contextInitialized(UpgradeLauncherServletContextListener.java:28)
    6 frames
  22. Glassfish Core
    Catalina.start
    1. org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3972)
    2. org.apache.catalina.core.StandardContext.start(StandardContext.java:4467)
    3. org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
    4. org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
    5. org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
    6. org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637)
    7. org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563)
    8. org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498)
    9. org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
    10. org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
    11. org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
    12. org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
    13. org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
    14. org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    15. org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
    16. org.apache.catalina.core.StandardService.start(StandardService.java:519)
    17. org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
    18. org.apache.catalina.startup.Catalina.start(Catalina.java:581)
    18 frames
  23. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    4. java.lang.reflect.Method.invoke(Unknown Source)
    4 frames
  24. Glassfish Core
    Bootstrap.main
    1. org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
    2. org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
    2 frames