Could not initialize class com.intellij.util.ui.UIUtil
Server fails to apply patch. Here is the last lines of logs/teamcity-agent.log:
[2010-01-07 10:46:24,670] INFO - jetbrains.buildServer.AGENT - Checkout directory: /home/daniel/BuildAgent/work/33386dcf6647d9a3
[2010-01-07 10:46:24,670] INFO - rver.agent.impl.BuildRunAction - Call stage jetbrains.buildServer.agent.impl.runStages.CheckoutSourcesStage
[2010-01-07 10:46:24,670] INFO - jetbrains.buildServer.AGENT - Getting sources...
[2010-01-07 10:46:24,671] INFO - jetbrains.buildServer.AGENT - Requesting patch from server, full checkout - true
[2010-01-07 10:46:24,671] INFO - jetbrains.buildServer.AGENT - Copying patch to temp file...
[2010-01-07 10:46:59,396] WARN - jetbrains.buildServer.AGENT - Exception occurred while patch applying:Could not initialize class com.intellij.util.ui.UIUtil
java.lang.NoClassDefFoundError: Could not initialize class com.intellij.util.ui.UIUtil
at com.intellij.CommonBundle.messageOrDefault(CommonBundle.java:76)
at com.intellij.CommonBundle.message(CommonBundle.java:86)
at com.intellij.CommonBundle.message(CommonBundle.java:45)
at com.intellij.openapi.util.text.StringUtil.formatFileSize(StringUtil.java:942)
at jetbrains.buildServer.util.StringUtil.formatFileSize(StringUtil.java:523)
at jetbrains.buildServer.agent.impl.patch.ProjectSourcesGetter$8.nextPortionWritten(ProjectSourcesGetter.java:449)
at jetbrains.buildServer.util.TCStreamUtil.writeBinary(TCStreamUtil.java:106)
at jetbrains.buildServer.agent.impl.patch.ProjectSourcesGetter.copyStreamToFileAndCloseStream(ProjectSourcesGetter.java:332)
at jetbrains.buildServer.agent.impl.patch.ProjectSourcesGetter.copyPatchToTempFile(ProjectSourcesGetter.java:443)
at jetbrains.buildServer.agent.impl.patch.ProjectSourcesGetter.loadAndApplyPatch(ProjectSourcesGetter.java:213)
at jetbrains.buildServer.agent.impl.patch.ProjectSourcesGetter.access$400(ProjectSourcesGetter.java:31)
at jetbrains.buildServer.agent.impl.patch.ProjectSourcesGetter$4.execute(ProjectSourcesGetter.java:282)
at jetbrains.buildServer.agent.impl.patch.ProjectSourcesGetter.executePatchProcess(ProjectSourcesGetter.java:159)
at jetbrains.buildServer.agent.impl.patch.ProjectSourcesGetter.applyPatch(ProjectSourcesGetter.java:280)
at jetbrains.buildServer.agent.impl.patch.ProjectSourcesGetter.execute(ProjectSourcesGetter.java:119)
at jetbrains.buildServer.agent.impl.runStages.CheckoutSourcesStage.doGetSources(CheckoutSourcesStage.java:45)
at jetbrains.buildServer.agent.impl.runStages.CheckoutSourcesStage.doRecoverableStage(CheckoutSourcesStage.java:31)
at jetbrains.buildServer.agent.impl.runStages.RecoverableBuildStage.doBuildStage(RecoverableBuildStage.java:61)
at jetbrains.buildServer.agent.impl.BuildRunAction.doStages(BuildRunAction.java:135)
at jetbrains.buildServer.agent.impl.BuildRunAction.access$000(BuildRunAction.java:21)
at jetbrains.buildServer.agent.impl.BuildRunAction$1.run(BuildRunAction.java:91)
at java.lang.Thread.run(Thread.java:619)
[2010-01-07 10:46:59,398] INFO - jetbrains.buildServer.AGENT - Sources updated for 34s
[2010-01-07 10:46:59,403] WARN - runStages.CheckoutSourcesStage - Cannot apply patch. Status: UNSUCCESSFUL. Build 7761 will be interrupted.
[2010-01-07 10:46:59,404] INFO - jetbrains.buildServer.AGENT - Build finished: 7761
[2010-01-07 10:46:59,412] INFO - ctories.CleanupRegistryCleaner - Start deleting files from /home/daniel/BuildAgent/temp/.old
[2010-01-07 10:46:59,483] INFO - ctories.CleanupRegistryCleaner - Stop deleting files from /home/daniel/BuildAgent/temp/.old. 3 file(s) were deleted.
What could be the problem? Server 4.5.5 and agent is Ubuntu 8.04:
Linux roger 2.6.24-16-server #1 SMP Thu Apr 10 13:58:00 UTC 2008 i686 GNU/Linux
Thanks in advance!
Please sign in to leave a comment.
This bug is already fixed in TeamCity 5.0.1. It seems it has something to do with locale. Please check under what locale the agent is running, try to change it to english.
I have another agent running Ubuntu 9.04 which is working fine. It seems both agents, the one with the problem and the one that is working, both have the same locale set.
Working (with Ubuntu 9.04):
georog-dev:/home/daniel/projects> echo $LANG
en_US.UTF-8
Faulty (with Ubuntu 8.04):
en_US.UTF-8
Should I try to set LANG to something else? Or is there anything else I can try? We are not quite ready to upgrade to TC 5 yet.
Thanks in advance!
Here's additional information about the problematic agent:
Additional properties defined by JVM and agent runtime
Do you have X windows started on the agent where all works correctly?
I did export TEAMCITY_AGENT_OPTS=-Duser.language=en and then restarted agent. It seems to work ok now. Thank you very much!