Unknown column 'this.external_id' in 'field list'
Asked by Jamie Edwards:

I am trying to upgrade Confluence from 3.5 to the latest 5.

Before starting, I applied an evaluation license because I am waiting for Atlassian to get back to me about a renewal.

I have followed the utf conversion proceedure religiously: the storage engine is InnoDB, the database isutf and every table/row/column has the coalition utf_bin (confirmed by the queries).

```
-bash-3.2# cat catalina.out | grep "non-default"-bash-3.2# cat ../../confluence-data/logs/atlassian-confluence.log | grep "non-default"-bash-3.2#
```

..

```
-bash-3.2# tail -f ../../confluence-data/logs/atlassian-confluence.log2014-03-02 10:13:53,623 INFO [main] [com.atlassian.confluence.lifecycle] contextInitialized Starting Confluence 5.4.3 [build 4732 based on commit hash f543bd9a3bbc12daed85f6f5e5cba84282599932]2014-03-02 10:13:59,062 INFO [main] [springframework.web.context.ContextLoader] initWebApplicationContext Root WebApplicationContext: initialization started2014-03-02 10:14:07,067 INFO [main] [com.atlassian.confluence.lifecycle] &lt;init&gt; Loading EhCache cache manager2014-03-02 10:14:33,482 WARN [main] [org.springframework.beans.TypeConverterDelegate] findDefaultEditor PropertyEditor [com.sun.beans.editors.EnumEditor] found through deprecated global PropertyEditorManager fallback - consider using a more isolated form of registration, e.g. on the BeanWrapper/BeanFactory!2014-03-02 10:14:50,529 INFO [main] [springframework.web.context.ContextLoader] initWebApplicationContext Root WebApplicationContext: initialization completed in 51466 ms2014-03-02 10:14:51,461 ERROR [main] [atlassian.confluence.upgrade.UpgradeLauncherServletContextListener] contextInitialized 1 errors were encountered during upgrade:2014-03-02 10:14:51,461 ERROR [main] [atlassian.confluence.upgrade.UpgradeLauncherServletContextListener] contextInitialized 1: Unable to upgrade from build number 21622014-03-02 10:14:51,462 WARN [main] [atlassian.confluence.plugin.PluginFrameworkContextListener] contextInitialized Not starting full plugin system due to upgrade or licensing errors2014-03-02 10:14:51,698 WARN [main] [confluence.setup.bandana.ConfluenceDaoBandanaPersister] getObjectFromValue Configuration could not be loaded because class could not be found (context: _GLOBAL, key: atlassian.confluence.smtp.mail.accounts).com.thoughtworks.xstream.converters.ConversionException: No such field com.atlassian.confluence.jmx.JmxSMTPMailServer.debug---- Debugging information ----message             : No such field com.atlassian.confluence.jmx.JmxSMTPMailServer.debugline number         : 16path                : /linked-hash-map/entry/com.atlassian.confluence.jmx.JmxSMTPMailServer/com.atlassian.mail.server.impl.SMTPMailServerImpl/default/debugcause-message       : No such field com.atlassian.confluence.jmx.JmxSMTPMailServer.debugclass               : java.util.LinkedHashMapcause-exception     : com.thoughtworks.xstream.converters.reflection.ObjectAccessExceptionrequired-type       : com.atlassian.confluence.jmx.JmxSMTPMailServer-------------------------------com.thoughtworks.xstream.converters.ConversionException: No such field com.atlassian.confluence.jmx.JmxSMTPMailServer.debug---- Debugging information ----message             : No such field com.atlassian.confluence.jmx.JmxSMTPMailServer.debugline number         : 16path                : /linked-hash-map/entry/com.atlassian.confluence.jmx.JmxSMTPMailServer/com.atlassian.mail.server.impl.SMTPMailServerImpl/default/debugcause-message       : No such field com.atlassian.confluence.jmx.JmxSMTPMailServer.debugclass               : java.util.LinkedHashMapcause-exception     : com.thoughtworks.xstream.converters.reflection.ObjectAccessExceptionrequired-type       : com.atlassian.confluence.jmx.JmxSMTPMailServer-------------------------------        at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:45)        at com.thoughtworks.xstream.core.ReferenceByXPathUnmarshaller.convertAnother(ReferenceByXPathUnmarshaller.java:39)        at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.readItem(AbstractCollectionConverter.java:82)        at com.thoughtworks.xstream.converters.collections.MapConverter.populateMap(MapConverter.java:72)        at com.thoughtworks.xstream.converters.collections.MapConverter.unmarshal(MapConverter.java:59)        at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:38)        at com.thoughtworks.xstream.core.ReferenceByXPathUnmarshaller.convertAnother(ReferenceByXPathUnmarshaller.java:39)        at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:99)        at com.thoughtworks.xstream.core.ReferenceByXPathMarshallingStrategy.unmarshal(ReferenceByXPathMarshallingStrategy.java:12)        at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:549)        at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:537)        at com.thoughtworks.xstream.XStream.fromXML(XStream.java:505)        at com.atlassian.confluence.setup.bandana.XStreamBandanaSerializer.deserialize(XStreamBandanaSerializer.java:27)        at com.atlassian.confluence.setup.bandana.ConfluenceDaoBandanaPersister.getObjectFromValue(ConfluenceDaoBandanaPersister.java:107)        at com.atlassian.confluence.setup.bandana.ConfluenceDaoBandanaPersister.retrieve(ConfluenceDaoBandanaPersister.java:29)        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:307)        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 com.sun.proxy.$Proxy8.retrieve(Unknown Source)        at com.atlassian.confluence.setup.bandana.ConfluenceCachingBandanaPersister.retrieve(ConfluenceCachingBandanaPersister.java:65)        at com.atlassian.bandana.DefaultBandanaManager.getValue(DefaultBandanaManager.java:32)        at com.atlassian.bandana.DefaultBandanaManager.getValue(DefaultBandanaManager.java:24)        at com.atlassian.confluence.mail.ConfluenceMailServerManager.getMailServerMap(ConfluenceMailServerManager.java:73)        at com.atlassian.confluence.mail.ConfluenceMailServerManager.getServerNames(ConfluenceMailServerManager.java:50)        at com.atlassian.confluence.jmx.JmxFilter.doMailServer(JmxFilter.java:79)        at com.atlassian.confluence.jmx.JmxFilter.registerBeans(JmxFilter.java:69)        at com.atlassian.confluence.jmx.JmxFilter.init(JmxFilter.java:48)        at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:295)        at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422)        at org.apache.catalina.core.ApplicationFilterConfig.&lt;init&gt;(ApplicationFilterConfig.java:115)        at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4072)        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4726)        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)        at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)        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(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: com.thoughtworks.xstream.converters.reflection.ObjectAccessException: No such field com.atlassian.confluence.jmx.JmxSMTPMailServer.debug        at com.thoughtworks.xstream.converters.reflection.FieldDictionary.field(FieldDictionary.java:27)        at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.getFieldType(PureJavaReflectionProvider.java:131)        at com.thoughtworks.xstream.converters.reflection.SerializableConverter$2.defaultReadObject(SerializableConverter.java:327)        at com.thoughtworks.xstream.converters.reflection.SerializableConverter.unmarshal(SerializableConverter.java:363)        at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:38)        ... 51 more2014-03-02 10:14:54,506 INFO [main] [com.atlassian.confluence.lifecycle] init Confluence is ready to serve2014-03-02 10:15:45,675 ERROR [http-8080-1] [sf.hibernate.util.JDBCExceptionReporter] logExceptions Unknown column 'this.external_id' in 'field list'2014-03-02 10:15:45,685 ERROR [http-8080-1] [sf.hibernate.util.JDBCExceptionReporter] logExceptions Unknown column 'this.external_id' in 'field list'2014-03-02 10:15:45,688 ERROR [http-8080-1] [[Standalone].[localhost].[/].[jsp]] log Servlet.service() for servlet jsp threw exceptionorg.springframework.jdbc.BadSqlGrammarException: Hibernate operation: Unable to perform find; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'this.external_id' in 'field list'        at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:97)        at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)        at org.springframework.orm.hibernate.HibernateAccessor.convertJdbcAccessException(HibernateAccessor.java:364)        at org.springframework.orm.hibernate.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:351)        at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:375)        at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:337)        at com.atlassian.crowd.embedded.hibernate2.HibernateUserDao.internalFindUser(HibernateUserDao.java:474)        at com.atlassian.crowd.embedded.hibernate2.HibernateUserDao.internalFindByName(HibernateUserDao.java:451)        at com.atlassian.crowd.embedded.hibernate2.HibernateUserDao.findByName(HibernateUserDao.java:431)        at com.atlassian.confluence.user.crowd.CachedCrowdUserDao$1.apply(CachedCrowdUserDao.java:76)        at com.atlassian.confluence.user.crowd.CachedCrowdUserDao$1.apply(CachedCrowdUserDao.java:71)        at com.atlassian.confluence.cache.option.OptionalReadThroughCache.get(OptionalReadThroughCache.java:33)        at com.atlassian.confluence.user.crowd.CachedCrowdUserDao.findUser(CachedCrowdUserDao.java:136)        at com.atlassian.confluence.user.crowd.CachedCrowdUserDao.findByName(CachedCrowdUserDao.java:158)        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:307)        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 com.sun.proxy.$Proxy36.findByName(Unknown Source)        at com.atlassian.crowd.directory.AbstractInternalDirectory.findUserByName(AbstractInternalDirectory.java:150)        at com.atlassian.crowd.directory.AbstractInternalDirectory.findUserByName(AbstractInternalDirectory.java:61)        at com.atlassian.crowd.manager.directory.DirectoryManagerGeneric.findUserByName(DirectoryManagerGeneric.java:298)        at com.atlassian.crowd.manager.application.ApplicationServiceGeneric.findUserByName(ApplicationServiceGeneric.java:289)        at com.atlassian.crowd.embedded.core.CrowdServiceImpl.getUser(CrowdServiceImpl.java:93)        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:307)        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 com.sun.proxy.$Proxy40.getUser(Unknown Source)        at com.atlassian.crowd.embedded.atlassianuser.EmbeddedCrowdUserManager.getUser(EmbeddedCrowdUserManager.java:107)        at com.atlassian.confluence.user.ConfluenceUserManager.getUser(ConfluenceUserManager.java:63)        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:307)        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 com.sun.proxy.$Proxy41.getUser(Unknown Source)        at bucket.user.DefaultUserAccessor.getUser(DefaultUserAccessor.java:154)        at com.atlassian.confluence.user.DefaultUserAccessor.getUserByName(DefaultUserAccessor.java:214)        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:307)        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)        at com.atlassian.spring.interceptors.SpringProfilingInterceptor.invoke(SpringProfilingInterceptor.java:16)        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)        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 com.sun.proxy.$Proxy51.getUserByName(Unknown Source)        at com.atlassian.confluence.user.ConfluenceAuthenticator.getUser(ConfluenceAuthenticator.java:130)        at com.atlassian.confluence.user.ConfluenceAuthenticator.getUser(ConfluenceAuthenticator.java:29)        at com.atlassian.seraph.auth.DefaultAuthenticator.getUserFromCookie(DefaultAuthenticator.java:437)        at com.atlassian.seraph.auth.DefaultAuthenticator.getUser(DefaultAuthenticator.java:327)        at com.atlassian.confluence.user.ConfluenceAuthenticator.getUser(ConfluenceAuthenticator.java:135)        at com.atlassian.seraph.filter.SecurityFilter.doFilter(SecurityFilter.java:125)        at com.atlassian.confluence.web.filter.ConfluenceSecurityFilter.doFilter(ConfluenceSecurityFilter.java:27)        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)        at com.atlassian.seraph.filter.BaseLoginFilter.doFilter(BaseLoginFilter.java:150)        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)        at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46)        at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:77)        at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:63)        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)        at com.atlassian.johnson.filters.AbstractJohnsonFilter.doFilter(AbstractJohnsonFilter.java:41)        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)        at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46)        at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:77)        at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:63)        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)        at com.atlassian.confluence.web.filter.DebugFilter.doFilter(DebugFilter.java:50)        at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)        at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)        at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)        at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)        at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)        at com.atlassian.confluence.web.ConfluenceJohnsonFilter.handleError(ConfluenceJohnsonFilter.java:40)        at com.atlassian.johnson.filters.AbstractJohnsonFilter.doFilter(AbstractJohnsonFilter.java:63)        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)        at org.springframework.orm.hibernate.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:170)        at com.atlassian.spring.filter.FlushingSpringSessionInViewFilter.doFilterInternal(FlushingSpringSessionInViewFilter.java:29)        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)        at com.atlassian.confluence.util.ConfluenceErrorFilter.doFilter(ConfluenceErrorFilter.java:27)        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)        at com.atlassian.util.profiling.filters.ProfilingFilter.doFilter(ProfilingFilter.java:99)        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)        at com.atlassian.confluence.core.datetime.RequestTimeThreadLocalFilter.doFilter(RequestTimeThreadLocalFilter.java:41)        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)        at com.atlassian.gzipfilter.GzipFilter.doFilterInternal(GzipFilter.java:74)        at com.atlassian.gzipfilter.GzipFilter.doFilter(GzipFilter.java:51)        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)        at com.atlassian.core.filters.cache.AbstractCachingFilter.doFilter(AbstractCachingFilter.java:33)        at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)        at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46)        at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:77)        at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:63)        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)        at com.atlassian.confluence.web.filter.validateparam.RequestParamValidationFilter.doFilter(RequestParamValidationFilter.java:58)        at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)        at com.atlassian.confluence.web.filter.TranslationModeFilter.doFilter(TranslationModeFilter.java:43)        at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)        at com.atlassian.confluence.plugin.servlet.filter.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:71)        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)        at com.atlassian.confluence.web.filter.LanguageExtractionFilter.doFilter(LanguageExtractionFilter.java:53)        at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)        at com.atlassian.confluence.util.RequestCacheThreadLocalFilter.doFilter(RequestCacheThreadLocalFilter.java:31)        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)        at com.atlassian.confluence.web.filter.DebugFilter.doFilter(DebugFilter.java:50)        at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)        at com.atlassian.core.filters.encoding.AbstractEncodingFilter.doFilter(AbstractEncodingFilter.java:41)        at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)        at com.atlassian.core.filters.HeaderSanitisingFilter.doFilter(HeaderSanitisingFilter.java:44)        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)        at com.atlassian.confluence.servlet.FourOhFourErrorLoggingFilter.doFilter(FourOhFourErrorLoggingFilter.java:65)        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)        at java.lang.Thread.run(Unknown Source)Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'this.external_id' in 'field list'        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)        at java.lang.reflect.Constructor.newInstance(Unknown Source)        at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)        at com.mysql.jdbc.Util.getInstance(Util.java:381)        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1051)        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3563)        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3495)        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1959)        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2113)        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2693)        at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2102)        at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2261)        at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:76)        at net.sf.hibernate.impl.BatcherImpl.getResultSet(BatcherImpl.java:89)        at net.sf.hibernate.loader.Loader.getResultSet(Loader.java:880)        at net.sf.hibernate.loader.Loader.doQuery(Loader.java:273)        at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:138)        at net.sf.hibernate.loader.Loader.doList(Loader.java:1063)        at net.sf.hibernate.loader.Loader.list(Loader.java:1048)        at net.sf.hibernate.loader.CriteriaLoader.list(CriteriaLoader.java:118)        at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:3675)        at net.sf.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:238)        at net.sf.hibernate.impl.CriteriaImpl.uniqueResult(CriteriaImpl.java:385)        at com.atlassian.crowd.embedded.hibernate2.HibernateUserDao$2.doInHibernate(HibernateUserDao.java:479)        at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:370)        ... 170 more2014-03-02 10:15:45,695 ERROR [http-8080-1] [[Standalone].[localhost].[/].[action]] log Servlet.service() for servlet action threw exceptionorg.springframework.jdbc.BadSqlGrammarException: Hibernate operation: Unable to perform find; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'this.external_id' in 'field list'        at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:97)        at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)        at org.springframework.orm.hibernate.HibernateAccessor.convertJdbcAccessException(HibernateAccessor.java:364)        at org.springframework.orm.hibernate.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:351)        at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:375)        at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:337)        at com.atlassian.crowd.embedded.hibernate2.HibernateUserDao.internalFindUser(HibernateUserDao.java:474)        at com.atlassian.crowd.embedded.hibernate2.HibernateUserDao.internalFindByName(HibernateUserDao.java:451)        at com.atlassian.crowd.embedded.hibernate2.HibernateUserDao.findByName(HibernateUserDao.java:431)        at com.atlassian.confluence.user.crowd.CachedCrowdUserDao$1.apply(CachedCrowdUserDao.java:76)        at com.atlassian.confluence.user.crowd.CachedCrowdUserDao$1.apply(CachedCrowdUserDao.java:71)        at com.atlassian.confluence.cache.option.OptionalReadThroughCache.get(OptionalReadThroughCache.java:33)        at com.atlassian.confluence.user.crowd.CachedCrowdUserDao.findUser(CachedCrowdUserDao.java:136)        at com.atlassian.confluence.user.crowd.CachedCrowdUserDao.findByName(CachedCrowdUserDao.java:158)        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:307)        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 com.sun.proxy.$Proxy36.findByName(Unknown Source)        at com.atlassian.crowd.directory.AbstractInternalDirectory.findUserByName(AbstractInternalDirectory.java:150)        at com.atlassian.crowd.directory.AbstractInternalDirectory.findUserByName(AbstractInternalDirectory.java:61)        at com.atlassian.crowd.manager.directory.DirectoryManagerGeneric.findUserByName(DirectoryManagerGeneric.java:298)        at com.atlassian.crowd.manager.application.ApplicationServiceGeneric.findUserByName(ApplicationServiceGeneric.java:289)        at com.atlassian.crowd.embedded.core.CrowdServiceImpl.getUser(CrowdServiceImpl.java:93)        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:307)        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 com.sun.proxy.$Proxy40.getUser(Unknown Source)        at com.atlassian.crowd.embedded.atlassianuser.EmbeddedCrowdUserManager.getUser(EmbeddedCrowdUserManager.java:107)        at com.atlassian.confluence.user.ConfluenceUserManager.getUser(ConfluenceUserManager.java:63)        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)        at sun.reflect.DelegatingMethodAccessorImpl.invo
```

I am at a loss: the encoding is correct, the coalition is correct, the license is active and up to date for the version I am trying to upgrade to.

Any pointers?


Answers:
author: JohnA
body: Hi Jamie,

I believe the following section of your logs is the telling point here:

```
2014-03-02 10:14:51,461 ERROR [main] [atlassian.confluence.upgrade.UpgradeLauncherServletContextListener] contextInitialized 1: Unable to upgrade from build number 2162
```

What this is suggesting is that it cannot run the upgrade tasks from the version you are currently running to the version you are trying to upgrade to, and as you are upgrading from 3.5 to 5.x my suspicion is that you are skipping the incremental upgrade through 4.3.7. So, try upgrading to 4.3.7, perform the Confluence post-upgrade checks and if it's all good then try upgrading the instance to 5.x from there: [](https://confluence.atlassian.com/display/DOC/Confluence+Post-Upgrade+Checks)<https://confluence.atlassian.com/display/DOC/Confluence+Post-Upgrade+Checks>

All the best,  
John

comments: author: Jamie Edwards
body: That seems like the most likely candidate! I will give it another go.

FYI - [](https://confluence.atlassian.com/display/DOC/Upgrading+from+Confluence+3.5+to+5.1+-+Simplified+Guide)<https://confluence.atlassian.com/display/DOC/Upgrading+from+Confluence+3.5+to+5.1+-+Simplified+Guide>- advises that you can upgrade from 3.5 to 5.0.3 and then upgrade from 5.0.3 to 5.1.4 (which I didn't do - I tried to go 3.5 to 5.2, but pointing this out in case it is incorrect and you have to go 3.5 -\> 4.3.7 -\> 5.2).


author: JohnA
body: Hi Jamie,

The documentation you have linked to is relatively new, and it will have been published in consultation with our development team, so I would recommend going to 5.0.3 as the upgrade increment rather than to 4.3.7, which was the advice we were giving to customers when 5.0 first came out. My guess is that our developers will have stabilised the upgrade tasks in 5.0.3 to allow a smooth passsage from 3.5.x upto v5 without an incremental upgrade, which would make sense because 3.5 is now past its [End of Support Life](https://confluence.atlassian.com/display/Support/Atlassian+Support+End+of+Life+Policy) and we are actively encouraging our customers to upgrade and enjoy all the new features. So, with this in mind, I would recommend that you try upgrading to 5.0.3 and then onto 5.2 from there.

All the best,  
John


author: Joshua Wade
body: Is this the case for upgrading from any Confluence version prior to 4.3.7?


author: Alex Goodchild
body: Hi Jamie,

I encountered similar errors - what did you do to get yours running?  

Thx.

comments: author: Jamie Edwards
body: Hi Alex. It was John's answer above


Tags: confluence-administration

database

utf