[JIRA] [workflow-multibranch-plugin] (JENKINS-35349) java.lang.NoSuchMethodError: jenkins.scm.api.SCMSource.getTrustedRevision

5 views
Skip to first unread message

benh@swimfrog.com (JIRA)

unread,
Jun 3, 2016, 4:18:01 PM6/3/16
to jenkinsc...@googlegroups.com
Ben Hawkins created an issue
 
Jenkins / Bug JENKINS-35349
java.lang.NoSuchMethodError: jenkins.scm.api.SCMSource.getTrustedRevision
Issue Type: Bug Bug
Assignee: Manuel Recena Soto
Components: workflow-multibranch-plugin
Created: 2016/Jun/03 8:17 PM
Environment: Jenkins 1.651.2, Pipeline 2.1, Pipeline API 2.0, Pipeline Multibranch 2.6 (also tried with 2.3 and 2.5)
Priority: Minor Minor
Reporter: Ben Hawkins

After branch indexing, when I try to build a project in a MultiBranch workflow, I receive the following error in the build log:

Started by user xxxxxxxxxxxxxxxx
Setting origin to git@xxxxxxxxxxxxxxxxxxxxx/project.git
Fetching origin...
java.lang.NoSuchMethodError: jenkins.scm.api.SCMSource.getTrustedRevision(Ljenkins/scm/api/SCMRevision;Lhudson/model/TaskListener;)Ljenkins/scm/api/SCMRevision;
	at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:78)
	at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:206)
	at hudson.model.ResourceController.execute(ResourceController.java:98)
	at hudson.model.Executor.run(Executor.java:410)
Finished: FAILURE

A Pipeline project (not MultiBranch) seems to work OK, using a source definition in the build project, using git or checkout in a Jenkinsfile build script. So I think my git server doesn't have a problem. I've tried deleting and re-creating the multibranch pipeline project, to no effect.

I can't seem to find my way around this. Any help would be greatly appreciated.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

recena@gmail.com (JIRA)

unread,
Jun 3, 2016, 4:41:01 PM6/3/16
to jenkinsc...@googlegroups.com

recena@gmail.com (JIRA)

unread,
Jun 3, 2016, 4:41:05 PM6/3/16
to jenkinsc...@googlegroups.com
Manuel Recena Soto edited a comment on Bug JENKINS-35349
 
Re: java.lang.NoSuchMethodError: jenkins.scm.api.SCMSource.getTrustedRevision
[~swimfrog] Which version of {{branch-api}} and {{scm-api }}are you using?

benh@swimfrog.com (JIRA)

unread,
Jun 3, 2016, 4:59:02 PM6/3/16
to jenkinsc...@googlegroups.com

benh@swimfrog.com (JIRA)

unread,
Jun 3, 2016, 5:04:01 PM6/3/16
to jenkinsc...@googlegroups.com
Ben Hawkins edited a comment on Bug JENKINS-35349
 
Re: java.lang.NoSuchMethodError: jenkins.scm.api.SCMSource.getTrustedRevision
branch-api is 1.9, scm-api is 1.2.  Tried downgrading branch-api to 1.7, but same issue occurred.

recena@gmail.com (JIRA)

unread,
Jun 3, 2016, 5:16:01 PM6/3/16
to jenkinsc...@googlegroups.com

recena@gmail.com (JIRA)

unread,
Jun 3, 2016, 5:17:01 PM6/3/16
to jenkinsc...@googlegroups.com
Manuel Recena Soto edited a comment on Bug JENKINS-35349
 
Re: java.lang.NoSuchMethodError: jenkins.scm.api.SCMSource.getTrustedRevision
[~swimfrog] And for {{github-branch-source}}?  Or are you using a git server?

recena@gmail.com (JIRA)

unread,
Jun 3, 2016, 5:18:01 PM6/3/16
to jenkinsc...@googlegroups.com
Manuel Recena Soto updated an issue
Change By: Manuel Recena Soto
Comment:
[~swimfrog] And for {{github-branch-source}}? Or are you using a git server?

recena@gmail.com (JIRA)

unread,
Jun 3, 2016, 5:27:01 PM6/3/16
to jenkinsc...@googlegroups.com
Manuel Recena Soto commented on Bug JENKINS-35349
 
Re: java.lang.NoSuchMethodError: jenkins.scm.api.SCMSource.getTrustedRevision

Ben Hawkins Are you sure that you are using Git as branch source? or GitHub?

benh@swimfrog.com (JIRA)

unread,
Jun 3, 2016, 5:30:01 PM6/3/16
to jenkinsc...@googlegroups.com
Ben Hawkins commented on Bug JENKINS-35349
 
Re: java.lang.NoSuchMethodError: jenkins.scm.api.SCMSource.getTrustedRevision

I'm using my own git server (gitlab) and using Git as the source.

recena@gmail.com (JIRA)

unread,
Jun 3, 2016, 5:33:01 PM6/3/16
to jenkinsc...@googlegroups.com
Manuel Recena Soto commented on Bug JENKINS-35349
 
Re: java.lang.NoSuchMethodError: jenkins.scm.api.SCMSource.getTrustedRevision

It is weird because there is a default implementation for SCMSource.

recena@gmail.com (JIRA)

unread,
Jun 3, 2016, 5:41:01 PM6/3/16
to jenkinsc...@googlegroups.com

benh@swimfrog.com (JIRA)

unread,
Jun 3, 2016, 6:10:01 PM6/3/16
to jenkinsc...@googlegroups.com
Ben Hawkins updated an issue

First is screenshot of the multibranch config.

Second is the branch that was detected during branch indexing. It's the only branch that currently has a Jenkinsfile. I can include the file contents if you want, but it seems to be failing before it even tries to read it.

Change By: Ben Hawkins
Attachment: Screen Shot 2016-06-03 at 15.03.05.png
Attachment: Screen Shot 2016-06-03 at 15.05.14.png

jglick@cloudbees.com (JIRA)

unread,
Jun 6, 2016, 2:09:01 PM6/6/16
to jenkinsc...@googlegroups.com
Jesse Glick commented on Bug JENKINS-35349
 
Re: java.lang.NoSuchMethodError: jenkins.scm.api.SCMSource.getTrustedRevision

I suspect you are running an obsolete version of scm-api despite your claim to the contrary.

benh@swimfrog.com (JIRA)

unread,
Jun 6, 2016, 3:41:01 PM6/6/16
to jenkinsc...@googlegroups.com
Ben Hawkins commented on Bug JENKINS-35349
 
Re: java.lang.NoSuchMethodError: jenkins.scm.api.SCMSource.getTrustedRevision

Jesse Glick - You were right. My "Manage Plugins" screen showed 1.2, but when I dug into About Jenkins, it showed the version of scm-api artifact to be 1.0. I manually reinstalled scm-api 1.2 .hpi file via the Advanced screen in Manage Plugins, and it appears to be working now!

Thank you for your help! I'm also attaching screenshots of the discrepancy, in case this happens to anyone else.

benh@swimfrog.com (JIRA)

unread,
Jun 6, 2016, 3:42:01 PM6/6/16
to jenkinsc...@googlegroups.com
Ben Hawkins updated an issue

Version mismatch between plugin manager and About Jenkins artifact version.

Change By: Ben Hawkins
Attachment: Version mismatch.png

ignacio.albors@gmail.com (JIRA)

unread,
Sep 16, 2016, 2:41:01 AM9/16/16
to jenkinsc...@googlegroups.com
Ignacio Albors assigned an issue to Ignacio Albors
Change By: Ignacio Albors
Assignee: Manuel Recena Soto Ignacio Albors
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

ignacio.albors@gmail.com (JIRA)

unread,
Sep 19, 2016, 2:55:01 AM9/19/16
to jenkinsc...@googlegroups.com

jglick@cloudbees.com (JIRA)

unread,
Nov 9, 2016, 2:23:01 PM11/9/16
to jenkinsc...@googlegroups.com
Jesse Glick resolved as Not A Defect
 

Version mismatch between plugin manager and About Jenkins artifact version.

File a bug in core if you can reproduce that.

Change By: Jesse Glick
Status: Open Resolved
Resolution: Not A Defect
Reply all
Reply to author
Forward
0 new messages