Dotnet issue after update

Completed

I've just updated to TeamCity 2020.1 (build 78475) and initially all seemed to be well. However, it soom became clear that there was an issue as all my builds were failing. I've narrowed it down to the .NET support plugin which is erroring with Failed to initialize Spring Context  and the details below. One of the key lines appears to be Runner with type dotnet already registered. I've tried disabling various combinations of plugins that could be conflicting with no success. I'm now completely stuck and would appreciate any suggestions please.

 

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jetbrains.buildServer.dotnet.DotnetRunnerRunType#0' defined in Byte array resource [plugin: dotnet#plugin-dotnet-server.jar!/META-INF/build-server-plugin-dotnet.xml]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [jetbrains.buildServer.dotnet.DotnetRunnerRunType]: Constructor threw exception; nested exception is java.lang.RuntimeException: Runner with type dotnet already registered.
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:279)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1197)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1099)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:511)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:756)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)
at jetbrains.buildServer.plugins.spring.SpringPluginLoader.pluginClassesLoaded(SpringPluginLoader.java:116)
at sun.reflect.GeneratedMethodAccessor71.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at jetbrains.buildServer.util.EventDispatcher$3.run(EventDispatcher.java:135)
at jetbrains.buildServer.util.NamedThreadFactory.executeWithNewThreadName(NamedThreadFactory.java:75)
at jetbrains.buildServer.util.EventDispatcher.dispatch(EventDispatcher.java:130)
at jetbrains.buildServer.util.EventDispatcher$2.invoke(EventDispatcher.java:80)
at com.sun.proxy.$Proxy24.pluginClassesLoaded(Unknown Source)
at jetbrains.buildServer.plugins.PluginManagerImpl$5.visitPlugin(PluginManagerImpl.java:409)
at jetbrains.buildServer.plugins.PluginsCollection$1.run(PluginsCollection.java:97)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [jetbrains.buildServer.dotnet.DotnetRunnerRunType]: Constructor threw exception; nested exception is java.lang.RuntimeException: Runner with type dotnet already registered.
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:154)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:122)
at jetbrains.buildServer.spring.InstantiationStrategySelector$1.instantiate(InstantiationStrategySelector.java:77)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:271)
... 27 more
Caused by: java.lang.RuntimeException: Runner with type dotnet already registered.
at jetbrains.buildServer.serverSide.impl.runType.RunTypeRegistryImpl.registerRunType(RunTypeRegistryImpl.java:4)
at sun.reflect.GeneratedMethodAccessor153.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
at jetbrains.buildServer.plugins.spring.AnnotationBasedRegistryInterceptor.invoke(AnnotationBasedRegistryInterceptor.java:45)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
at com.sun.proxy.$Proxy117.registerRunType(Unknown Source)
at jetbrains.buildServer.dotnet.DotnetRunnerRunType.<init>(DotnetRunnerRunType.kt:38)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:142)
... 30 more

0
4 comments

Hi, Steve.

 

Could you please provide a screenshot for the plugins page on the server and another one for the build configuration step settings?

There is a related bug in YouTrack, but it reproduces in an outdated plugin version was installed on the server before an upgrade.

0

You can also attach screenshots to the issue above and make them visible only to the teamcity-developer group.

0

Hi Nadia,

 

Thanks for the prompt response.

 

I suspect you are correct as after the upgrade I noticed that this plugin was well overdue for an update and tried to update but it didn't help. See attachments as requested.

 

This affects all the dotnet build steps in all of my projects, an example of one is below

 

 

0

I've now disabled the dotnet-cli as per the link you provided and that seems to have sorted it for the build configurations that I have reconfigured for the newer runner.

 

Thanks for the help

 

 

 

0

Please sign in to leave a comment.