TeamCity 10和xUnit

时间:2016-08-03 13:55:27

标签: teamcity xunit.net

今天我将teamcity升级到10.0(build 42002)后,我遇到了与https://stackoverflow.com/questions/38695121/teamcity-unmet-requirements-dotnetframework4-0-x86相同的问题。我按照说明将我的xUnit插件更新到v1.1.2,但现在我的构建代理程序还没有开始工作。如果我想检查构建配置的代理要求,我会收到以下错误:

Unexpected Error

This was not supposed to happen. Please provide the error details to your TeamCity server maintainer.
If you maintain this TeamCity installation please report this error to JetBrains.

Error message: none available
TeamCity: 10.0 (build 42002)
Operating system: Windows Server 2012 R2 (6.3, x86)
Java: 1.8.0_66-b17 (Oracle Corporation)
Servlet container: Apache Tomcat/7.0.68

Trace: java.lang.NullPointerException
    at se.capeit.dev.xunittestrunner.XUnitTestRunType.getRunnerSpecificRequirements(XUnitTestRunType.java:86)
    at jetbrains.buildServer.serverSide.impl.runType.RunTypeWithExtensionsImpl.getRunnerSpecificRequirements(RunTypeWithExtensionsImpl.java:27)
    at jetbrains.buildServer.serverSide.impl.SBuildRunnerDescriptorImpl.getRunTypeRequirements(SBuildRunnerDescriptorImpl.java:3)
    at jetbrains.buildServer.serverSide.impl.build.steps.BuildStartContextBase.getEnabledRequirements(BuildStartContextBase.java:28)
    at jetbrains.buildServer.serverSide.RawCompatibilityCalculator.matchRequirements(RawCompatibilityCalculator.java:42)
    at jetbrains.buildServer.serverSide.RawCompatibilityCalculator.calculateInternal(RawCompatibilityCalculator.java:18)
    at jetbrains.buildServer.serverSide.RawCompatibilityCalculator.access$000(RawCompatibilityCalculator.java:6)
    at jetbrains.buildServer.serverSide.RawCompatibilityCalculator$1.run(RawCompatibilityCalculator.java:1)
    at jetbrains.buildServer.serverSide.impl.auth.SecurityContextImpl$2.run(SecurityContextImpl.java:1)
    at jetbrains.buildServer.serverSide.impl.auth.SecurityContextImpl.runAs(SecurityContextImpl.java:35)
    at jetbrains.buildServer.serverSide.impl.auth.SecurityContextImpl.runAs(SecurityContextImpl.java:10)
    at jetbrains.buildServer.serverSide.impl.auth.SecurityContextImpl.runAsSystem(SecurityContextImpl.java:34)
    at jetbrains.buildServer.serverSide.RawCompatibilityCalculator.calculateCompatibility(RawCompatibilityCalculator.java:10)
    at jetbrains.buildServer.serverSide.impl.BuildPromotionImpl$CandidatesCache.getCompatibilityMap(BuildPromotionImpl.java:23)
    at jetbrains.buildServer.serverSide.impl.BuildPromotionImpl.getCompatibilityMap(BuildPromotionImpl.java:894)
    at jetbrains.buildServer.serverSide.impl.BuildTypeImpl.doGetCompatibilityMap(BuildTypeImpl.java:856)
    at jetbrains.buildServer.serverSide.impl.BuildTypeImpl.getCompatibilityMap(BuildTypeImpl.java:262)
    at jetbrains.buildServer.controllers.buildType.RequirementsBean.<init>(RequirementsBean.java:9)
    at jetbrains.buildServer.controllers.admin.projects.EditableRequirementsBean.<init>(EditableRequirementsBean.java:12)
    at jetbrains.buildServer.controllers.admin.projects.EditableBuildTypeSettingsForm.reloadRequirementsBean(EditableBuildTypeSettingsForm.java:89)
    at jetbrains.buildServer.controllers.admin.projects.AdminEditRequirementsController.getModelAndView(AdminEditRequirementsController.java:18)
    at jetbrains.buildServer.controllers.admin.projects.AbstractEditBuildTypeController.doGet(AbstractEditBuildTypeController.java:51)
    at jetbrains.buildServer.controllers.BaseFormXmlController.doHandle(BaseFormXmlController.java:60)
    at jetbrains.buildServer.controllers.BaseController.handleRequestInternal(BaseController.java:75)
    at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:147)
    at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:50)
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:961)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:895)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:967)
    at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:858)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:843)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
    at jetbrains.buildServer.maintenance.TeamCityDispatcherServlet.service(TeamCityDispatcherServlet.java:42)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at jetbrains.buildServer.web.DisableSessionIdFromUrlFilter.doFilter(DisableSessionIdFromUrlFilter.java:8)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:107)
    at jetbrains.buildServer.diagnostic.web.DiagnosticFilter.doFilter(DiagnosticFilter.java:45)
    at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:112)
    at jetbrains.buildServer.web.DependencyParametersCalculationContextFilter.doFilter(DependencyParametersCalculationContextFilter.java:1)
    at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:112)
    at org.springframework.web.filter.CompositeFilter.doFilter(CompositeFilter.java:73)
    at jetbrains.buildServer.web.DelegatingFilter.doFilter(DelegatingFilter.java:2)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at jetbrains.buildServer.web.ResponseFragmentFilter.doFilter(ResponseFragmentFilter.java:23)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:436)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1757)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1716)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:745)

升级xUnit插件后,是否有人遇到过甚至修复了同样的问题?

1 个答案:

答案 0 :(得分:0)

我终于明白了。我不得不转到配置的构建步骤并更新xUnit步骤的值。由于插件更新,某些值为null或不再存在。在为xUnit版本和.NET运行时设置新值之后,它再次运行。