dharillo Posted October 1, 2019 Report Share Posted October 1, 2019 Greetings! We are trying to use the Teamcity plugin with the "checkout on agent" configuration. This configuration works fine on Windows, but for a Linux agent the checkout does not work. The build fails event before the first build step: Looking at the teamcity-agent.log the next exception trace appears: [2019-10-01 17:54:40,649] ERROR - pl.patch.ProjectSourcesOnAgent - Problem while checkout on agent java.lang.NoClassDefFoundError: Could not initialize class org.apache.commons.lang.SystemUtils at com.codicesoftware.plugins.teamcity.PathUtils.isFileInSymlinkContained(PathUtils.java:34) at com.codicesoftware.plugins.teamcity.PathUtils.getCanonicalPath(PathUtils.java:16) at com.codicesoftware.plugins.teamcity.WorkspaceManager.ensureWorkspaceExists(WorkspaceManager.java:21) at com.codicesoftware.plugins.teamcity.PlasticAgentVcsSupport.updateSources(PlasticAgentVcsSupport.java:67) at jetbrains.buildServer.agent.impl.vcs.AgentVcsManagerExImpl$CheckoutSupportImpl.updateSources(AgentVcsManagerExImpl.java:108) at jetbrains.buildServer.agent.impl.patch.ProjectSourcesOnAgent$1.run(ProjectSourcesOnAgent.java:186) at java.base/java.lang.Thread.run(Thread.java:834) [2019-10-01 17:54:40,651] WARN - l.patch.AbstractSourcesUpdater - Error while checkout on agent: Problem while checkout on agent: java.lang.NoClassDefFoundError: Could not initialize class org.apache.commons.lang.SystemUtils jetbrains.buildServer.vcs.VcsException: Problem while checkout on agent: java.lang.NoClassDefFoundError: Could not initialize class org.apache.commons.lang.SystemUtils at jetbrains.buildServer.agent.impl.patch.ProjectSourcesOnAgent$1.run(ProjectSourcesOnAgent.java:192) at java.base/java.lang.Thread.run(Thread.java:834) Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.apache.commons.lang.SystemUtils at com.codicesoftware.plugins.teamcity.PathUtils.isFileInSymlinkContained(PathUtils.java:34) at com.codicesoftware.plugins.teamcity.PathUtils.getCanonicalPath(PathUtils.java:16) at com.codicesoftware.plugins.teamcity.WorkspaceManager.ensureWorkspaceExists(WorkspaceManager.java:21) at com.codicesoftware.plugins.teamcity.PlasticAgentVcsSupport.updateSources(PlasticAgentVcsSupport.java:67) at jetbrains.buildServer.agent.impl.vcs.AgentVcsManagerExImpl$CheckoutSupportImpl.updateSources(AgentVcsManagerExImpl.java:108) at jetbrains.buildServer.agent.impl.patch.ProjectSourcesOnAgent$1.run(ProjectSourcesOnAgent.java:186) ... 1 more Plugin version: Do you know why may this be happening? I have looked at the plugin folder in the agent and the commons-lang.jar is there. Regards! Link to comment Share on other sites More sharing options...
calbzam Posted October 2, 2019 Report Share Posted October 2, 2019 Hi, The issue seems to be with an external library that we are linking in our plugin and it happens when checking the Java version. What is your Java version? Could you try downgrading to Java 8 as a workaround? https://youtrack.jetbrains.com/issue/TW-57916 Regards, Carlos. Link to comment Share on other sites More sharing options...
dharillo Posted October 2, 2019 Author Report Share Posted October 2, 2019 Hi, I had Java 11. I just tried downgrading to Java 8 and it works fine. Will you deliver a new plugin version compatible with Java 11? Regards! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now