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

Bitbucket plugin broken after Jenkins upgrade to 2.3

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      I started getting these errors inside a Maven build, after the upgrade to 2.3:

      ERROR: Processing failed due to a bug in the code. Please report this to jenkinsci-users@googlegroups.com
      java.lang.ClassCastException: org.acegisecurity.providers.UsernamePasswordAuthenticationToken cannot be cast to org.jenkinsci.plugins.BitbucketAuthenticationToken
      at org.jenkinsci.plugins.BitbucketSecurityRealm.loadUserByUsername(BitbucketSecurityRealm.java:162)
      at hudson.model.User$UserIDCanonicalIdResolver.resolveCanonicalId(User.java:1048)
      at hudson.model.User.get(User.java:394)
      at hudson.model.User.get(User.java:363)
      at hudson.plugins.git.GitChangeSet.findOrCreateUser(GitChangeSet.java:374)
      at hudson.plugins.git.GitChangeSet.getAuthor(GitChangeSet.java:435)
      at hudson.model.AbstractBuild.getCulprits(AbstractBuild.java:350)
      at hudson.maven.reporters.MavenMailer.end(MavenMailer.java:72)
      at hudson.maven.AbstractMavenBuilder.end(AbstractMavenBuilder.java:104)
      at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:859)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
      at hudson.model.Run.execute(Run.java:1738)
      at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531)
      at hudson.model.ResourceController.execute(ResourceController.java:98)
      at hudson.model.Executor.run(Executor.java:410)
      project=hudson.maven.MavenModuleSet@1d9d1d07[BUILD_integration_tests]

        Attachments

          Activity

          Hide
          rainerh Rainer Hermanns added a comment -

          Seems to be related to the security changes, JENKINS-34775 has similar exceptions.
          Downgrading to 2.2 resolved the issue for me.

          Show
          rainerh Rainer Hermanns added a comment - Seems to be related to the security changes, JENKINS-34775 has similar exceptions. Downgrading to 2.2 resolved the issue for me.
          Hide
          kristoffer Kristoffer Peterhänsel added a comment -

          Setting hudson.model.User.SECURITY_243_FULL_DEFENSE=false (as suggested on the mailing list seems to make it go too

          Show
          kristoffer Kristoffer Peterhänsel added a comment - Setting hudson.model.User.SECURITY_243_FULL_DEFENSE=false (as suggested on the mailing list seems to make it go too
          Hide
          chrisagiddings Chris Giddings added a comment -

          Kristoffer Peterhänsel

          Where do I make that config change?

          My builds and SSH file copy of those builds suceed, but when releasing the workflow afterward, it fails.

          Show
          chrisagiddings Chris Giddings added a comment - Kristoffer Peterhänsel Where do I make that config change? My builds and SSH file copy of those builds suceed, but when releasing the workflow afterward, it fails.
          Hide
          kristoffer Kristoffer Peterhänsel added a comment -

          It has to be set as a system property at start (JVM -D option). Not sure if there is another way to do it

          Show
          kristoffer Kristoffer Peterhänsel added a comment - It has to be set as a system property at start (JVM -D option). Not sure if there is another way to do it
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Sam Clinckspoor
          Path:
          src/main/java/org/jenkinsci/plugins/BitbucketSecurityRealm.java
          http://jenkins-ci.org/commit/bitbucket-oauth-plugin/ba0fcbd155c3adf3403929534cf9a3ba24239d28
          Log:
          JENKINS-34792 Don't cast inconvertible un/pw token

          Fixes JENKINS-34792

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Sam Clinckspoor Path: src/main/java/org/jenkinsci/plugins/BitbucketSecurityRealm.java http://jenkins-ci.org/commit/bitbucket-oauth-plugin/ba0fcbd155c3adf3403929534cf9a3ba24239d28 Log: JENKINS-34792 Don't cast inconvertible un/pw token Fixes JENKINS-34792
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: mallowlabs
          Path:
          src/main/java/org/jenkinsci/plugins/BitbucketSecurityRealm.java
          http://jenkins-ci.org/commit/bitbucket-oauth-plugin/6ee7820b70baeca2bc2bf919178c1b5bcf2f7db4
          Log:
          Merge pull request #1 from SamClinckspoor/JENKINS-34792

          JENKINS-34792 Don't cast inconvertible un/pw token

          Compare: https://github.com/jenkinsci/bitbucket-oauth-plugin/compare/2fb42f0905b2...6ee7820b70ba

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: mallowlabs Path: src/main/java/org/jenkinsci/plugins/BitbucketSecurityRealm.java http://jenkins-ci.org/commit/bitbucket-oauth-plugin/6ee7820b70baeca2bc2bf919178c1b5bcf2f7db4 Log: Merge pull request #1 from SamClinckspoor/ JENKINS-34792 JENKINS-34792 Don't cast inconvertible un/pw token Compare: https://github.com/jenkinsci/bitbucket-oauth-plugin/compare/2fb42f0905b2...6ee7820b70ba
          Hide
          mallowlabs mallowlabs mallowlabs added a comment -

          Fixed bitbucket-oauth-plugin v0.5.

          Show
          mallowlabs mallowlabs mallowlabs added a comment - Fixed bitbucket-oauth-plugin v0.5.

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            hgfxng Herbert Fischer
            Votes:
            6 Vote for this issue
            Watchers:
            12 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: