BadRequestException: Rule XXXX and profile AV53GwUwO68ox-crP1wH have different languages

82 views
Skip to first unread message

philipp...@gmail.com

unread,
Sep 14, 2017, 12:30:10 PM9/14/17
to SonarQube
Hi,
The FindBugs plugin has been trying for a long time to include most of its support languages. (Groovy, Scala, Closure, Kotlin, etc..)

The last development seems to be working well with existing languages from built-in plugin and third party plugins.

But it seems like _migrating_ to the new version failed because of check from Sonar.
I would like to know what the check objective is doing/saying (The message is a bit cryptic). I would like to know what are the changes needed.

---
2017.09.14 10:22:56 INFO web[][o.s.p.ProcessEntryPoint] Starting web
2017.09.14 10:22:57 INFO web[][o.a.t.u.n.NioSelectorPool] Using a shared selector for servlet write/read
2017.09.14 10:22:58 INFO web[][o.e.plugins] [Hydro] modules [], plugins [], sites []
2017.09.14 10:22:58 INFO web[][o.s.s.e.EsClientProvider] Connected to local Elasticsearch: [127.0.0.1:9001]
2017.09.14 10:22:58 INFO web[][o.s.s.p.LogServerVersion] SonarQube Server / 6.5.0.27846 / ef2ca5b33e5795b841d45e0b20fef3cb90391719
2017.09.14 10:23:00 INFO web[][o.s.s.p.d.EmbeddedDatabase] Starting embedded database on port 9092 with url jdbc:h2:tcp://127.0.0.1:9092/sonar
2017.09.14 10:23:00 INFO web[][o.s.s.p.d.EmbeddedDatabase] Embedded database started. Data stored in: C:\Sonarqube\sonarqube-6.5\data
2017.09.14 10:23:00 INFO web[][o.sonar.db.Database] Create JDBC data source for jdbc:h2:tcp://127.0.0.1:9092/sonar
2017.09.14 10:23:02 WARN web[][o.s.d.DatabaseChecker] H2 database should be used for evaluation purpose only
2017.09.14 10:23:02 INFO web[][o.s.s.p.ServerFileSystemImpl] SonarQube home: C:\Sonarqube\sonarqube-6.5
2017.09.14 10:23:03 INFO web[][o.s.s.p.ServerPluginRepository] Deploy plugin C# / 5.10.1.1411 / 748a97f89a5327cbea5cfe1f8aebe87d073c74a0
2017.09.14 10:23:03 INFO web[][o.s.s.p.ServerPluginRepository] Deploy plugin Findbugs / 3.6 /
2017.09.14 10:23:03 INFO web[][o.s.s.p.ServerPluginRepository] Deploy plugin Flex / 2.3 / 79167f762219bea1fd181ff5ef6ca4b34abd1675
2017.09.14 10:23:03 INFO web[][o.s.s.p.ServerPluginRepository] Deploy plugin Git / 1.2 / a713dd64daf8719ba4e7f551f9a1966c62690c17
2017.09.14 10:23:03 INFO web[][o.s.s.p.ServerPluginRepository] Deploy plugin SVN / 1.5.0.715 / 0210a6f08400da8cab1a20e118ee3c97f8847ee4
2017.09.14 10:23:03 INFO web[][o.s.s.p.ServerPluginRepository] Deploy plugin SonarJS / 3.1.1.5128 / 564d130c281685fde03e85964417158e32a17b2b
2017.09.14 10:23:03 INFO web[][o.s.s.p.ServerPluginRepository] Deploy plugin SonarJava / 4.13.0.11627 / eb3d5c15a8ffd1e75288204f403ae1369827171b
2017.09.14 10:23:03 INFO web[][o.s.s.p.ServerPluginRepository] Deploy plugin SonarPHP / 2.10.0.2087 / b24a8fcb16d37cae2f8c6741141f4136c444851f
2017.09.14 10:23:03 INFO web[][o.s.s.p.ServerPluginRepository] Deploy plugin SonarPython / 1.8.0.1496 / 3fe3bc4d0273a5721ea2fb368dc45b1bb82fede3
2017.09.14 10:23:03 INFO web[][o.s.s.p.ServerPluginRepository] Deploy plugin SonarXML / 1.4.3.1027 / 39588245cecf538bb27be4e496ff303b0143d20b
2017.09.14 10:23:09 INFO web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter org.sonar.server.ws.WebServiceFilter@12510b8 [pattern=UrlPattern{inclusions=[/api/system/migrate_db/*, ...], exclusions=[/api/properties*, ...]}]
2017.09.14 10:23:10 INFO web[][o.s.s.a.EmbeddedTomcat] HTTP connector enabled on port 9000
2017.09.14 10:23:14 INFO web[][o.s.s.p.UpdateCenterClient] Update center: https://update.sonarsource.org/update-center.properties (no proxy)
2017.09.14 10:23:16 INFO web[][o.s.s.n.NotificationDaemon] Notification service started (delay 60 sec.)
2017.09.14 10:23:16 INFO web[][o.s.s.s.RegisterMetrics] Register metrics
2017.09.14 10:23:16 INFO web[][o.s.s.r.RegisterRules] Register rules
2017.09.14 10:23:21 INFO web[][o.s.s.q.BuiltInQProfileRepositoryImpl] Load quality profiles
2017.09.14 10:23:22 INFO web[][o.s.s.q.RegisterQualityProfiles] Register quality profiles
2017.09.14 10:23:22 INFO web[][o.s.s.q.RegisterQualityProfiles] Update profile cs/Sonar way
2017.09.14 10:23:23 INFO web[][o.s.s.q.RegisterQualityProfiles] Update profile java/FindBugs
2017.09.14 10:23:24 INFO web[][o.s.s.q.RegisterQualityProfiles] Update profile java/FindBugs + FB-Contrib
2017.09.14 10:23:25 INFO web[][o.s.s.q.RegisterQualityProfiles] Update profile java/FindBugs Security Audit
2017.09.14 10:23:25 ERROR web[][o.s.s.p.Platform] Background initialization failed. Stopping SonarQube
org.sonar.server.exceptions.BadRequestException: Rule findsecbugs-jsp:JSP_INCLUDE and profile AV53GwUwO68ox-crP1wH have different languages
at org.sonar.server.exceptions.BadRequestException.create(BadRequestException.java:44)
at org.sonar.server.exceptions.BadRequestException.create(BadRequestException.java:48)
at org.sonar.server.ws.WsUtils.checkRequest(WsUtils.java:71)
at org.sonar.server.qualityprofile.RuleActivatorContext.verifyForActivation(RuleActivatorContext.java:259)
at org.sonar.server.qualityprofile.RuleActivator.doActivate(RuleActivator.java:98)
at org.sonar.server.qualityprofile.RuleActivator.activateOnBuiltInRulesProfile(RuleActivator.java:83)
at org.sonar.server.qualityprofile.BuiltInQProfileUpdateImpl.lambda$update$0(BuiltInQProfileUpdateImpl.java:58)
at java.lang.Iterable.forEach(Unknown Source)
at org.sonar.server.qualityprofile.BuiltInQProfileUpdateImpl.update(BuiltInQProfileUpdateImpl.java:55)
at org.sonar.server.qualityprofile.RegisterQualityProfiles.update(RegisterQualityProfiles.java:118)
at org.sonar.server.qualityprofile.RegisterQualityProfiles.lambda$start$1(RegisterQualityProfiles.java:85)
at java.lang.Iterable.forEach(Unknown Source)
at org.sonar.server.qualityprofile.RegisterQualityProfiles.start(RegisterQualityProfiles.java:80)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(ReflectionLifecycleStrategy.java:110)
at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.start(ReflectionLifecycleStrategy.java:89)
at org.sonar.core.platform.ComponentContainer$1.start(ComponentContainer.java:320)
at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84)
at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169)
at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132)
at org.picocontainer.behaviors.Stored.start(Stored.java:110)
at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1016)
at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1009)
at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:767)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:143)
at org.sonar.server.platform.platformlevel.PlatformLevel.start(PlatformLevel.java:88)
at org.sonar.server.platform.platformlevel.PlatformLevelStartup.access$001(PlatformLevelStartup.java:47)
at org.sonar.server.platform.platformlevel.PlatformLevelStartup$1.doPrivileged(PlatformLevelStartup.java:88)
at org.sonar.server.user.DoPrivileged.execute(DoPrivileged.java:45)
at org.sonar.server.platform.platformlevel.PlatformLevelStartup.start(PlatformLevelStartup.java:85)
at org.sonar.server.platform.Platform.executeStartupTasks(Platform.java:216)
at org.sonar.server.platform.Platform.access$400(Platform.java:46)
at org.sonar.server.platform.Platform$1.lambda$doRun$1(Platform.java:121)
at org.sonar.server.platform.Platform$AutoStarterRunnable.runIfNotAborted(Platform.java:391)
at org.sonar.server.platform.Platform$1.doRun(Platform.java:121)
at org.sonar.server.platform.Platform$AutoStarterRunnable.run(Platform.java:375)
at java.lang.Thread.run(Unknown Source)
2017.09.14 10:23:25 INFO web[][o.s.p.StopWatcher] Stopping process
2017.09.14 10:23:26 INFO web[][o.s.s.n.NotificationDaemon] Notification service stopped
2017.09.14 10:23:47 INFO web[][o.s.s.p.d.EmbeddedDatabase] Embedded database stopped
---

Julien HENRY

unread,
Sep 15, 2017, 4:25:42 AM9/15/17
to SonarQube
Hi Philippe,

Looking at the code of the plugin, I see that the rule findsecbugs-jsp:JSP_INCLUDE is declared in the FindSecurityBugsJspRulesDefinition class, with language "jsp".

But then you are trying to create a built-in quality profile in class FindbugsSecurityAuditProfile, that will contains this rule, but for language "java".

In SonarQube, a quality profile can only contain rules with the same language. You'll have to create a profile for each language (possibly with the same name).

++

Julien

philipp...@gmail.com

unread,
Sep 22, 2017, 10:10:01 AM9/22/17
to SonarQube
I didn't respond before but that was it !
Reply all
Reply to author
Forward
0 new messages