NoSuchMethodError: org.sonar.api.batch.sensor.issue.NewIssue.onFile in sonarqube 5.2&5.3-RC1

64 views
Skip to first unread message

emers...@yahoo.com

unread,
Jan 7, 2016, 2:48:49 PM1/7/16
to SonarQube
HI,

I use the sonar-plugin-api-5.1 for developing my plugin in in this I create a new issue:


newIssue.onFile(inputFile);

newIssue.atLine(lineNumber);

newIssue.message(message);


when I deploy the plugin to the extension/plugins folder and start an analysis, I get


Caused by: java.lang.NoSuchMethodError: org.sonar.api.batch.sensor.issue.NewIssue.onFile(Lorg/sonar/api/batch/fs/InputFile;)Lorg/sonar/api/batch/sensor/issue/NewIssue;


This is run in sonarqube 5.2 and 5.3-RC1 - why does the runtime environment does not know the method ? Or what else could be the problem ? 


Thanks

Julien HENRY

unread,
Jan 8, 2016, 3:18:19 AM1/8/16
to SonarQube
Hi,

I guess you are using the @Beta API. This API is not production ready so we may do some incompatible changes.

I suggest you stick to stable API (Issuable) for the time being.

++

Julien

emers...@yahoo.com

unread,
Jan 8, 2016, 3:38:18 AM1/8/16
to SonarQube
great thanks for the answer - I indeed missed the @Beta tag. thanks for the hint to Issuable
Reply all
Reply to author
Forward
0 new messages