TeamCity Backup: cannot find or load main class during manual backup
Hello,
I am running TeamCity 2017.1.2 (build 46812) under Windows Server 2012 R2 on SqlServerDB.
When I try to run a manual backup I get the following error:
Cannot find or load main class: jetbrains.buildServer.serverSide.maintenance.BackupRestoreRunner
I am using the following command to start the backup:
maintainDB backup -C -D -L -P -F backup-temp
the problem seems to arise during the following line from maintainDB.cmd:
"%JAVA_EXE%" %MIGRATION_JVM_OPTS% -cp "%CP%" jetbrains.buildServer.serverSide.maintenance.BackupRestoreRunner %*
it seems that it finds JAVA but then gets the error when trying to call maintenance.BackRestoreRunner.
I have set the enivorment variables TEAMCITY_APP_DIR and TEAMCITY_DATA_PATH to the corresponding directories.
since I had problems with "input line is too long", I have commented
:: Add all JARs from WEB-INF\lib to classpath
rem SET ACC=
rem SET SEPARATOR=;
rem FOR %J in ("%TEAMCITY_LIB_DIR%*.jar") DO call append.bat %%J
rem SET CP=%ACC%;%TEAMCITY_LIB_DIR%..\classes
and uncommented the Alternative classpath
:: Alternative classpath: Add only necessary JARs
SET CP=
SET CP=%TEAMCITY_LIB_DIR%..\classes
SET CP=%CP%;%TEAMCITY_LIB_DIR%\commons-cli-1.0.jar
SET CP=%CP%;%TEAMCITY_LIB_DIR%\server.jar
SET CP=%CP%;%TEAMCITY_LIB_DIR%\openapi.jar
SET CP=%CP%;%TEAMCITY_LIB_DIR%\server-openapi.jar
SET CP=%CP%;%TEAMCITY_LIB_DIR%\common.jar
SET CP=%CP%;%TEAMCITY_LIB_DIR%\server-model.jar
SET CP=%CP%;%TEAMCITY_LIB_DIR%\log4j-1.2.12.jar
SET CP=%CP%;%TEAMCITY_LIB_DIR%\jdom.jar
SET CP=%CP%;%TEAMCITY_LIB_DIR%\xstream-1.2.1.jar
SET CP=%CP%;%TEAMCITY_LIB_DIR%\messages.jar
SET CP=%CP%;%TEAMCITY_LIB_DIR%\spring.jar
as recommended in troubleshooting of
https://confluence.jetbrains.com/display/TCD10/Migrating+to+an+External+Database
any ideas?
P.S.: I first posted this in YouTrack #TW-51209 but since I didn't get any reaction, I hope someone here can help me.
Please sign in to leave a comment.
Tammo, apologies -- we might have overlooked your ticket in the first place.
Please see my response.