Error upgrading to latest EAP 5.0

Hi

I'm trying to upgrade our server to the latest 5.0 EAP but I'm getting the following error when browsing to the portal for the first time.  Seems like the project configurations have been updated for 5.0 but the upgrade didn't take care of doing this.  Please help:

Critical error  in configuration file D:\TeamCity.BuildServer\config\OnKey5 Version 2  Interfaces\project-config.xml:
org.jdom.input.JDOMParseException:  Error on line 6 of document  file:/D:/TeamCity.BuildServer/config/OnKey5%20Version%202%20Interfaces/project-config.xml:  Attribute "run-type" must be declared for element type "build-type".
Critical error  in configuration file  D:\TeamCity.BuildServer\config\DDEditor\project-config.xml:
org.jdom.input.JDOMParseException:  Error on line 6 of document  file:/D:/TeamCity.BuildServer/config/DDEditor/project-config.xml: Attribute  "run-type" must be declared for element type "build-type".
Critical error  in configuration file  D:\TeamCity.BuildServer\config\fsTool\project-config.xml:
org.jdom.input.JDOMParseException:  Error on line 6 of document  file:/D:/TeamCity.BuildServer/config/fsTool/project-config.xml: Attribute  "run-type" must be declared for element type "build-type".
Critical error  in configuration file D:\TeamCity.BuildServer\config\OnKey5 Version  2\project-config.xml:
org.jdom.input.JDOMParseException: Error on  line 6 of document  file:/D:/TeamCity.BuildServer/config/OnKey5%20Version%202/project-config.xml:  Attribute "run-type" must be declared for element type "build-type".

Can I manually add these missing attributes?  What should their values be? Find attached one of the files that TC is complaining about.

Thanks


Attachment(s):
project-config.xml
4 comments
Comment actions Permalink

Perhaps some further context on the problem.  When I did the initial upgrade, I got the exception below.  I tried working around the problem by changing the value of the configuration version in version.dat from 280-->315 to make the Database and configuration align.  When I then browsed the portal, I got the exception of the missing info from the build types.  I'm not sure why there is a difference between the DB and configuration versions and it seems that when I align the two versions, some part of the upgrade process does not happen.  However, I'm currently stuck.  If I leave version.dat untouched I get the exception below, and if I change it, I get the exception of the missing information from the project.xml files.  Thanks

Server startup failed -- TeamCity

Server startup failed

Please examine the error below and make corrections in the server  configuration.
If you believe this is not configuration problem, please ask for help in TeamCity  support forum.

Error message:  jetbrains.buildServer.serverSide.DatabaseVersionMismatchException: Database  version mismatch: Configuration version is 280 but Database version is  315.

Show stacktrace
Trace: java.lang.Exception: jetbrains.buildServer.serverSide.DatabaseVersionMismatchException: Database version mismatch: Configuration version is 280 but Database version is 315.
     at jetbrains.buildServer.util.SpringExceptionUtil.extractSpringErrorRealInfo(SpringExceptionUtil.java:19)
     at jetbrains.buildServer.util.SpringExceptionUtil.unrollException(SpringExceptionUtil.java:9)
     at jetbrains.spring.web.TeamCityContextLoaderListener.contextInitialized(TeamCityContextLoaderListener.java:5)
     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 'agentTypeManager' defined in URL [jar:file:/D:/TeamCity/webapps/ROOT/WEB-INF/lib/server.jar!/META-INF/buildServerSpring.xml]: Unsatisfied dependency expressed through constructor argument with index 1 of type [jetbrains.buildServer.serverSide.agentTypes.AgentTypeDatabaseStorage]: Error creating bean with name 'agentTypeDatabaseStorage' defined in URL [jar:file:/D:/TeamCity/webapps/ROOT/WEB-INF/lib/server.jar!/META-INF/buildServerSpring.xml]: Unsatisfied dependency expressed through constructor argument with index 1 of type [jetbrains.buildServer.serverSide.SQLRunnerEx]: Error creating bean with name 'dbFacade' defined in URL [jar:file:/D:/TeamCity/webapps/ROOT/WEB-INF/lib/server.jar!/META-INF/buildServerSpring.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [jetbrains.buildServer.serverSide.impl.DBFacade]: Constructor threw exception; nested exception is jetbrains.buildServer.serverSide.DatabaseVersionMismatchException: Database version mismatch: Configuration version is 280 but Database version is 315.
Related cause: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'dbSettings' defined in URL [jar:file:/D:/TeamCity/webapps/ROOT/WEB-INF/lib/server.jar!/META-INF/buildServerSpring.xml]: Unsatisfied dependency expressed through constructor argument with index 0 of type [java.lang.String]: No unique bean of type [java.lang.String] is defined: Unsatisfied dependency of type [class java.lang.String]: expected at least 1 matching bean
Related cause: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'serverPaths' defined in URL [jar:file:/D:/TeamCity/webapps/ROOT/WEB-INF/lib/server.jar!/META-INF/buildServerSpring.xml]: Unsatisfied dependency expressed through constructor argument with index 0 of type [java.lang.String]: No unique bean of type [java.lang.String] is defined: Unsatisfied dependency of type [class java.lang.String]: expected at least 1 matching bean
Related cause: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'serverPaths' defined in URL [jar:file:/D:/TeamCity/webapps/ROOT/WEB-INF/lib/server.jar!/META-INF/buildServerSpring.xml]: Unsatisfied dependency expressed through constructor argument with index 0 of type [java.lang.String]: No unique bean of type [java.lang.String] is defined: Unsatisfied dependency of type [class java.lang.String]: expected at least 1 matching bean
     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:35)
     ... 24 more
0
Comment actions Permalink

Please describe your upgrade procedure. As I understand you took configuration files from the existing server and tried to run TC 5.0 EAP with them, but did you also took version.dat file from the .BuildServer/system ?

0
Comment actions Permalink

Pavel

I've basically followed the process you describe on your Upgrade page and yes this did include the version.dat file.  Anyways, I've worked around the problem by setting the version.dat file version number to 315 to get access to the portal and then I recreated our configuration.  It all seems to be working fine now but I had to waste 2 hours doing it.  Fortunately I got some cleanup done in the process as well.

0

Please sign in to leave a comment.