TeamCity Fails to Start after Upgrade from 4.5.5 to 5.0 (10380) With SQL Server 2008

I had an installation of TeamCity 4.5.5 on Windows Server 2008 with and SQL Server 2008 that has been working well.  Today, I tried to upgrade to 5.0 (build 10380).  I backed everything up as instructed.  The installer first uninstalled 4.5.5 and then installed 5.0.  Eveything seemed to go fine.

However, when I started up the web for the first time and it tried to upgrade the SQL Server DB I got an error.  The stack dump is at the end of the post.  Is there a way to overcome this or do I need to go back to my backups?

Trace: java.lang.Exception: jetbrains.buildServer.serverSide.versioning.ConvertException: Converter jetbrains.buildServer.serverSide.versioning.VersionManager$43 failed with error: Conversion failed when converting the varchar value 'real-' to data type int. while executing SQL statement: update agent set agent_type_cloud_code = 'A', agent_type_profile_id = 'A', agent_type_type_id = ('real-' + id)
at jetbrains.buildServer.util.SpringExceptionUtil.extractSpringErrorRealInfo(SpringExceptionUtil.java:21)
at jetbrains.buildServer.util.SpringExceptionUtil.unrollException(SpringExceptionUtil.java:5)
at jetbrains.spring.web.TeamCityContextLoaderListener.contextInitialized(TeamCityContextLoaderListener.java:3)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3934)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4429)
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:526)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:630)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:556)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:491)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1206)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314)
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:722)
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:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
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:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'standardBuildProblems' defined in URL [jar:file:/C:/TeamCity/webapps/ROOT/WEB-INF/lib/server.jar!/META-INF/buildServerSpring.xml]: Unsatisfied dependency expressed through constructor argument with index 0 of type [jetbrains.buildServer.ExtensionHolder]: Error creating bean with name 'databaseConverter' defined in URL [jar:file:/C:/TeamCity/webapps/ROOT/WEB-INF/lib/server.jar!/META-INF/buildServerSpring.xml]: Invocation of init method failed; nested exception is jetbrains.buildServer.serverSide.versioning.ConvertException: Converter jetbrains.buildServer.serverSide.versioning.VersionManager$43 failed with error: Conversion failed when converting the varchar value 'real-' to data type int. while executing SQL statement: update agent set agent_type_cloud_code = 'A', agent_type_profile_id = 'A', agent_type_type_id = ('real-' + id)
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:570)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:190)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:923)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:833)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:217)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
at jetbrains.spring.web.TeamCityContextLoaderListener.contextInitialized(TeamCityContextLoaderListener.java:31)
... 24 more

1 comment
Comment actions Permalink

Tom,

This issue is already fixed (http://www.jetbrains.net/tracker/issue/TW-9492).
You can download the fixed version from ftp://ftp.intellij.net/pub/.teamcity/TeamCity-10392/

Before starting the fixed version, please recover the database from backup if exists.
In case of no backup, you can recover it manually as I described in the issue mentioned above.

Best regards,
Leonid

0

Please sign in to leave a comment.