java.lang.ClassCastException: org.acegisecurity.providers.UsernamePasswordAuthenticationToken cannot be cast to org.jenkinsci.plugins.BitbucketAuthenticationToken

Jenkins JIRA | Herbert Fischer | 10 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    [JIRA] [bitbucket-oauth-plugin] (JENKINS-34792) Bitbucket plugin broken after Jenkins upgrade to 2.3

    Google Groups | 10 months ago | herbert...@crossengage.io (JIRA)
    java.lang.ClassCastException: org.acegisecurity.providers.UsernamePasswordAuthenticationToken cannot be cast to org.jenkinsci.plugins.BitbucketAuthenticationToken
  2. 0

    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]

    Jenkins JIRA | 10 months ago | Herbert Fischer
    java.lang.ClassCastException: org.acegisecurity.providers.UsernamePasswordAuthenticationToken cannot be cast to org.jenkinsci.plugins.BitbucketAuthenticationToken
  3. 0

    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]

    Jenkins JIRA | 10 months ago | Herbert Fischer
    java.lang.ClassCastException: org.acegisecurity.providers.UsernamePasswordAuthenticationToken cannot be cast to org.jenkinsci.plugins.BitbucketAuthenticationToken
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.ClassCastException

      org.acegisecurity.providers.UsernamePasswordAuthenticationToken cannot be cast to org.jenkinsci.plugins.BitbucketAuthenticationToken

      at org.jenkinsci.plugins.BitbucketSecurityRealm.loadUserByUsername()
    2. org.jenkinsci.plugins
      BitbucketSecurityRealm.loadUserByUsername
      1. org.jenkinsci.plugins.BitbucketSecurityRealm.loadUserByUsername(BitbucketSecurityRealm.java:162)
      1 frame
    3. Hudson
      User.get
      1. hudson.model.User$UserIDCanonicalIdResolver.resolveCanonicalId(User.java:1048)
      2. hudson.model.User.get(User.java:394)
      3. hudson.model.User.get(User.java:363)
      3 frames
    4. Hudson GIT plugin
      GitChangeSet.getAuthor
      1. hudson.plugins.git.GitChangeSet.findOrCreateUser(GitChangeSet.java:374)
      2. hudson.plugins.git.GitChangeSet.getAuthor(GitChangeSet.java:435)
      2 frames
    5. Hudson
      AbstractBuild.getCulprits
      1. hudson.model.AbstractBuild.getCulprits(AbstractBuild.java:350)
      1 frame
    6. Legacy Maven 2 job type Plugin
      MavenMailer.end
      1. hudson.maven.reporters.MavenMailer.end(MavenMailer.java:72)
      1 frame
    7. Hudson Maven Embedder
      MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun
      1. hudson.maven.AbstractMavenBuilder.end(AbstractMavenBuilder.java:104)
      2. hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:859)
      2 frames
    8. Hudson
      Run.execute
      1. hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
      2. hudson.model.Run.execute(Run.java:1738)
      2 frames
    9. Hudson Maven Embedder
      MavenModuleSetBuild.run
      1. hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531)
      1 frame
    10. Hudson
      Executor.run
      1. hudson.model.ResourceController.execute(ResourceController.java:98)
      2. hudson.model.Executor.run(Executor.java:410)
      2 frames