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

Atlassian JIRA | Roy Hartono [Atlassian] | 6 years ago
  1. 0

    Confluence 3.5.x upgrade failed for SQL Server with case sensitive collation during ContentPermissionConstraintsUpgradeTask. The query that Confluence is trying to execute is in lower case, but the database is configured to Upper case. As a result some columns are not recognized. Sample error: {noformat} 2011-04-18 19:14:35,605 ERROR [main] [atlassian.confluence.upgrade.UpgradeLauncherServletContextListener] contextInitialized Upgrade failed, application will not start: 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'. 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 caused by: java.sql.SQLException: Invalid column name 'groupname'. 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:637) 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) 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) 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) 2011-04-18 19:14:35,621 ERROR [main] [atlassian.confluence.upgrade.UpgradeLauncherServletContextListener] contextInitialized 1 errors were encountered during upgrade: 2011-04-18 19:14:35,621 ERROR [main] [atlassian.confluence.upgrade.UpgradeLauncherServletContextListener] contextInitialized 1: 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'. {noformat}

    Atlassian JIRA | 6 years ago | Roy Hartono [Atlassian]
    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'.
  2. 0

    Confluence 3.5.x upgrade failed for SQL Server with case sensitive collation during ContentPermissionConstraintsUpgradeTask. The query that Confluence is trying to execute is in lower case, but the database is configured to Upper case. As a result some columns are not recognized. Sample error: {noformat} 2011-04-18 19:14:35,605 ERROR [main] [atlassian.confluence.upgrade.UpgradeLauncherServletContextListener] contextInitialized Upgrade failed, application will not start: 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'. 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 caused by: java.sql.SQLException: Invalid column name 'groupname'. 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:637) 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) 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) 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) 2011-04-18 19:14:35,621 ERROR [main] [atlassian.confluence.upgrade.UpgradeLauncherServletContextListener] contextInitialized 1 errors were encountered during upgrade: 2011-04-18 19:14:35,621 ERROR [main] [atlassian.confluence.upgrade.UpgradeLauncherServletContextListener] contextInitialized 1: 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'. {noformat}

    Atlassian JIRA | 6 years ago | Roy Hartono [Atlassian]
    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'.
  3. 0

    **This issue is Sybase-specific. When upgrading from 5.2.3, 6.0.6, or 6.0.12 to 6.1.x or 6.2.x using Sybase, there are exceptions in the console, and the server stops, and the upgrade fails. I have attached the full console output. This issue *PASSED* on: * Tomcat 7.0.23 + Sybase 15.0.2. 6.2.x Revision: 97949. This issue *FAILED* on: * Tomcat 7.0.23 + Sybase 15.0.2. 6.2.x Revision: 97950 Steps to reproduce: 1. Start up Liferay 6.1.x or 6.2.x referencing a 5.2.3, 6.0.6, or 6.0.12 Sybase database. Be sure to include the necessary legacy properties. {code}## ## From portal-legacy-5.2.properties ## users.image.max.height=0 users.image.max.width=0 locale.prepend.friendly.url.style=0 auth.token.check.enabled=false permissions.user.check.algorithm=5 permissions.view.dynamic.inheritance=false image.hook.impl=com.liferay.portal.image.DatabaseHook cdn.host.http=${cdn.host} cdn.host.https=${cdn.host} virtual.hosts.default.community.name= breadcrumb.show.guest.group=false breadcrumb.show.parent.groups=false wiki.page.titles.regexp=([^/\\\\\\[\\]%&?@]+) wiki.page.titles.remove.regexp=([/\\\\\\[\\]%&?@]+) ## ## From portal-legacy-6.0.properties ## users.last.name.required=true portal.security.manager.strategy=liferay layout.types=portlet,panel,embedded,article,url,link_to_layout editor.wysiwyg.portal-web.docroot.html.portlet.message_boards.edit_message.bb_code.jsp=bbcode setup.wizard.enabled=false discussion.subscribe.by.default=false message.boards.subscribe.by.default=false upgrade.processes=\ com.liferay.portal.upgrade.UpgradeProcess_6_0_12_to_6_1_0{code} The following exceptions will display in the console: {code}23:37:48,084 ERROR [MainServlet:198] com.liferay.portal.kernel.events.ActionException: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: java.sql.SQLException: Incorrect syntax near the keyword 'alter'. com.liferay.portal.kernel.events.ActionException: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: java.sql.SQLException: Incorrect syntax near the keyword 'alter'. at com.liferay.portal.events.StartupAction.run(StartupAction.java:58) at com.liferay.portal.servlet.MainServlet.processStartupEvents(MainServlet.java:1267) at com.liferay.portal.servlet.MainServlet.init(MainServlet.java:195) at javax.servlet.GenericServlet.init(GenericServlet.java:160) at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1266) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1185) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1080) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5015) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5302) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:897) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:873) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:649) at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1581) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Caused by: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: java.sql.SQLException: Incorrect syntax near the keyword 'alter'. at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:213) at com.liferay.portal.upgrade.UpgradeProcessUtil._upgradeProcess(UpgradeProcessUtil.java:93) at com.liferay.portal.upgrade.UpgradeProcessUtil.upgradeProcess(UpgradeProcessUtil.java:46) at com.liferay.portal.events.StartupHelper.upgradeProcess(StartupHelper.java:81) at com.liferay.portal.events.StartupHelperUtil.upgradeProcess(StartupHelperUtil.java:48) at com.liferay.portal.tools.DBUpgrader.upgrade(DBUpgrader.java:119) at com.liferay.portal.events.StartupAction.doRun(StartupAction.java:144) at com.liferay.portal.events.StartupAction.run(StartupAction.java:52) ... 20 more Caused by: com.liferay.portal.kernel.upgrade.UpgradeException: java.sql.SQLException: Incorrect syntax near the keyword 'alter'. at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:213) at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:227) at com.liferay.portal.upgrade.UpgradeProcess_6_0_0.doUpgrade(UpgradeProcess_6_0_0.java:53) at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:210) ... 27 more Caused by: java.sql.SQLException: Incorrect syntax near the keyword 'alter'. 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 com.liferay.portal.dao.db.BaseDB.runSQL(BaseDB.java:222) at com.liferay.portal.dao.db.BaseDB.runSQL(BaseDB.java:242) at com.liferay.portal.dao.db.BaseDB.runSQL(BaseDB.java:235) at com.liferay.portal.kernel.upgrade.UpgradeProcess.runSQL(UpgradeProcess.java:117) at com.liferay.portal.upgrade.v6_0_0.UpgradeJournal.doUpgrade(UpgradeJournal.java:30) at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:210) ... 30 more Stopping the server due to unexpected startup errors{code}

    Liferay Issues | 5 years ago | Brian Chiu
    com.liferay.portal.kernel.events.ActionException: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: java.sql.SQLException: Incorrect syntax near the keyword 'alter'.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    jBpm tests-Connection synchronization failed

    jtds | 1 decade ago | mosabua
    java.sql.SQLException: Cannot alter table 'JBPM_ACTION' because this table does not exist in database 'jbpmt est'.
  6. 0

    h3. Summary The upgrade from Bamboo 5.10.3 to 5.11.1.1 fails and the following error can be found in the logs: {{java.sql.SQLException: Invalid column name 'ID'.}} h3. Environment * Upgrade from Bamboo 5.10.3 to 5.11.1.1 * Backend database on SQL Server h3. Steps to Reproduce # Install Bamboo 5.10.3 and run the Setup Wizard # Follow the [Bamboo 5.11.1.1 upgrade guide|https://confluence.atlassian.com/display/BAMBOO/Bamboo+upgrade+guide] to upgrade to that version h3. Expected Results Once Tomcat is started, the upgrade begins and finishes successfully. h3. Actual Results # Once Tomcat is started, the upgrade begins, but upgrade task *51110 : Disallow duplicate trusted keys - remove duplicates* fails with the following exception in the log: {noformat} ERROR [localhost-startStop-1] [AbstractUpgradeManager] java.sql.SQLException: Invalid column name 'ID'. java.sql.SQLException: Invalid column name 'ID'. at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:372) at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2988) at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2421) at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:671) at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:613) at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:572) at net.sourceforge.jtds.jdbc.JtdsStatement.executeImpl(JtdsStatement.java:809) at net.sourceforge.jtds.jdbc.JtdsStatement.executeUpdate(JtdsStatement.java:1288) at net.sourceforge.jtds.jdbc.JtdsStatement.executeUpdate(JtdsStatement.java:1241) at com.mchange.v2.c3p0.impl.NewProxyStatement.executeUpdate(NewProxyStatement.java:64) at com.atlassian.bamboo.upgrade.tasks.v5_11.UpgradeTask51110DisallowDuplicateTrustedKeys.lambda$doUpgrade$20(UpgradeTask51110DisallowDuplicateTrustedKeys.java:46) at com.atlassian.bamboo.upgrade.tasks.v5_11.UpgradeTask51110DisallowDuplicateTrustedKeys$$Lambda$11/405586908.doInHibernateTransaction(Unknown Source) at com.atlassian.bamboo.upgrade.AbstractBootstrapUpgradeTask.withDatabaseConnection(AbstractBootstrapUpgradeTask.java:86) at com.atlassian.bamboo.upgrade.tasks.v5_11.UpgradeTask51110DisallowDuplicateTrustedKeys.doUpgrade(UpgradeTask51110DisallowDuplicateTrustedKeys.java:42) at com.atlassian.bamboo.upgrade.AbstractUpgradeManager.runUpgradeTask(AbstractUpgradeManager.java:206) at com.atlassian.bamboo.upgrade.BootstrapUpgradeManagerImpl.doUpgrade(BootstrapUpgradeManagerImpl.java:59) at com.atlassian.bamboo.setup.DefaultBootstrapManager.performPersistenceUpgrade(DefaultBootstrapManager.java:359) at com.atlassian.config.bootstrap.DefaultAtlassianBootstrapManager.init(DefaultAtlassianBootstrapManager.java:77) at com.atlassian.bamboo.setup.BootstrapLoaderListener.contextInitialized(BootstrapLoaderListener.java:117) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4812) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5255) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) {noformat} h3.Workaround # Stop Bamboo # Backup original {{$BAMBOO_INSTALL/WEB-INF/lib/atlassian-bamboo-deployments-5.11.*.jar}} # Copy attached [^atlassian-bamboo-deployments-5.11.1.1.jar] to {{$BAMBOO_INSTALL/WEB-INF/lib}} # Start Bamboo

    Atlassian JIRA | 7 months ago | Christian Glockner [Atlassian]
    java.sql.SQLException: Invalid column name 'ID'.

    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

      Invalid column name 'username'.

      at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic()
    2. jTDS
      JtdsStatement.executeUpdate
      1. net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:368)
      2. net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2820)
      3. net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2258)
      4. net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:632)
      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.executeUpdate(JtdsStatement.java:1166)
      9. net.sourceforge.jtds.jdbc.JtdsStatement.executeUpdate(JtdsStatement.java:1119)
      9 frames
    3. c3p0:JDBC DataSources/Resource Pools
      NewProxyStatement.executeUpdate
      1. com.mchange.v2.c3p0.impl.NewProxyStatement.executeUpdate(NewProxyStatement.java:64)
      1 frame
    4. Spring Framework
      JdbcTemplate.update
      1. org.springframework.jdbc.core.JdbcTemplate$1UpdateStatementCallback.doInStatement(JdbcTemplate.java:459)
      2. org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:343)
      3. org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:469)
      3 frames
    5. com.atlassian.confluence
      AbstractConstraintCreationUpgradeTask.doUpgrade
      1. com.atlassian.confluence.upgrade.upgradetask.ContentPermissionConstraintsUpgradeTask.removePermissionEntriesWithNoGroupAndUser(ContentPermissionConstraintsUpgradeTask.java:84)
      2. com.atlassian.confluence.upgrade.upgradetask.ContentPermissionConstraintsUpgradeTask.doBeforeUpgrade(ContentPermissionConstraintsUpgradeTask.java:63)
      3. com.atlassian.confluence.upgrade.upgradetask.AbstractConstraintCreationUpgradeTask.doUpgrade(AbstractConstraintCreationUpgradeTask.java:123)
      3 frames
    6. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames
    7. 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
    8. Spring Tx
      TransactionInterceptor.invoke
      1. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
      1 frame
    9. 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
    10. Unknown
      $Proxy34.doUpgrade
      1. $Proxy34.doUpgrade(Unknown Source)
      1 frame
    11. com.atlassian.confluence
      UpgradeLauncherServletContextListener.contextInitialized
      1. com.atlassian.confluence.upgrade.AbstractUpgradeManager.runSchemaUpgradeTasks(AbstractUpgradeManager.java:287)
      2. com.atlassian.confluence.upgrade.AbstractUpgradeManager.upgradeSchema(AbstractUpgradeManager.java:235)
      3. com.atlassian.confluence.upgrade.AbstractUpgradeManager.upgrade(AbstractUpgradeManager.java:87)
      4. com.atlassian.confluence.upgrade.impl.DefaultUpgradeManager.upgrade(DefaultUpgradeManager.java:139)
      5. com.atlassian.confluence.upgrade.UpgradeLauncherServletContextListener.contextInitialized(UpgradeLauncherServletContextListener.java:28)
      5 frames
    12. Glassfish Core
      Catalina.start
      1. org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4205)
      2. org.apache.catalina.core.StandardContext.start(StandardContext.java:4704)
      3. org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
      4. org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
      5. org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
      6. org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
      7. org.apache.catalina.core.StandardService.start(StandardService.java:525)
      8. org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
      9. org.apache.catalina.startup.Catalina.start(Catalina.java:595)
      9 frames
    13. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames
    14. 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