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

UsernamePasswordAuthenticationToken cannot be cast to AssemblaAuthenticationToken

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • assembla-auth-plugin, core
    • Jenkins 2.5 (installed via apt-get upgrade), master only
      Also: Jenkins 2.7 (installed via apt-get install)

      Assembla Auth Plugin 1.06
      Credentials Plugin 1.27

      Ubuntu 14.04.4 LTS (GNU/Linux 3.13.0-74-generic x86_64)

      Jenkins Authorization is integrated with Assembla's auth. Security Realm uses Assembla Auth Plugin.

      Jobs finish with FAILURE status with the following error message (always the last item in the console log) :

      FATAL: org.acegisecurity.providers.UsernamePasswordAuthenticationToken cannot be cast to com.assembla.jenkinsci.plugin.AssemblaAuthenticationToken
      java.lang.ClassCastException: org.acegisecurity.providers.UsernamePasswordAuthenticationToken cannot be cast to com.assembla.jenkinsci.plugin.AssemblaAuthenticationToken
      	at com.assembla.jenkinsci.plugin.AssemblaSecurityRealm.loadUserByUsername(AssemblaSecurityRealm.java:333)
      	at hudson.model.User$UserIDCanonicalIdResolver.resolveCanonicalId(User.java:1050)
      	at hudson.model.User.get(User.java:395)
      	at hudson.model.User.get(User.java:364)
      	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.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:669)
      	at hudson.model.Run.execute(Run.java:1766)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      	at hudson.model.ResourceController.execute(ResourceController.java:98)
      	at hudson.model.Executor.run(Executor.java:410)
      Finished: FAILURE
      

      This behaviour didn't occur in the previous Jenkins version 1.6.x

          [JENKINS-34948] UsernamePasswordAuthenticationToken cannot be cast to AssemblaAuthenticationToken

          Still occurs in ver.2.6

          Jakub Czaplicki added a comment - Still occurs in ver.2.6

          Frédéric, I've assigned this ticket to you since your name was on the last assembla-auth ticket.

          Jakub Czaplicki added a comment - Frédéric, I've assigned this ticket to you since your name was on the last assembla-auth ticket.

          Reported the problem via https://helpdesk.assembla.com/customer/portal/emails/new on 2016-06-01

          Contacted the Assembla Open Source team via email on 2016-06-02 (contact details: https://www.assembla.com/spaces/assembla-oss/team )

          Link to src code: https://www.assembla.com/spaces/assembla-oss/git/source

          Jakub Czaplicki added a comment - Reported the problem via https://helpdesk.assembla.com/customer/portal/emails/new on 2016-06-01 Contacted the Assembla Open Source team via email on 2016-06-02 (contact details: https://www.assembla.com/spaces/assembla-oss/team ) Link to src code: https://www.assembla.com/spaces/assembla-oss/git/source

          Hi, I'm not the assembla maintainer.
          I was involved into JENKINS-19189 more because of scm-sync-configuration plugin than for assembla

          Frédéric Camblor added a comment - Hi, I'm not the assembla maintainer. I was involved into JENKINS-19189 more because of scm-sync-configuration plugin than for assembla

          That's what I suspected. I've reported the issue to Assembla (they maintain the plugin). They now have created an internal ticket to look into this issue.

          Jakub Czaplicki added a comment - That's what I suspected. I've reported the issue to Assembla (they maintain the plugin). They now have created an internal ticket to look into this issue.

          Hi jakub, thanks for reporting the issue, new release with a bugfix has been pushed to jenkins repository. New plugin version will be available in the update center in about 8 hours.

          Also, you can download it here and install manually: http://maven.jenkins-ci.org:8081/content/repositories/releases/org/jenkins-ci/plugins/assembla-auth/1.09/assembla-auth-1.09.hpi

          Pavel Dotsulenko added a comment - Hi jakub , thanks for reporting the issue, new release with a bugfix has been pushed to jenkins repository. New plugin version will be available in the update center in about 8 hours. Also, you can download it here and install manually: http://maven.jenkins-ci.org:8081/content/repositories/releases/org/jenkins-ci/plugins/assembla-auth/1.09/assembla-auth-1.09.hpi

          Hi paveld, Many thanks for quick fix! I'll install it as soon as it's available.

          Earlier today I updated two other plugins that had a fresh new versions:

          At the same time I installed https://wiki.jenkins-ci.org/display/JENKINS/Log+Parser+Plugin I wanted to use it as a workaround.

          Now. It seems that one of the updates.. fixed the problem. The changelog in the Pipeline Multibranch Plugin says "Internal refactoring to expose multibranch functionality to other plugins" - perhaps this is what was causing the problem in the first place ?

          Anyhow, I am glad you've got a fix for this on your side.

          Jakub Czaplicki added a comment - Hi paveld , Many thanks for quick fix! I'll install it as soon as it's available. Earlier today I updated two other plugins that had a fresh new versions: https://wiki.jenkins-ci.org/display/JENKINS/Pipeline+Multibranch+Plugin https://wiki.jenkins-ci.org/display/JENKINS/Branch+API+Plugin At the same time I installed https://wiki.jenkins-ci.org/display/JENKINS/Log+Parser+Plugin I wanted to use it as a workaround. Now. It seems that one of the updates.. fixed the problem. The changelog in the Pipeline Multibranch Plugin says "Internal refactoring to expose multibranch functionality to other plugins" - perhaps this is what was causing the problem in the first place ? Anyhow, I am glad you've got a fix for this on your side.

          Updated the plugin to ver.1.09, rerun my Jenkins jobs a couple of times. All works as expected.
          The issue indeed has been fixed.

          I've updated https://wiki.jenkins-ci.org/display/JENKINS/Assembla+Auth+Plugin with the ver.no.

          Jakub Czaplicki added a comment - Updated the plugin to ver.1.09, rerun my Jenkins jobs a couple of times. All works as expected. The issue indeed has been fixed. I've updated https://wiki.jenkins-ci.org/display/JENKINS/Assembla+Auth+Plugin with the ver.no.

            paveld Pavel Dotsulenko
            jakub Jakub Czaplicki
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: