jenkinsci / jenkinsci/github-branch-source-plugin

[JENKINS-57942] Found multiple extensions which provide method originPullRequestDiscoveryTrait

Open
#1,263 6 comments 0 reactions 0 assignees View on GitHub
component:github-branch-source-plugin imported-jira-issue priority:major resolution:unresolved
Dominant language
Java
Stars
217
Forks
398
Avg merge
30m
Merged PRs (30d)
1

Description

I'm getting an error "Found multiple extensions which provide method originPullRequestDiscoveryTrait with arguments []: [[com.cloudbees.jenkins.plugins.bitbucket.OriginPullRequestDiscoveryTrait" when I try to use the originPullRequestDiscoveryTrait.  

 

I think it could be fixed by adding the @​Symbol to OriginPullRequestDiscoveryTrait.java.]  That's what was done for BranchDiscoveryTrait.java.

 

job-dsl usage


organizationFolder('Org') {

   organizations {

     github {

       repoOwner('Owner')

       traits {

            originPullRequestDiscoveryTrait()

              }

        }

   }

}


 

Stacktrace...


javaposse.jobdsl.dsl.DslException: Found multiple extensions which provide method originPullRequestDiscoveryTrait with arguments []: [[com.cloudbees.jenkins.plugins.bitbucket.OriginPullRequestDiscoveryTrait, org.jenkinsci.plugins.github_branch_source.OriginPullRequestDiscoveryTrait]]

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

at java.lang.reflect.Constructor.newInstance(Constructor.java:423)

at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:83)

at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:105)


 

---
Originally reported by pm15borc, imported from: Found multiple extensions which provide method originPullRequestDiscoveryTrait


  • status: Reopened
  • priority: Major
  • component(s): github-branch-source-plugin
  • resolution: Unresolved
  • votes: 1
  • watchers: 7
  • imported: 2025-12-02

Raw content of original issue

I'm getting an error "Found multiple extensions which provide method originPullRequestDiscoveryTrait with arguments []: [[com.cloudbees.jenkins.plugins.bitbucket.OriginPullRequestDiscoveryTrait" when I try to use the originPullRequestDiscoveryTrait.  

 

I think it could be fixed by adding the @Symbol to OriginPullRequestDiscoveryTrait.java.]  That's what was done for BranchDiscoveryTrait.java.

 

job-dsl usage


organizationFolder('Org') {
   organizations {
     github {
       repoOwner('Owner')
       traits {
            originPullRequestDiscoveryTrait()
              }

        }

   }
}


 

Stacktrace...


javaposse.jobdsl.dsl.DslException: Found multiple extensions which provide method originPullRequestDiscoveryTrait with arguments []: [[com.cloudbees.jenkins.plugins.bitbucket.OriginPullRequestDiscoveryTrait, org.jenkinsci.plugins.github_branch_source.OriginPullRequestDiscoveryTrait]]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:83)
at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:105)


 

environment

```
Jenkins version = 2.164.3(docker jenkins/jenkins:lts)

Jobdsl version = job-dsl-1.74
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.