java.lang.NoClassDefFoundError: com/google/common/collect/Iterables

722 views
Skip to first unread message

dbac200...@yahoo.com

unread,
Jan 16, 2017, 4:51:15 AM1/16/17
to SonarQube

Hi all,


I try to deploy a plugin on 6.2 and I always get the following error message:


java.lang.NoClassDefFoundError: com/google/common/collect/Iterables

at org.sonar.squidbridge.annotations.AnnotationBasedRulesDefinition.addRuleClasses(AnnotationBasedRulesDefinition.java:90)

at org.sonar.squidbridge.annotations.AnnotationBasedRulesDefinition.addRuleClasses(AnnotationBasedRulesDefinition.java:86)

at org.sonar.squidbridge.annotations.AnnotationBasedRulesDefinition.load(AnnotationBasedRulesDefinition.java:75)

at org.sonar.plugins.coffeelint.CoffeelintRulesDefinition.define(CoffeelintRulesDefinition.java:13)

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

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

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:497)


I tried to add guava in my pom, but the packaging process tells me, that it is not packed, because Sonarqube provides it, but why does it fail so ?

My CoffeelintRulesDefinition looks like this

public class CoffeelintRulesDefinition implements RulesDefinition {

       @Override

       public void define(Context context) {

               NewRepository repository = context.createRepository(Coffee.KEY, Coffee.KEY).setName(CoffeelintCheckList.REPOSITORY_NAME);

               AnnotationBasedRulesDefinition.load(repository, Coffee.KEY, CoffeelintCheckList.getChecks());

               repository.done();

       }

}

so, I have a set of java classes with annotations, which are returned by the CoffeelintChecklist.getChecks();

In case this is ok, why is guava not found ? Or what other possibilities do I have to define my checks ? I tried my best to look at other plugins, but fail to find a straight, common way. My checks do not traverse any tree, they are just there as definition

Thanks for any input here, I'm quite stuck now
dbac



dbac200...@yahoo.com

unread,
Jan 19, 2017, 5:56:34 AM1/19/17
to SonarQube
I tried to remove and setup a new sonarqube 6.2 server, but I still geht the error :(

Simon Brandhof

unread,
Jan 19, 2017, 7:04:35 AM1/19/17
to dbac200...@yahoo.com, SonarQube
Hi,

This issue has already been discussed multiple times on this group. Please see https://groups.google.com/forum/#!msg/sonarqube/9wwH2jgDOr8/myvHfX9GBgAJ.

Best regards

--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/b225c600-a614-4984-b202-b0d3c6069947%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Simon BRANDHOF | SonarSource
Tech Lead & Co-Founder
http://twitter.com/SimonBrandhof

dbac200...@yahoo.com

unread,
Jan 19, 2017, 7:12:53 AM1/19/17
to SonarQube, dbac200...@yahoo.com
great - thanks for the link
Reply all
Reply to author
Forward
0 new messages