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

Remote API /computer/api/xml fails when the offlinecause is an EOFException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Incomplete
    • Icon: Major Major
    • core
    • None

      [17:33] <@mindless> roxspring: do you think the EOFException was contained within the OfflineCause ?
      [17:36] <@mindless> roxspring: yeah, I see OfflineCause.ChannelTermination.cause is @Exported
      [17:36] <@mindless> kohsuke: is @Exported on Exception bad? it's not an @ExportedBean ..
      [17:36] <@kohsuke> I don't think it's bad, but if the bean itself isn't exported, it will have no effect.
      [17:37] <@mindless> kohsuke: http://hudson.pastebin.com/GQsLWw68
      [17:37] <@mindless> I could move @Exported to getShortDescription instead.. returns cause.toString()
      [17:38] <@kohsuke> I think exposing structuerd data is a good thing
      [17:38] <@kohsuke> So the cause field is an Exception type?
      [17:38] <@mindless> yes
      [17:39] <@kohsuke> Maybe requiring the class to be marked was not a good idea
      [17:40] <@kohsuke> perhaps we should have just exported whatever properties annotated with @Exported
      [17:40] <@mindless> it is annotated with @Exported
      [17:40] <@mindless> @Exported public final Exception cause;
      [17:40] <@kohsuke> but not the value referenced by the cause field.
      [17:40] <@mindless> you've lost me
      [17:41] <@kohsuke> The error is saying that the actual value, an instance of EOFException, is not annotated with @ExportedBean
      [17:41] <@kohsuke> but if the semantics is such that no classes need to be annotated by @ExportedBean, and if we just write out whatever @Exported properties,
      [17:41] <@kohsuke> we'd just get <cause /> without an error
      [17:41] <@mindless> oh
      [17:41] <@kohsuke> because EOFException doesn't have any @Exported field
      [17:42] <@kohsuke> Or I suppose I could treat a value without @ExportedBean as if it were null?
      [17:42] <@kohsuke> instead of a hard error
      [17:42] <@kohsuke> or it could be a switch like @Exported(ignoreUnexportable=true)
      [17:43] <@kohsuke> Can you file a ticket for this?
      [17:43] <@mindless> roxspring: ^

      java.lang.reflect.InvocationTargetException
      	at sun.reflect.GeneratedMethodAccessor222.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      	at java.lang.reflect.Method.invoke(Unknown Source)
      	at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:169)
      	at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:101)
      	at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:54)
      	at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:75)
      	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:30)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:519)
      	at org.kohsuke.stapler.MetaClass$4.doDispatch(MetaClass.java:145)
      	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:30)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:519)
      	at org.kohsuke.stapler.MetaClass$4.doDispatch(MetaClass.java:145)
      	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:30)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:519)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:435)
      	at org.kohsuke.stapler.Stapler.service(Stapler.java:123)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:45)
      	at winstone.ServletConfiguration.execute(ServletConfiguration.java:249)
      	at winstone.RequestDispatcher.forward(RequestDispatcher.java:335)
      	at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:378)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:94)
      	at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:86)
      	at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
      	at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
      	at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:47)
      	at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
      	at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
      	at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:166)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:173)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
      	at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:66)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
      	at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
      	at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
      	at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
      	at winstone.RequestDispatcher.forward(RequestDispatcher.java:333)
      	at winstone.RequestHandlerThread.processRequest(RequestHandlerThread.java:244)
      	at winstone.RequestHandlerThread.run(RequestHandlerThread.java:150)
      	at java.lang.Thread.run(Unknown Source)
      Caused by: org.kohsuke.stapler.export.NotExportableException: class
      java.io.EOFException doesn't have @ExportedBean
      	at org.kohsuke.stapler.export.Model.<init>(Model.java:46)
      	at org.kohsuke.stapler.export.ModelBuilder.get(ModelBuilder.java:25)
      	at org.kohsuke.stapler.export.Property.writeValue(Property.java:181)
      	at org.kohsuke.stapler.export.Property.writeValue(Property.java:106)
      	at org.kohsuke.stapler.export.Property.writeTo(Property.java:83)
      	at org.kohsuke.stapler.export.Model.writeNestedObjectTo(Model.java:156)
      	at org.kohsuke.stapler.export.Property.writeValue(Property.java:188)
      	at org.kohsuke.stapler.export.Property.writeValue(Property.java:106)
      	at org.kohsuke.stapler.export.Property.writeTo(Property.java:83)
      	at org.kohsuke.stapler.export.Model.writeNestedObjectTo(Model.java:156)
      	at org.kohsuke.stapler.export.Model.writeNestedObjectTo(Model.java:153)
      	at org.kohsuke.stapler.export.Property.writeValue(Property.java:188)
      	at org.kohsuke.stapler.export.Property.writeValue(Property.java:138)
      	at org.kohsuke.stapler.export.Property.writeValue(Property.java:106)
      	at org.kohsuke.stapler.export.Property.writeTo(Property.java:83)
      	at org.kohsuke.stapler.export.Model.writeNestedObjectTo(Model.java:156)
      	at org.kohsuke.stapler.export.Model.writeTo(Model.java:129)
      	at org.kohsuke.stapler.export.Model.writeTo(Model.java:148)
      	at org.kohsuke.stapler.ResponseImpl.serveExposedBean(ResponseImpl.java:153)
      	at hudson.model.Api.doXml(Api.java:87)
      	... 52 more

            Unassigned Unassigned
            roxspring roxspring
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: