MigrateDB.bat failing

Hi all,

Been evaluating TeamCity and very impressed. I'm now trying to migrate the database from the internal HSQLDB to a MySQL database (I'm on Windows 2000 right now). Unfortunately the script is failing with the following error:

C:\TeamCity\bin>migratedb.bat migrate
Using TeamCity data directory location: "D:\.BuildServer" Set TEAMCITY_DATA_PATH
property to override.
TeamCity database migration utility.

The input line is too long.
The syntax of the command is incorrect.

Further investigation shows the error to be occurring where the script is constructing the ACC variable:

:: Add all JARs from WEB-INF\lib to classpath
SET ACC=
SET SEPARATOR=;
FOR %%J in (%TEAMCITY_LIB_DIR%\*.jar) DO call append.bat %%J

It seems my ACC is getting too long. I even tried subst'ing TEAMCITY_LIB_DIR for a z: drive to get the size down. That lets it get further but not enough for the script to continue.

Any thoughts would be appreciated.

Thanks,


Andy

2 comments

Andy,

Seems that Windows 2000 has lower limit for the command line length.

As a workaround you can try to comment out the lines of the migrateBd.bat:

SET ACC=
SET SEPARATOR=;
FOR %%J in (%TEAMCITY_LIB_DIR%\*.jar) DO call append.bat %%J
SET CP=%ACC%;%TEAMCITY_LIB_DIR%\..\classes

and remove comments for the lines (please use this lines, it seems spring.jar is missing from the original commented out lines):

:: Alternative classpath: Add only necessary JARs
rem SET CP=
rem SET CP=%TEAMCITY_LIB_DIR%\..\classes
rem SET CP=%CP%;%TEAMCITY_LIB_DIR%\dbunit-2.2.jar
rem SET CP=%CP%;%TEAMCITY_LIB_DIR%\server.jar
rem SET CP=%CP%;%TEAMCITY_LIB_DIR%\openapi.jar
rem SET CP=%CP%;%TEAMCITY_LIB_DIR%\server-openapi.jar
rem SET CP=%CP%;%TEAMCITY_LIB_DIR%\common.jar
rem SET CP=%CP%;%TEAMCITY_LIB_DIR%\server-model.jar
rem SET CP=%CP%;%TEAMCITY_LIB_DIR%\log4j-1.2.12.jar
rem SET CP=%CP%;%TEAMCITY_LIB_DIR%\jdom.jar
rem SET CP=%CP%;%TEAMCITY_LIB_DIR%\xstream-1.2.1.jar
rem SET CP=%CP%;%TEAMCITY_LIB_DIR%\messages.jar
rem SET CP=%CP%;%TEAMCITY_LIB_DIR%\spring.jar

:: Database drivers
rem SET CP=%CP%;%TEAMCITY_LIB_DIR%\hsqldb.jar
rem for %%f in (%TEAMCITY_LIB_DIR%\mysql-connector-java-*.jar) do SET CP=%CP%;%%f
rem for %%f in (%TEAMCITY_LIB_DIR%\postgresql-*.jar) do SET CP=%CP%;%%f
rem for %%f in (%TEAMCITY_LIB_DIR%\ojdbc*.jar) do SET CP=%CP%;%%f
:: End alternative classpath

Hope, this helps.

--
Best regards,

Yegor Yarko
Project Manager
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

0

Yegor,

Yes, that worked perfectly! Thanks very much for the quick response. I should have seen the "Alternative classpath" section in the script and figured that out myself really ;)

Windows 2000 isn't exactly the best system to be running on, but hopefully our evaluations will go well and we'll be able to move our TeamCity onto a production server soon.

Thanks again,


Andy

0

Please sign in to leave a comment.