Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-57942

Found multiple extensions which provide method originPullRequestDiscoveryTrait

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reopened (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Labels:
      None
    • Environment:
      Jenkins version = 2.164.3(docker jenkins/jenkins:lts)
      Jobdsl version = job-dsl-1.74
    • Similar Issues:

      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)

       

        Attachments

          Issue Links

            Activity

            pm15borc Paul Borchers created issue -
            pm15borc Paul Borchers made changes -
            Field Original Value New Value
            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|[https://github.com/jenkinsci/github-branch-source-plugin/blob/master/src/main/java/org/jenkinsci/plugins/github_branch_source/OriginPullRequestDiscoveryTrait.java#L132].]  That's what was done for [BranchDiscoveryTrait.java|https://github.com/jenkinsci/github-branch-source-plugin/blob/master/src/main/java/org/jenkinsci/plugins/github_branch_source/BranchDiscoveryTrait.java].

             

            job-dsl usage
            {quote}{{organizationFolder('Org') {}}
            {{   organizations {}}
            {{     github {}}
            {{       repoOwner('Owner')}}
            {{       traits {}}
            {{         originPullRequestDiscoveryTrait()}}
            {{      }}}
            {{    }}}
            {{  }}}
            {{}}}
            {quote}
             

            Stacktrace...
            {quote}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)
            {quote}
             
            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|#L132].]  That's what was done for [BranchDiscoveryTrait.java|https://github.com/jenkinsci/github-branch-source-plugin/blob/master/src/main/java/org/jenkinsci/plugins/github_branch_source/BranchDiscoveryTrait.java].

             

            job-dsl usage
            {quote}{{organizationFolder('Org') {}}
             {{   organizations {}}
             {{     github {}}
             {{       repoOwner('Owner')}}
             {{       traits {}}
             {{            originPullRequestDiscoveryTrait()}}
             \{{      }}}
             \{{    }}}
             \{{  }}}
             {{}}}
            {quote}
             

            Stacktrace...
            {quote}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)
            {quote}
             
            pm15borc Paul Borchers made changes -
            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|#L132].]  That's what was done for [BranchDiscoveryTrait.java|https://github.com/jenkinsci/github-branch-source-plugin/blob/master/src/main/java/org/jenkinsci/plugins/github_branch_source/BranchDiscoveryTrait.java].

             

            job-dsl usage
            {quote}{{organizationFolder('Org') {}}
             {{   organizations {}}
             {{     github {}}
             {{       repoOwner('Owner')}}
             {{       traits {}}
             {{            originPullRequestDiscoveryTrait()}}
             \{{      }}}
             \{{    }}}
             \{{  }}}
             {{}}}
            {quote}
             

            Stacktrace...
            {quote}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)
            {quote}
             
            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|#L132].]  That's what was done for [BranchDiscoveryTrait.java|https://github.com/jenkinsci/github-branch-source-plugin/blob/master/src/main/java/org/jenkinsci/plugins/github_branch_source/BranchDiscoveryTrait.java].

             

            job-dsl usage
            {quote}{{organizationFolder('Org') {}}
             {{   organizations {}}
             {{     github {}}
             {{       repoOwner('Owner')}}
             {{       traits {}}
             {{            originPullRequestDiscoveryTrait()}}
                          }

                    }

               }
             {{}}}
            {quote}
             

            Stacktrace...
            {quote}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)
            {quote}
             
            Hide
            bitwiseman Liam Newman added a comment -

            Paul Borchers
            Would you be able to submit a PR for this?

            Show
            bitwiseman Liam Newman added a comment - Paul Borchers Would you be able to submit a PR for this?
            Hide
            nickbrown Nicholas Brown added a comment -

            Is this a duplicate of JENKINS-45504 ?

            Show
            nickbrown Nicholas Brown added a comment - Is this a duplicate of JENKINS-45504 ?
            bitwiseman Liam Newman made changes -
            Link This issue duplicates JENKINS-45504 [ JENKINS-45504 ]
            bitwiseman Liam Newman made changes -
            Resolution Duplicate [ 3 ]
            Status Open [ 1 ] Resolved [ 5 ]
            Hide
            c_dug Conor Duggan added a comment -

            Hi Paul Borchers,

            I'm still seeing this issue with latest version of job-dsl (job-dsl-1.77). Was the proposed fix added in that release/previous release?

            Thanks.

            Show
            c_dug Conor Duggan added a comment - Hi Paul Borchers , I'm still seeing this issue with latest version of job-dsl (job-dsl-1.77). Was the proposed fix added in that release/previous release? Thanks.
            garzabll Luis Garza made changes -
            Assignee Paul Borchers [ pm15borc ]
            garzabll Luis Garza made changes -
            Assignee Paul Borchers [ pm15borc ]
            Hide
            garzabll Luis Garza added a comment - - edited

            Yep! We are facing the same issue.

            It's  still reproducible in latest job-dsl version 1.77

            Show
            garzabll Luis Garza added a comment - - edited Yep! We are facing the same issue. It's  still reproducible in latest job-dsl version 1.77
            garzabll Luis Garza made changes -
            Resolution Duplicate [ 3 ]
            Status Resolved [ 5 ] Reopened [ 4 ]
            garzabll Luis Garza made changes -
            Comment [ Yep! Please, reopen it!
            We are facing the same issue with latest job-dsl version 1.77. ]
            Hide
            bitwiseman Liam Newman added a comment -

            Luis Garza
            The issue isn't in job-dsl but in the branch-source plugins. Review the branch sources you have installed and make sure they are up to date.

            Show
            bitwiseman Liam Newman added a comment - Luis Garza The issue isn't in job-dsl but in the branch-source plugins. Review the branch sources you have installed and make sure they are up to date.

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              pm15borc Paul Borchers
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated: