當我在聲納4.5.4服務器中部署了stylecope插件時,我有我自己定製的版本2.1的csharp插件,有些規則像下面那樣得到異常,但在刪除規則它的工作正常。這個例外是在聲吶4.5.4中得到的,但是在聲吶4.2和較小版本中沒有遇到任何問題。我需要知道爲什麼會出現這個問題,說什麼意思?請解釋。由於聲納4.5.4--規則的債務定義是無效異常
java.lang.IllegalArgumentException: Debt definition on rule 'stylecopcsharp:ConstFieldNamesMustBeginWithUpperCaseLetter' is invalid at org.sonar.server.rule.DeprecatedRulesDefinitionLoader.remediationFunction(DeprecatedRulesDefinitionLoader.java:135) ~[sonar-server-4.5.4.jar:na] at org.sonar.server.rule.DeprecatedRulesDefinitionLoader.updateRuleDebtDefinitions(DeprecatedRulesDefinitionLoader.java:117) ~[sonar-server-4.5.4.jar:na] at org.sonar.server.rule.DeprecatedRulesDefinitionLoader.complete(DeprecatedRulesDefinitionLoader.java:107) ~[sonar-server-4.5.4.jar:na] at org.sonar.server.rule.RuleDefinitionsLoader.load(RuleDefinitionsLoader.java:53) ~[sonar-server-4.5.4.jar:na] at org.sonar.server.rule.RegisterRules.start(RegisterRules.java:102) ~[sonar-server-4.5.4.jar:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_55] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.7.0_55] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.7.0_55] at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.7.0_55] at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(ReflectionLifecycleStrategy.java:110) ~[picocontainer-2.14.3.jar:na] at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.start(ReflectionLifecycleStrategy.java:89) ~[picocontainer-2.14.3.jar:na] at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84) ~[picocontainer-2.14.3.jar:na] at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169) ~[picocontainer-2.14.3.jar:na] at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132) ~[picocontainer-2.14.3.jar:na] at org.picocontainer.behaviors.Stored.start(Stored.java:110) ~[picocontainer-2.14.3.jar:na] at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1015) ~[picocontainer-2.14.3.jar:na] at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1008) ~[picocontainer-2.14.3.jar:na] at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:766) ~[picocontainer-2.14.3.jar:na] at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92) ~[sonar-plugin-api-4.5.4.jar:na] at org.sonar.server.platform.ServerComponents$1.doPrivileged(ServerComponents.java:590) ~[sonar-server-4.5.4.jar:na] at org.sonar.server.user.DoPrivileged.execute(DoPrivileged.java:43) ~[sonar-server-4.5.4.jar:na] at org.sonar.server.platform.ServerComponents.executeStartupTasks(ServerComponents.java:586) ~[sonar-server-4.5.4.jar:na] at org.sonar.server.platform.Platform.executeStartupTasks(Platform.java:126) ~[sonar-server-4.5.4.jar:na] at org.sonar.server.platform.Platform.startLevel34Containers(Platform.java:122) ~[sonar-server-4.5.4.jar:na] at org.sonar.server.platform.Platform.doStart(Platform.java:81) ~[sonar-server-4.5.4.jar:na] at org.sonar.server.platform.PlatformServletContextListener.contextInitialized(PlatformServletContextListener.java:43) ~[sonar-server-4.5.4.jar:na] at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4973) [tomcat-embed-core-7.0.54.jar:7.0.54] at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5467) [tomcat-embed-core-7.0.54.jar:7.0.54] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-7.0.54.jar:7.0.54] at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) [tomcat-embed-core-7.0.54.jar:7.0.54] at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) [tomcat-embed-core-7.0.54.jar:7.0.54] at java.util.concurrent.FutureTask.run(Unknown Source) [na:1.7.0_55] at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.7.0_55] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.7.0_55] at java.lang.Thread.run(Unknown Source) [na:1.7.0_55]
你沒有提到你的插件版本。你可以檢查以確保你使用最新的? –
正在使用插件版本2.1。其實我需要使用sonar-dotnet-fxcop插件的最新插件,但我無法找到支持聲納服務器4.5.4的最新聲納fxcop。@ G。 Ann - SonarSource團隊 – chethan
FYI @tttthan'sonarqube'標籤足夠了(不需要sonar-runner,sonarqube-5.0等等)。但是,最好還包括'c#'或'stylecop'。 –