Rake Runner plugin fails to install on agents

I am trying to install a newer version of the Rake Runner plugin (#4-27435-435) on a TeamCity 6.5 server.  The plugin successfully installs on the server, but fails on the agents with the following error:


ERROR - gins.spring.SpringPluginLoader - Failed to initialize spring context for plugin rake-runner
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'agentRVMDetector' defined in URL [file:/opt/teamcity/buildAgent/temp/spring-rake-runner5589326683719010401-spring.config.tmp.xml]: Unsatisfied dependency expressed through constructor argument with index 0 of type [jetbrains.buildServer.agent.ruby.rvm.detector.RVMDetector]: : Error loading class [jetbrains.buildServer.agent.ruby.rvm.RVMCommandLineProcessor] for bean with name 'rubyCommandLineProcessor' defined in URL [file:/opt/teamcity/buildAgent/temp/spring-rake-runner5589326683719010401-spring.config.tmp.xml]: problem with class file or dependent class; nested exception is java.lang.NoClassDefFoundError: jetbrains/buildServer/agent/runner/BuildCommandLineProcessor; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [jetbrains.buildServer.agent.ruby.rvm.RVMCommandLineProcessor] for bean with name 'rubyCommandLineProcessor' defined in URL [file:/opt/teamcity/buildAgent/temp/spring-rake-runner5589326683719010401-spring.config.tmp.xml]: problem with class file or dependent class; nested exception is java.lang.NoClassDefFoundError: jetbrains/buildServer/agent/runner/BuildCommandLineProcessor

 at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:591)

 at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:193)

 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:925)

 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:835)

 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)

 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)

 at java.security.AccessController.doPrivileged(Native Method)

 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)

 at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)

 at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)

 at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)

 at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)

 at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)

 at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)

 at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)

 at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)

 at jetbrains.buildServer.plugins.spring.SpringPluginLoader$1.configsExtracted(SpringPluginLoader.java:65)

 at jetbrains.buildServer.plugins.spring.SpringPluginConfigExtracter.start(SpringPluginConfigExtracter.java:42)

 at jetbrains.buildServer.plugins.spring.SpringPluginLoader.pluginClassesLoaded(SpringPluginLoader.java:73)

 at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)

 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

 at java.lang.reflect.Method.invoke(Method.java:597)

 at jetbrains.buildServer.util.EventDispatcher.dispatch(EventDispatcher.java:112)

 at jetbrains.buildServer.util.EventDispatcher$2.invoke(EventDispatcher.java:64)

 at $Proxy6.pluginClassesLoaded(Unknown Source)

 at jetbrains.buildServer.plugins.PluginManagerImpl$2.visitPlugin(PluginManagerImpl.java:121)

 at jetbrains.buildServer.plugins.PluginsCollection.foreachLoadedPlugins(PluginsCollection.java:107)

 at jetbrains.buildServer.plugins.PluginManagerImpl.firePluginClassesLoaded(PluginManagerImpl.java:119)

 at jetbrains.buildServer.plugins.PluginManagerImpl.loadPlugins(PluginManagerImpl.java:80)

 at jetbrains.buildServer.agent.AgentPluginsLoader.initializePlugins(AgentPluginsLoader.java:18)

 at jetbrains.buildServer.agent.AgentMain2.loadPlugins(AgentMain2.java:99)

 at jetbrains.buildServer.agent.AgentMain2.main(AgentMain2.java:32)

 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

 at java.lang.reflect.Method.invoke(Method.java:597)

 at jetbrains.buildServer.agent.AgentMain.main(AgentMain.java:41)
Caused by: org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [jetbrains.buildServer.agent.ruby.rvm.RVMCommandLineProcessor] for bean with name 'rubyCommandLineProcessor' defined in URL [file:/opt/teamcity/buildAgent/temp/spring-rake-runner5589326683719010401-spring.config.tmp.xml]: problem with class file or dependent class; nested exception is java.lang.NoClassDefFoundError: jetbrains/buildServer/agent/runner/BuildCommandLineProcessor

 at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1144)

 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:524)

 at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1177)

 at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:222)

 at org.springframework.beans.factory.BeanFactoryUtils.beanNamesForTypeIncludingAncestors(BeanFactoryUtils.java:187)

 at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:652)

 at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:610)

 at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:622)

 at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:584)

 ... 36 more
Caused by: java.lang.NoClassDefFoundError: jetbrains/buildServer/agent/runner/BuildCommandLineProcessor

 at java.lang.ClassLoader.defineClass1(Native Method)

 at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)

 at java.lang.ClassLoader.defineClass(ClassLoader.java:615)

 at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)

 at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)

 at java.net.URLClassLoader.access$000(URLClassLoader.java:58)

 at java.net.URLClassLoader$1.run(URLClassLoader.java:197)

 at java.security.AccessController.doPrivileged(Native Method)

 at java.net.URLClassLoader.findClass(URLClassLoader.java:190)

 at jetbrains.buildServer.plugins.classLoaders.TeamCityClassLoader.doLoadClass(TeamCityClassLoader.java:68)

 at jetbrains.buildServer.plugins.classLoaders.TeamCityClassLoader.loadClass(TeamCityClassLoader.java:37)

 at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

 at org.springframework.util.ClassUtils.forName(ClassUtils.java:211)

 at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:385)

 at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1138)

 ... 44 more
Caused by: java.lang.ClassNotFoundException: Class 'jetbrains.buildServer.agent.runner.BuildCommandLineProcessor' was not found

 at jetbrains.buildServer.plugins.classLoaders.TeamCityClassLoader.doLoadClass(TeamCityClassLoader.java:80)

 at jetbrains.buildServer.plugins.classLoaders.TeamCityClassLoader.loadClass(TeamCityClassLoader.java:37)

 at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

 ... 59 more

My initial thought is that newer builds of the plugin don't work with TeamCity 6.5.  Can anyone confirm that, or provide any insights into what the issue is?

1 comment
Comment actions Permalink

Hi Lee,

Sorry for late answer. BuildCommandLineProcessor class introduced in TeamCity 6.5.3, ensure you have that (or newer) version of TeamCity.

0

Please sign in to leave a comment.