Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sonar 9 can't start with this plugin #295

Open
4 tasks done
mohalaci opened this issue Jul 16, 2021 · 10 comments
Open
4 tasks done

Sonar 9 can't start with this plugin #295

mohalaci opened this issue Jul 16, 2021 · 10 comments

Comments

@mohalaci
Copy link

New Issue Checklist

Issue Description

I upgraded to the latest sonar and started it in docker. I copied the plugin into the folder and I tried to restart my docker container but the sonar is stopped itself.

Command executed

docker run -d --name sonarqube_prod -p 9000:9000 -v sonarqube_data:/Users/xx/Documents/sonarqube/data -v sonarqube_extensions:/Users/xx/Documents/sonarqube/extensions -v sonarqube_logs:/Users/xx/Documents/sonarqube/logs -e sonar.jdbc.url=jdbc:postgresql://10.10.50.100/sonarqube -e sonar.jdbc.username=sonar -e sonar.jdbc.password=xx sonarqube:latest

docker cp ~/Downloads/backelite-sonar-swift-plugin-0.4.6.jar sonarqube_prod:/opt/sonarqube/extensions/plugins

Complete output when running fastlane, including the stack trace and command used
2021.07.16 08:50:42 ERROR web[][o.s.s.p.Platform] Background initialization failed. Stopping SonarQube

java.lang.NoSuchMethodError: 'org.sonar.api.server.rule.RulesDefinition$NewRule org.sonar.api.server.rule.RulesDefinition$NewRule.setDebtSubCharacteristic(java.lang.String)'

at org.sonar.squidbridge.rules.SqaleXmlLoader.processRule(SqaleXmlLoader.java:124)


at org.sonar.squidbridge.rules.SqaleXmlLoader.processSubChar(SqaleXmlLoader.java:92)

at org.sonar.squidbridge.rules.SqaleXmlLoader.processRoot(SqaleXmlLoader.java:78)

at org.sonar.squidbridge.rules.SqaleXmlLoader.loadXmlResource(SqaleXmlLoader.java:65)

at org.sonar.squidbridge.rules.SqaleXmlLoader.load(SqaleXmlLoader.java:52)


at com.backelite.sonarqube.swift.issues.swiftlint.SwiftLintRulesDefinition.define(SwiftLintRulesDefinition.java:61)

at org.sonar.server.rule.RuleDefinitionsLoader.load(RuleDefinitionsLoader.java:53)

at org.sonar.server.rule.RegisterRules.start(RegisterRules.java:117)

at org.sonar.core.platform.StartableCloseableSafeLifecyleStrategy.start(StartableCloseableSafeLifecyleStrategy.java:40)

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:136)

at org.sonar.server.platform.platformlevel.PlatformLevel.start(PlatformLevel.java:90)

at org.sonar.server.platform.platformlevel.PlatformLevelStartup.access$001(PlatformLevelStartup.java:49)

at org.sonar.server.platform.platformlevel.PlatformLevelStartup$1.doPrivileged(PlatformLevelStartup.java:87)

at org.sonar.server.user.DoPrivileged.execute(DoPrivileged.java:45)

at org.sonar.server.platform.platformlevel.PlatformLevelStartup.start(PlatformLevelStartup.java:84)

at org.sonar.server.platform.PlatformImpl.executeStartupTasks(PlatformImpl.java:198)

at org.sonar.server.platform.PlatformImpl$1.lambda$doRun$1(PlatformImpl.java:122)

at org.sonar.server.platform.PlatformImpl$AutoStarterRunnable.runIfNotAborted(PlatformImpl.java:370)

at org.sonar.server.platform.PlatformImpl$1.doRun(PlatformImpl.java:122)

at org.sonar.server.platform.PlatformImpl$AutoStarterRunnable.run(PlatformImpl.java:354)

at java.base/java.lang.Thread.run(Unknown Source)


 [REPLACE THIS WITH YOUR INFORMATION] 

Environment

 [REPLACE THIS WITH YOUR INFORMATION] 
@ahmed-abdurrahman
Copy link

Same issue with Sonar 9

Sonar Qube's es.log

2021.08.22 15:33:06 INFO  es[][o.e.n.Node] version[7.12.1], pid[68560], build[default/tar/3186837139b9c6b6d23c3200870651f10d3343b7/2021-04-20T20:56:39.040728659Z], OS[Mac OS X/11.2/x86_64], JVM[Oracle Corporation/Java HotSpot(TM) 64-Bit Server VM/11.0.12/11.0.12+8-LTS-237]
2021.08.22 15:33:06 INFO  es[][o.e.n.Node] JVM home [/Library/Java/JavaVirtualMachines/jdk-11.0.12.jdk/Contents/Home]
2021.08.22 15:33:06 INFO  es[][o.e.n.Node] JVM arguments [-XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -Djava.io.tmpdir=/Applications/sonarqube/temp, -XX:ErrorFile=../logs/es_hs_err_pid%p.log, -Des.networkaddress.cache.ttl=60, -Des.networkaddress.cache.negative.ttl=10, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dio.netty.allocator.numDirectArenas=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Djava.locale.providers=COMPAT, -Xmx512m, -Xms512m, -XX:MaxDirectMemorySize=256m, -XX:+HeapDumpOnOutOfMemoryError, -Des.path.home=/Applications/sonarqube/elasticsearch, -Des.path.conf=/Applications/sonarqube/temp/conf/es, -Des.distribution.flavor=default, -Des.distribution.type=tar, -Des.bundled_jdk=false]
2021.08.22 15:33:07 INFO  es[][o.e.p.PluginsService] loaded module [analysis-common]
2021.08.22 15:33:07 INFO  es[][o.e.p.PluginsService] loaded module [lang-painless]
2021.08.22 15:33:07 INFO  es[][o.e.p.PluginsService] loaded module [parent-join]
2021.08.22 15:33:07 INFO  es[][o.e.p.PluginsService] loaded module [percolator]
2021.08.22 15:33:07 INFO  es[][o.e.p.PluginsService] loaded module [transport-netty4]
2021.08.22 15:33:07 INFO  es[][o.e.p.PluginsService] no plugins loaded
2021.08.22 15:33:07 INFO  es[][o.e.e.NodeEnvironment] using [1] data paths, mounts [[/System/Volumes/Data (/dev/disk2s1)]], net usable_space [193.9gb], net total_space [957.1gb], types [apfs]
2021.08.22 15:33:07 INFO  es[][o.e.e.NodeEnvironment] heap size [494.9mb], compressed ordinary object pointers [true]
2021.08.22 15:33:07 INFO  es[][o.e.n.Node] node name [sonarqube], node ID [t4cdBUHRT9ms3_XFQWk3xw], cluster name [sonarqube], roles [master, remote_cluster_client, data, ingest]
2021.08.22 15:33:12 INFO  es[][o.e.t.NettyAllocator] creating NettyAllocator with the following configs: [name=unpooled, suggested_max_allocation_size=1mb, factors={es.unsafe.use_unpooled_allocator=null, g1gc_enabled=false, g1gc_region_size=0b, heap_size=494.9mb}]
2021.08.22 15:33:12 INFO  es[][o.e.d.DiscoveryModule] using discovery type [zen] and seed hosts providers [settings]
2021.08.22 15:33:12 INFO  es[][o.e.g.DanglingIndicesState] gateway.auto_import_dangling_indices is disabled, dangling indices will not be automatically detected or imported and must be managed manually
2021.08.22 15:33:12 INFO  es[][o.e.n.Node] initialized
2021.08.22 15:33:12 INFO  es[][o.e.n.Node] starting ...
2021.08.22 15:33:13 INFO  es[][o.e.t.TransportService] publish_address {127.0.0.1:55036}, bound_addresses {127.0.0.1:55036}
2021.08.22 15:33:13 INFO  es[][o.e.c.c.Coordinator] cluster UUID [PzOfxPU0Sc2GdFncpji7kg]
2021.08.22 15:33:14 INFO  es[][o.e.c.s.MasterService] elected-as-master ([1] nodes joined)[{sonarqube}{t4cdBUHRT9ms3_XFQWk3xw}{5ed-9OS5TvGqc8ZdTFEsEA}{127.0.0.1}{127.0.0.1:55036}{dimr}{rack_id=sonarqube} elect leader, _BECOME_MASTER_TASK_, _FINISH_ELECTION_], term: 9, version: 193, delta: master node changed {previous [], current [{sonarqube}{t4cdBUHRT9ms3_XFQWk3xw}{5ed-9OS5TvGqc8ZdTFEsEA}{127.0.0.1}{127.0.0.1:55036}{dimr}{rack_id=sonarqube}]}
2021.08.22 15:33:14 INFO  es[][o.e.c.s.ClusterApplierService] master node changed {previous [], current [{sonarqube}{t4cdBUHRT9ms3_XFQWk3xw}{5ed-9OS5TvGqc8ZdTFEsEA}{127.0.0.1}{127.0.0.1:55036}{dimr}{rack_id=sonarqube}]}, term: 9, version: 193, reason: Publication{term=9, version=193}
2021.08.22 15:33:14 INFO  es[][o.e.g.GatewayService] recovered [7] indices into cluster_state
2021.08.22 15:33:14 INFO  es[][o.e.h.AbstractHttpServerTransport] publish_address {127.0.0.1:9001}, bound_addresses {127.0.0.1:9001}
2021.08.22 15:33:14 INFO  es[][o.e.n.Node] started
2021.08.22 15:33:17 INFO  es[][o.e.c.r.a.AllocationService] Cluster health status changed from [RED] to [GREEN] (reason: [shards started [[metadatas][0]]]).
2021.08.22 15:33:35 INFO  es[][o.e.n.Node] stopping ...
2021.08.22 15:33:35 INFO  es[][o.e.n.Node] stopped
2021.08.22 15:33:35 INFO  es[][o.e.n.Node] closing ...
2021.08.22 15:33:35 INFO  es[][o.e.n.Node] closed

SonarQube's web.log

2021.08.22 15:33:34 ERROR web[][o.s.s.p.Platform] Background initialization failed. Stopping SonarQube
java.lang.NoSuchMethodError: org.sonar.api.server.rule.RulesDefinition$NewRule.setDebtSubCharacteristic(Ljava/lang/String;)Lorg/sonar/api/server/rule/RulesDefinition$NewRule;
	at org.sonar.squidbridge.rules.SqaleXmlLoader.processRule(SqaleXmlLoader.java:124)
	at org.sonar.squidbridge.rules.SqaleXmlLoader.processSubChar(SqaleXmlLoader.java:92)
	at org.sonar.squidbridge.rules.SqaleXmlLoader.processRoot(SqaleXmlLoader.java:78)
	at org.sonar.squidbridge.rules.SqaleXmlLoader.loadXmlResource(SqaleXmlLoader.java:65)
	at org.sonar.squidbridge.rules.SqaleXmlLoader.load(SqaleXmlLoader.java:52)
	at com.backelite.sonarqube.swift.issues.swiftlint.SwiftLintRulesDefinition.define(SwiftLintRulesDefinition.java:61)
	at org.sonar.server.rule.RuleDefinitionsLoader.load(RuleDefinitionsLoader.java:53)
	at org.sonar.server.rule.RegisterRules.start(RegisterRules.java:117)
	at org.sonar.core.platform.StartableCloseableSafeLifecyleStrategy.start(StartableCloseableSafeLifecyleStrategy.java:40)
	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:136)
	at org.sonar.server.platform.platformlevel.PlatformLevel.start(PlatformLevel.java:90)
	at org.sonar.server.platform.platformlevel.PlatformLevelStartup.access$001(PlatformLevelStartup.java:49)
	at org.sonar.server.platform.platformlevel.PlatformLevelStartup$1.doPrivileged(PlatformLevelStartup.java:87)
	at org.sonar.server.user.DoPrivileged.execute(DoPrivileged.java:45)
	at org.sonar.server.platform.platformlevel.PlatformLevelStartup.start(PlatformLevelStartup.java:84)
	at org.sonar.server.platform.PlatformImpl.executeStartupTasks(PlatformImpl.java:198)
	at org.sonar.server.platform.PlatformImpl$1.lambda$doRun$1(PlatformImpl.java:122)
	at org.sonar.server.platform.PlatformImpl$AutoStarterRunnable.runIfNotAborted(PlatformImpl.java:370)
	at org.sonar.server.platform.PlatformImpl$1.doRun(PlatformImpl.java:122)
	at org.sonar.server.platform.PlatformImpl$AutoStarterRunnable.run(PlatformImpl.java:354)
	at java.base/java.lang.Thread.run(Thread.java:834)
2021.08.22 15:33:34 INFO  web[][o.s.p.ProcessEntryPoint] Hard stopping process
2021.08.22 15:33:34 INFO  web[][o.s.s.n.NotificationDaemon] Notification service stopped
2021.08.22 15:33:34 INFO  web[][o.s.s.p.d.EmbeddedDatabase] Embedded database stopped

@estebanhiguitad
Copy link

estebanhiguitad commented Sep 29, 2021

Hi everyone

I have created a branch to resolve this issue. If anyone want to contribute to it can contact me by links un my Github profile to go ahead together.

The branch:
https://github.com/estebanhiguitad/sonar-swift/tree/update-rules-for-sonar-9

@estebanhiguitad
Copy link

Hello.
It is becouse the plugin is not supported for Sonarqube 9. I am working on fix it in a branch. You want can use the artifact that I generate as SNAPSHOT mode and give me a feedback about it.

https://github.com/estebanhiguitad/sonar-swift/releases

Thanks

@TrabelsiAchraf
Copy link

Hello. It is becouse the plugin is not supported for Sonarqube 9. I am working on fix it in a branch. You want can use the artifact that I generate as SNAPSHOT mode and give me a feedback about it.

https://github.com/estebanhiguitad/sonar-swift/releases

Thanks

@estebanhiguitad Thank you a lot, yes it works pretty good.

@Jorge2M
Copy link

Jorge2M commented May 10, 2022

Hello. It is becouse the plugin is not supported for Sonarqube 9. I am working on fix it in a branch. You want can use the artifact that I generate as SNAPSHOT mode and give me a feedback about it.

https://github.com/estebanhiguitad/sonar-swift/releases

Thanks

Works fine for Sonar 9.2.4!

Thank you

@srikanthkv-phonepe
Copy link

@estebanhiguitad You are awesome :) Works perfectly fine with Sonarqube 9.7.0

@zippy1978
Copy link
Contributor

HI all,
Just in case we've been working on a new plugin (with more features) here: https://github.com/insideapp-oss/sonar-apple

@mzw-sdc
Copy link

mzw-sdc commented Mar 27, 2023

Hello. It is becouse the plugin is not supported for Sonarqube 9. I am working on fix it in a branch. You want can use the artifact that I generate as SNAPSHOT mode and give me a feedback about it.

https://github.com/estebanhiguitad/sonar-swift/releases

Thanks

This is working on 9.9.0.65466.. Thanks!

@rounak-codiant
Copy link

It is not working in my case. Having same SonarQube version 9.9 LTS (Build 65466)
https://github.com/estebanhiguitad/sonar-swift/releases

  1. Taken pull from update-rules-for-sonar-9 branch.
  2. Tried to create a build using mvn package and mvn clean package -U by which I'm able to build backelite-sonar-swift-plugin-0.4.6.jar.
  3. Then, I tried update-sonar-9 branch and build jar files using the same commands, and this time I got build version backelite-sonar-swift-plugin-0.4.8.jar

Both Jar files are not working.
@mzw-sdc /@estebanhiguitad Could you share the steps you followed to build the jar file?

@azhar-999
Copy link

I have the same issue in Sonar 10.3 . Is there any solution for this edition?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants