Error upgrading TeamCity 3.1.2 to 4.0.1

Hello,


I am attempting to upgrade TeamCity 3.1.2 to 4.0.1 using the instructions located here:
http://www.jetbrains.net/confluence/display/TCD4/Upgrade


I've followed the instructions, however, when I start the teamcity server it produces the stacktrace shown below. I was able to reproduce the problem as follows:

  1. I installed a TeamCity 3.1.2 instance  from scratch, started it and shut it down.
  2. I removed the embedded database files in .BuilderServer/system.
  3. I added the MySql-Driver-jar.
  4. I added the .BuilderServer/system/database.properties file from the TeamCity 3.1.2 instance I would like to upgrade. (This instance was started and stopped, too.)
  5. I started a TeamCity 4.0.1 instance (with the MySQL database driver).


Background: My version.dat file is

>cat .BuildServer/system/version.dat
#Fri Jan 23 14:24:17 CET 2009
version.com.mysql.jdbc.Driver=222
version.org.hsqldb.jdbcDriver=222


The full stacktrace is attached. Here an extract:

23.01.2009 14:29:29 org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
23.01.2009 14:29:32 org.apache.catalina.core.StandardContext listenerStart
SCHWERWIEGEND: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'defaultMessageProcessorFactory' defined in URL [jar:file:/
home/cisystem/software/cisystem/server/TeamCity/webapps/ROOT/WEB-INF/lib/server.jar!/META-INF/buildServerSpring.xml]: Unsatisfied dependency expressed thro
ugh constructor argument with index 0 of type [jetbrains.buildServer.serverSide.BuildServerEx]: Error creating bean with name 'buildServer' defined in URL
[jar:file:/home/cisystem/software/cisystem/server/TeamCity/webapps/ROOT/WEB-INF/lib/server.jar!/META-INF/buildServerSpring.xml]: Instantiation of bean fail
ed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [jetbrains.buildServer.serverSide.impl.Build
ServerImpl]: Constructor threw exception; nested exception is java.lang.RuntimeException: jetbrains.buildServer.serverSide.versioning.ConvertException: CRE
ATE TABLE personal_build_relative_path (BUILD_ID BIGINT, ORIGINAL_PATH_HASH BIGINT, RELATIVE_PATH TEXT, UNIQUE (BUILD_ID, ORIGINAL_PATH_HASH))
Related cause: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'dbSettings' defined in URL [jar:file:/home/
cisystem/software/cisystem/server/TeamCity/webapps/ROOT/WEB-INF/lib/server.jar!/META-INF/buildServerSpring.xml]: Unsatisfied dependency expressed through c
onstructor argument with index 0 of type [java.lang.String]: No unique bean of type [java.lang.String] is defined: Unsatisfied dependency of type [class ja
va.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)
[cut]...
Related cause:
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'dbSettings' defined in URL [jar:file:/home/cisystem/softwa
re/cisystem/server/TeamCity/webapps/ROOT/WEB-INF/lib/server.jar!/META-INF/buildServerSpring.xml]: Unsatisfied dependency expressed through constructor argu
ment 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)
64)
...


Any help?

Alex



Attachment(s):
localhost.2009-01-23.log
5 comments
Comment actions Permalink

If you wish to use separate location of .BuildServer folder for the new version then you should copy the whole directory and then point newly installed server to this directory. Most probably this exception occurred because you did not copy version.dat file from the old .BuildServer.

0
Comment actions Permalink

Hello Pavel,

thank for your answer.


If you wish to use separate location of .BuildServer folder for the new version then you should copy the whole directory and then point newly installed server to this directory.

Most probably this exception occurred because you did not copy version.dat file from the old .BuildServer.


Both upgrade scenarios I tried are failing ... and both have the "version.dat" from the old .BuildServer folder in the .BuildServer folder which is upgraded.
The first upgrade scenario I tried was the one you describe (using a full copy of the .BuilderServer folder), and it fails.

Alex

0
Comment actions Permalink

Could you please do the following:
- restore your .BuildServer for version 3.1.2 from backup (if needed)
- if you are using external DB ensure that JDBC driver is copied into the WEB-INF/lib folder of the new TeamCity installation
- if you are using non default location of .BuildServer point new TeamCity to this location
- start new TeamCity server

If upgrade fails again, please send all logs to teamcity-feedback [at] jetbrains.com.

0
Comment actions Permalink

so, Pavel found a problem with our DB priviledges.

We fixed the DB (MySQL priviledges and the upgrade works fine.

//Alex

0

Please sign in to leave a comment.