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

api/xml from user throws 'class hudson.security.HudsonPrivateSecurityRealm$Details doesn't have @ExposedBean'

XMLWordPrintable

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

      I have several users defined in my Hudson 1.90. A lot of users work, but this
      url doesn't. See stacktrace below. I don't know why this user has this and other
      users don't.
      http://linux5.base.nl:8080/hudson/user/sanderkastelein/api/xml

      This url does work.
      http://linux5.base.nl:8080/hudson/user/sanderkastelein/

      I see in the config on disk, that this user has the next node in the config.xml.
      <hudson.security.HudsonPrivateSecurityRealm_-Details>
      <password></password>
      </hudson.security.HudsonPrivateSecurityRealm_-Details>

      My user for example doesn't have it. Is it still possible for me to automaticly
      query users via the api/xml url? Or is this a bug?
      Is it also possible to create a better error than an exception?

      HTTP Status 500 -

      type Exception report

      message

      description The server encountered an internal error () that prevented it from
      fulfilling this request.

      exception

      javax.servlet.ServletException: class
      hudson.security.HudsonPrivateSecurityRealm$Details doesn't have @ExposedBean
      org.kohsuke.stapler.Stapler.invoke(Stapler.java:370)
      org.kohsuke.stapler.MetaClass$7.doDispatch(MetaClass.java:208)
      org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:30)
      org.kohsuke.stapler.Stapler.invoke(Stapler.java:361)
      org.kohsuke.stapler.MetaClass$9.doDispatch(MetaClass.java:240)
      org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:30)
      org.kohsuke.stapler.Stapler.invoke(Stapler.java:361)
      org.kohsuke.stapler.Stapler.invoke(Stapler.java:298)
      org.kohsuke.stapler.Stapler.service(Stapler.java:98)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      sun.reflect.GeneratedMethodAccessor51.invoke(Unknown Source)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      java.lang.reflect.Method.invoke(Method.java:597)
      org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
      java.security.AccessController.doPrivileged(Native Method)
      javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
      org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276)
      org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
      java.security.AccessController.doPrivileged(Native Method)
      hudson.security.HudsonFilter.doFilter(HudsonFilter.java:88)
      sun.reflect.GeneratedMethodAccessor52.invoke(Unknown Source)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      java.lang.reflect.Method.invoke(Method.java:597)
      org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
      java.security.AccessController.doPrivileged(Native Method)
      javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
      org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276)
      org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:218)

      root cause

      java.lang.IllegalArgumentException: class
      hudson.security.HudsonPrivateSecurityRealm$Details doesn't have @ExposedBean
      org.kohsuke.stapler.export.Model.<init>(Model.java:44)
      org.kohsuke.stapler.export.ModelBuilder.get(ModelBuilder.java:25)
      org.kohsuke.stapler.export.Property.writeValue(Property.java:155)
      org.kohsuke.stapler.export.Property.writeValue(Property.java:127)
      org.kohsuke.stapler.export.Property.writeTo(Property.java:81)
      org.kohsuke.stapler.export.Model.writeNestedObjectTo(Model.java:142)
      org.kohsuke.stapler.export.Model.writeTo(Model.java:133)
      org.kohsuke.stapler.ResponseImpl.serveExposedBean(ResponseImpl.java:91)
      hudson.model.Api.doXml(Api.java:61)
      sun.reflect.GeneratedMethodAccessor299.invoke(Unknown Source)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      java.lang.reflect.Method.invoke(Method.java:597)
      org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:103)
      org.kohsuke.stapler.Function.bindAndinvoke(Function.java:59)
      org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:63)
      org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:30)
      org.kohsuke.stapler.Stapler.invoke(Stapler.java:361)
      org.kohsuke.stapler.MetaClass$7.doDispatch(MetaClass.java:208)
      org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:30)
      org.kohsuke.stapler.Stapler.invoke(Stapler.java:361)
      org.kohsuke.stapler.MetaClass$9.doDispatch(MetaClass.java:240)
      org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:30)
      org.kohsuke.stapler.Stapler.invoke(Stapler.java:361)
      org.kohsuke.stapler.Stapler.invoke(Stapler.java:298)
      org.kohsuke.stapler.Stapler.service(Stapler.java:98)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      sun.reflect.GeneratedMethodAccessor51.invoke(Unknown Source)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      java.lang.reflect.Method.invoke(Method.java:597)
      org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
      java.security.AccessController.doPrivileged(Native Method)
      javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
      org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276)
      org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
      java.security.AccessController.doPrivileged(Native Method)
      hudson.security.HudsonFilter.doFilter(HudsonFilter.java:88)
      sun.reflect.GeneratedMethodAccessor52.invoke(Unknown Source)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      java.lang.reflect.Method.invoke(Method.java:597)
      org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
      java.security.AccessController.doPrivileged(Native Method)
      javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
      org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276)
      org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:218)

      note The full stack trace of the root cause is available in the Apache
      Tomcat/5.5.26 logs.
      Apache Tomcat/5.5.26

            Unassigned Unassigned
            javakoe Ronald Klop
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: