Problems upgrading from 4.5 to 5.0

If spent the afteernoon trying to upgrade to 5.0 and SQL Server as database. As I was unable to get it working, I've upgraded to version 4.5 and switched from file to using SQL Server 2005 and that seems to be working fine.
Trying to upgrade further from the working 4.5 to 5.0 still fails. I can not get TeamCity to start up. I get the following error in the teamcity-server.log:

[2009-12-21 16:22:23,210]   INFO - rverSide.db.TeamCityDataSource - Using the following database settings:
database type: MSSQL2005
database driver: net.sourceforge.jtds.jdbc.Driver
connection: jdbc:jtds:sqlserver://localhost:1433/TeamCity
login as: sa
[2009-12-21 16:22:23,522]   INFO -   jetbrains.buildServer.SERVER - TeamCity configuration version is 343
[2009-12-21 16:22:23,569]   INFO -   jetbrains.buildServer.SERVER - Configuration version: 280, Database version: 0
[2009-12-21 16:22:24,053]   INFO -   jetbrains.buildServer.SERVER - Closing database connections.
[2009-12-21 16:22:24,116]  ERROR - er.spring.WebDispatcherServlet - Context initialization failed
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from URL location [classpath*:/META-INF/plugin-model-shared-spring.xml]
Offending resource: URL [jar:file:/C:/TeamCity/webapps/ROOT/WEB-INF/lib/server.jar!/META-INF/buildServerPluginsSupport.xml]; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from URL [jar:file:/C:/TeamCity/webapps/ROOT/WEB-INF/lib/common-impl.jar!/META-INF/plugin-model-shared-spring.xml]; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader]: Constructor threw exception; nested exception is java.lang.NullPointerException
..........
......... (see teamcity-server.log)
I can't find any way to upgrade the database and no instructions on how to do this, only to migrate from one database to another. I've tried to migrate from one database to another on sql server, but the TeamCity says the 4.5-database is corrupt or empy ( I think thta was the message). The user running the installation and the service has db_owner access to the database. Found other posts on upgrading problem referring to a db_version table but there is none in my database so I suspect the database is too old and for some reason TeamCitty is unable to upgrade the database.

How can I upgrade from 4.5 to 5.0 when I'm using SQL Server 2005?

Attaching some of the logs.

Best Regards
Johan



Attachment(s):
catalina.2009-12-21.log.zip
teamcity-maintenance.log.zip
teamcity-server.log.zip
6 comments
Comment actions Permalink

Hello Johan,

I haven't got your case clearly. Which version of TeamCity had you have before upgrading/migrating?

In any case, I reccommend you to (first) upgrade you soft up to 5.0 and then migrate to SQL server.
Currently we don't support upgrading and migrating to another database in "one click".
New migration utility (that is embedded in 5.0) could not work with old databases, it works only with 5.0 databases. It looks you attempted to run 'maintainDB' while the database was not upgraded to 5.0.

> I've upgraded to version 4.5 and switched from file to using SQL Server 2005 and that seems to be working fine.
Am I right that now you have working installation with your data?
If yes, please backup your data directory, upgrade software up to 5.0 and run TeamCity server. On the first start, TeamCity upgrades configuration files and database up to the latest format. After upgrade has done, please ensure that all work correct.

Then, you can migrate to an external database, using the 'maintainDB' utility, as described in http://www.jetbrains.net/confluence/display/TCD5/Migrating+to+an+External+Database#MigratingtoanExternalDatabase-FullMigration

Best regards,
Leonid

0
Comment actions Permalink

Hi Leonid/JetBrains,

I'm still having problem getting TeamCity to start. It looks like TeamCity is unable to upgrade the file database as well as a SQL Server database. Also it says the database is empty, which it isn't.

[2009-12-22 10:49:52,145]   INFO -   jetbrains.buildServer.SERVER - TeamCity configuration version is 343
[2009-12-22 10:49:52,177]   INFO -   jetbrains.buildServer.SERVER - Configuration version: 280, Database version: 0
[2009-12-22 10:49:52,177]   WARN -   jetbrains.buildServer.SERVER - Server startup exception: jetbrains.buildServer.serverSide.SystemStartupProblem: Cannot perform upgrade of configuration data while database is empty. Configuration files version (280) does not match current TeamCity data version (343).

I'm also getting a strange error, saying that port 80 is already in use.
2009-dec-22 10:49:51 org.apache.catalina.core.StandardServer await
ALLVARLIG: StandardServer.await: create[8105]:
java.net.BindException: Address already in use: JVM_Bind
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
at java.net.ServerSocket.bind(ServerSocket.java:319)
at java.net.ServerSocket.<init>(ServerSocket.java:185)
at org.apache.catalina.core.StandardServer.await(StandardServer.java:373)
at org.apache.catalina.startup.Catalina.await(Catalina.java:647)
at org.apache.catalina.startup.Catalina.start(Catalina.java:607)
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)

I'm using 5.0 build 10669.


Regards

0
Comment actions Permalink

Problem solved. Port 8105 was also needed and was taken by another process.

0
Comment actions Permalink

Johan,

I'm glad you managed to do it.
One more question: am I right that your TC 4.5 was installed as a Windows service, and when you were installing 5.0 the old one has unexpected started?

Thanks

0
Comment actions Permalink

No, it was not the old TeamCity service, it was another Service.

For the future: Where can this second port number be configured?

Best Regards
Johan

0
Comment actions Permalink

The Tomcat shutdown port can be configured in <TeamCity_home>/conf/server.xml.

Best wishes

0

Please sign in to leave a comment.