NoClassDefFoundEror: jetbrains/buildServer/util/EventDipatcher

Hi,

I did install TeamCity 3.1 (build 6828) at a new server (linux/SUSE). The BuildServer start up nicely.
However, I the buildAgents (even the default one) fails to start, giving the following error:

+/opt/java/jdk1.5.0_13/jre/bin/java -ea -Xmx384m -Dteamcity_logs=../logs/ -Dlog4j.configuration=file:../conf/teamcity-agent-log4j.xml -classpath /opt/teamcity-3.1.1/TeamCity/buildAgent2/lib/idea-settings.jar:/opt/teamcity-3.1.1/TeamCity/buildAgent2/lib/commons-beanutils-core.jar:/opt/teamcity-3.1.1/TeamCity/buildAgent2/lib/xmlrpc-2.0.1.jar:/opt/teamcity-3.1.1/TeamCity/buildAgent2/lib/jdom.jar:/opt/teamcity-3.1.1/TeamCity/buildAgent2/lib/xstream-1.2.1.jar:/opt/teamcity-3.1.1/TeamCity/buildAgent2/lib/buildServerMessages.jar:/opt/teamcity-3.1.1/TeamCity/buildAgent2/lib/jdk-searcher.jar:/opt/teamcity-3.1.1/TeamCity/buildAgent2/lib/patches.jar:/opt/teamcity-3.1.1/TeamCity/buildAgent2/lib/buildServerXmlRpcWrapper.jar:/opt/teamcity-3.1.1/TeamCity/buildAgent2/lib/buildServerCommonRuntime.jar:/opt/teamcity-3.1.1/TeamCity/buildAgent2/lib/buildServerRuntimeUtil.jar:/opt/teamcity-3.1.1/TeamCity/buildAgent2/lib/annotations.jar:/opt/teamcity-3.1.1/TeamCity/buildAgent2/lib/nanocontainer-1.0-RC-1.jar:/opt/teamcity-3.1.1/TeamCity/buildAgent2/lib/buildServerServerLogging.jar:/opt/teamcity-3.1.1/TeamCity/buildAgent2/lib/agent-openapi.jar:/opt/teamcity-3.1.1/TeamCity/buildAgent2/lib/openapi.jar:/opt/teamcity-3.1.1/TeamCity/buildAgent2/lib/xercesImpl.jar:/opt/teamcity-3.1.1/TeamCity/buildAgent2/lib/agentInstaller.jar:/opt/teamcity-3.1.1/TeamCity/buildAgent2/lib/winpack.jar:/opt/teamcity-3.1.1/TeamCity/buildAgent2/lib/buildServerAgent.jar:/opt/teamcity-3.1.1/TeamCity/buildAgent2/lib/commons-logging.jar:/opt/teamcity-3.1.1/TeamCity/buildAgent2/lib/patches-impl.jar:/opt/teamcity-3.1.1/TeamCity/buildAgent2/lib/ivy-1.4.1.jar:/opt/teamcity-3.1.1/TeamCity/buildAgent2/lib/extensions.jar:/opt/teamcity-3.1.1/TeamCity/buildAgent2/lib/launcher.jar:/opt/teamcity-3.1.1/TeamCity/buildAgent2/lib/agentInstaller-UI.jar:/opt/teamcity-3.1.1/TeamCity/buildAgent2/lib/jniwrap-3.6.1.jar:/opt/teamcity-3.1.1/TeamCity/buildAgent2/lib/buildServerCommon.jar:/opt/teamcity-3.1.1/TeamCity/buildAgent2/lib/log4j-1.2.12.jar:/opt/teamcity-3.1.1/TeamCity/buildAgent2/lib/jakarta-oro-2.0.8.jar:/opt/teamcity-3.1.1/TeamCity/buildAgent2/lib/trove4j.jar:/opt/teamcity-3.1.1/TeamCity/buildAgent2/lib/picocontainer-1.2.jar:/opt/teamcity-3.1.1/TeamCity/buildAgent2/lib/commons-httpclient-3.0.1.jar:/opt/teamcity-3.1.1/TeamCity/buildAgent2/lib/xpp3_min-1.1.3.4.M.jar:/opt/teamcity-3.1.1/TeamCity/buildAgent2/lib/junit-4.1.jar:/opt/teamcity-3.1.1/TeamCity/buildAgent2/lib/commons-codec-1.3.jar:/opt/teamcity-3.1.1/TeamCity/buildAgent2/lib/utils.jar jetbrains.buildServer.agent.AgentMain -file ../conf/buildAgent.properties -launcher.version 6828
Log4J configuraiton file /opt/teamcity-3.1.1/TeamCity/buildAgent2/bin/../conf/teamcity-agent-log4j.xml will be monitored with interval 10 seconds.
Exception in thread "main" java.lang.NoClassDefFoundError: jetbrains/buildServer/util/EventDispatcher
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at org.nanocontainer.script.xml.XMLContainerBuilder.registerComponentImplementation(XMLContainerBuilder.java:217)
at org.nanocontainer.script.xml.XMLContainerBuilder.registerComponentsAndChildContainers(XMLContainerBuilder.java:174)
at org.nanocontainer.script.xml.XMLContainerBuilder.populateContainer(XMLContainerBuilder.java:139)
at jetbrains.buildServer.agent.PContainer.loadFromStream(PContainer.java:72)
at jetbrains.buildServer.agent.PContainer.loadResources(PContainer.java:62)
at jetbrains.buildServer.agent.PContainer.readAgentPlugins(PContainer.java:52)
at jetbrains.buildServer.agent.PContainer.getInstance(PContainer.java:37)
at jetbrains.buildServer.agent.AgentMain.main(AgentMain.java:13)+
Too short run time, most likely there is some installation problem: 0.848 sec.
Launcher is exiting
Launcher exited.

When I install a buildAgent on a windows machine (via WebStart), everything works smoothly...

Any suggestions ?

Thanks

2 comments

Please check that jetbrains.buildServer.util.EventDispatcher class is in the: /opt/teamcity-3.1.1/TeamCity/buildAgent2/lib/utils.jar

--
Pavel Sher

0

The utils.jar was indeel smaller (45056 bytes) instead of 57.328 bytes.
It seemed to be currupted as well (I couldn't open it)

Replacing the currupt utils.jar with the one of the working agent on the windows machine did solve the problem. (so utils.jar was the one and only corrupt jar)

Maybe something is wrong with the bundled buildAgent.zip file (since it was that one which i used to install the agent on the linux machine)

Anyhow, my problem is solved.

Thanks !

(Sorry for the late reply, I'm only one per week at this customer..)

0

Please sign in to leave a comment.