Problems migrating from HSQLDB to MySQL

I've been evaluating TeamCity and really like it. I'd like to move the database to one of our servers that runs MySQL. I've followed the mirgration steps but I get the following error when I run the migration command.

/opt/TeamCity/bin/ migrate -A /mnt/pbd2-2000/cloud/TeamCityData -T /mnt/pbd2-2000/cloud/TeamCityData/temp/

Using logs directory /opt/TeamCity/bin/../logs
TeamCity maintenance tool. Copyright 2011 JetBrains s.r.o. All Rights Reserved.

Command line arguments: migrate -A /mnt/pbd2-2000/cloud/TeamCityData -T /mnt/pbd2-2000/cloud/TeamCityData/temp/
Using TeamCity data directory: /mnt/pbd2-2000/cloud/TeamCityData
Using internal database.
Using source database
 database type: HSQLDB
 database driver: org.hsqldb.jdbcDriver
 connection: jdbc:hsqldb:file:/mnt/pbd2-2000/cloud/TeamCityData/system/buildserver
 login as: <empty>
Software metadata version: 2
Source database metadata version: 2
Software schema version: 544
Source database schema version: 544
Connected to the Source DB successfully.
Using explicitly specified target database settings: /mnt/pbd2-2000/cloud/TeamCityData/temp/
Using target database
 database type: MYSQL
 database driver: <not specified>
 connection: jdbc:mysql:preciousfs01:3306/teamcity
 login as: mysql
Cannot proceed with 'migrate' command: A driver for the target database not found. Please ensure you have driver jars in /mnt/pbd2-2000/cloud/TeamCityData/lib/jdbc.
Critical error has occurred during command execution.

Listing the /mnt/pbd2-2000/cloud/TeamCityData/lib/jdbc directory shows that I've copied in the connector jar file for mysql (along with the rest of the distribution).

ls -al /mnt/pbd2-2000/cloud/TeamCityData/lib/jdbc
total 1256
drwxrwxr-x 4 pbdot pbdot   4096 Mar 12 21:29 .
drwxr-xr-x 3 pbdot pbdot   4096 Mar 11 10:29 ..
-rw-r--r-- 1 pbdot pbdot  45947 Mar 12 21:29 build.xml
-rw-r--r-- 1 pbdot pbdot 215644 Mar 12 21:29 CHANGES
-rw-r--r-- 1 pbdot pbdot  18122 Mar 12 21:29 COPYING
drwxr-xr-x 2 pbdot pbdot   4096 Mar 12 21:29 docs
-rw-r--r-- 1 pbdot pbdot 846263 Mar 12 21:29 mysql-connector-java-5.1.24-bin.jar
-rw-r--r-- 1 pbdot pbdot  63924 Mar 12 21:29 README
-rw-r--r-- 1 pbdot pbdot  66228 Mar 12 21:29 README.txt
drwxr-xr-x 7 pbdot pbdot   4096 Mar 12 21:29 src

Any ideas whats gone wrong?

I'm running on Ubuntu 12.04.2 LTS (GNU/Linux 3.2.0-29-generic x86_64)

Many thanks,

1 comment
Comment actions Permalink

Hello Simon,

sorry for the delay with answer.

The described case looks strange. So what would I check if it encounter:

1. Try to download the jar again – may be the existent one is corrupted. And (in additional to this point) I'd removed all other stuff excdept the jar from the lib/jdbc folder.

2. Check that the current user can access this directory for at least 'r-x', and all the parent directories too. May be the maintainDB tool could not read the directory table of content.

3. If you're using openJDK, I'd try to run it under sun/oracle JDK 1.6.

If all that didn't help, please let me know. I'll prepare a build with debug printouts that can help to investigate the problem.


Leonid Bushuev


Please sign in to leave a comment.