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

ProjectMatrixAuthorizationStrategy: Invalidated config.xml

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • None
    • Platform: All, OS: Linux

      => Manage Hudson
      => Configure System
      => Access Control (LDAP-Config !!!)
      => Authorization
      => Check: Project-based Matrix Authorization Strategy
      => User/group to add: "m500488"
      => Klick "add"
      => Configure Matrix: Check all permissions fpr m500488
      => Tomcat: Reload Hudson-Webapplication
      => Reenter Hudson-Webapplication
      => The following Exception occurs:

      hudson.util.IOException2: Unable to read /usr/share/tomcat5/.hudson/config.xml
      at hudson.XmlFile.unmarshal(XmlFile.java:152)
      at hudson.model.Hudson.load(Hudson.java:1967)
      at hudson.model.Hudson.(Hudson.java:560)
      at hudson.WebAppMain$2.run(WebAppMain.java:191)
      Caused by: com.thoughtworks.xstream.converters.ConversionException: Failed to
      parse 'hudson.model.Item.Release:m500488' — no such permission : Failed to
      parse 'hudson.model.Item.Release:m500488' — no such permission
      ---- Debugging information ----
      message : Failed to parse 'hudson.model.Item.Release:m500488' — no
      such permission
      cause-exception : java.lang.IllegalArgumentException
      cause-message : Failed to parse 'hudson.model.Item.Release:m500488' — no
      such permission
      class : hudson.model.Hudson
      required-type : hudson.security.ProjectMatrixAuthorizationStrategy
      path : /hudson/authorizationStrategy/permission[2]
      line number : 9
      -------------------------------
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:89)
      at
      com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63)
      at
      com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76)
      at
      com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:60)
      at
      hudson.util.RobustReflectionConverter.unmarshallField(RobustReflectionConverter.java:262)
      at
      hudson.util.RobustReflectionConverter.doUnmarshal(RobustReflectionConverter.java:222)
      at
      hudson.util.RobustReflectionConverter.unmarshal(RobustReflectionConverter.java:173)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82)
      at
      com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63)
      at
      com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76)
      at
      com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:60)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:137)
      at
      com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:33)
      at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:923)
      at hudson.util.XStream2.unmarshal(XStream2.java:67)
      at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:909)
      at hudson.XmlFile.unmarshal(XmlFile.java:148)
      ... 3 more
      Caused by: java.lang.IllegalArgumentException: Failed to parse
      'hudson.model.Item.Release:m500488' — no such permission
      at
      hudson.security.GlobalMatrixAuthorizationStrategy.add(GlobalMatrixAuthorizationStrategy.java:101)
      at
      hudson.security.GlobalMatrixAuthorizationStrategy.access$200(GlobalMatrixAuthorizationStrategy.java:65)
      at
      hudson.security.GlobalMatrixAuthorizationStrategy$ConverterImpl.unmarshal(GlobalMatrixAuthorizationStrategy.java:218)
      at
      hudson.security.ProjectMatrixAuthorizationStrategy$ConverterImpl.unmarshal(ProjectMatrixAuthorizationStrategy.java:84)
      at hudson.util.XStream2$AssociatedConverterImpl.unmarshal(XStream2.java:151)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82)
      ... 19 more

          [JENKINS-4573] ProjectMatrixAuthorizationStrategy: Invalidated config.xml

          Alan Harder added a comment -
              • Issue 4574 has been marked as a duplicate of this issue. ***

          Alan Harder added a comment - Issue 4574 has been marked as a duplicate of this issue. ***

          Alan Harder added a comment -

          Do you have m2release plugin installed?

          Alan Harder added a comment - Do you have m2release plugin installed?

          Alan Harder added a comment -

          I'm only able to reproduce this by granting someone Release permission, then
          going to Manage Plugins and disabling the Maven Release plugin, then restarting
          Hudson. Could that be what you did?

          Alan Harder added a comment - I'm only able to reproduce this by granting someone Release permission, then going to Manage Plugins and disabling the Maven Release plugin, then restarting Hudson. Could that be what you did?

          James Nord added a comment -

          Which version of M2Release was this?

          kohsuke fixed something very similar in 0.3.3
          see issue 4172.

          Is there any cleanup possible when a plugin is disabled?

          James Nord added a comment - Which version of M2Release was this? kohsuke fixed something very similar in 0.3.3 see issue 4172. Is there any cleanup possible when a plugin is disabled?

          Alan Harder added a comment -

          I suspect chrisabit is using an older m2release version, so this issue is a
          duplicate of #4172 (thx teilo for that pointer).
          However, really Hudson core should handle the case where m2release is disabled
          but permissions still exist in Hudson or job config. I'm making this change, so
          unrecognized permissions are now handled like other unrecognized items in XML
          (builders, publishers, etc).. write a log message and ignore them.

          Alan Harder added a comment - I suspect chrisabit is using an older m2release version, so this issue is a duplicate of #4172 (thx teilo for that pointer). However, really Hudson core should handle the case where m2release is disabled but permissions still exist in Hudson or job config. I'm making this change, so unrecognized permissions are now handled like other unrecognized items in XML (builders, publishers, etc).. write a log message and ignore them.

          Code changed in hudson
          User: : mindless
          Path:
          trunk/hudson/main/core/src/main/java/hudson/security/AuthorizationMatrixProperty.java
          trunk/hudson/main/core/src/main/java/hudson/security/GlobalMatrixAuthorizationStrategy.java
          trunk/www/changelog.html
          http://fisheye4.cenqua.com/changelog/hudson/?cs=23637
          Log:
          [FIXED JENKINS-4573] Write log message and ignore unrecognized permissions when loading XML,
          so these behave the same as other unknown fields (builders, publishers, etc).
          Also changed context.convertAnother() calls to simpler reader.getValue()/writer.setValue()

          SCM/JIRA link daemon added a comment - Code changed in hudson User: : mindless Path: trunk/hudson/main/core/src/main/java/hudson/security/AuthorizationMatrixProperty.java trunk/hudson/main/core/src/main/java/hudson/security/GlobalMatrixAuthorizationStrategy.java trunk/www/changelog.html http://fisheye4.cenqua.com/changelog/hudson/?cs=23637 Log: [FIXED JENKINS-4573] Write log message and ignore unrecognized permissions when loading XML, so these behave the same as other unknown fields (builders, publishers, etc). Also changed context.convertAnother() calls to simpler reader.getValue()/writer.setValue()

            mindless Alan Harder
            chrisabit chrisabit
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: