[ 
https://issues.apache.org/jira/browse/WICKET-278?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12472354
 ] 

Alastair Maw commented on WICKET-278:
-------------------------------------

If I put a hack in Objects.sizeof to call objectToByteArray() when it hits a 
NotSerializableException I get one of these:

17:17:58.175 ERROR Error serializing object class 
wicket.markup.html.basic.Label [object=[Component id = pageTitleForHead, page = 
<No Page>, path = pageTitleForHead.Label]] - 
org.apache.commons.logging.impl.SLF4JLog.error(SLF4JLog.java:171)
wicket.util.io.SerializableChecker$WicketNotSerializableException: Unable to 
serialize class: wicket.response.StringResponse
Field hierarchy is:
  pageTitleForHead [class=wicket.markup.html.basic.Label, path=pageTitleForHead]
    private wicket.model.IModel wicket.Component.model 
[class=wicket.model.PropertyModel]
      private java.lang.Object wicket.model.AbstractPropertyModel.nestedModel 
[class=com.foo.Page, path=1]
        private java.lang.Object wicket.MarkupContainer.children 
[class=[Lwicket.Component;]
          private java.util.List 
wicket.extensions.markup.html.tabs.TabbedPanel.tabs[write:1][write:4][write:6][write:8][10]
 [class=wicket.markup.html.internal.HtmlHeaderContainer, path=1:<auto>_header]
            private wicket.markup.html.IHeaderResponse 
wicket.markup.html.internal.HtmlHeaderContainer.headerResponse 
[class=wicket.markup.html.internal.HeaderResponse]
              private wicket.Response 
wicket.markup.html.internal.HeaderResponse.response 
[class=wicket.response.StringResponse] <----- field that is not serializable


I'm still not sure what's going on. :-(

> Error pages for HeaderContributor errors are broken
> ---------------------------------------------------
>
>                 Key: WICKET-278
>                 URL: https://issues.apache.org/jira/browse/WICKET-278
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 1.3
>            Reporter: Alastair Maw
>
> This manifests itself with lots of java.io.NotSerializableException: 
> wicket.response.StringResponse and errors like this:
> 08:58:09,083  WARN Objects:1287 - Size of failed of object: 
> wicket.markup.html.HeaderPartContainer
> Al says:
> The errors are caused by the Wicket exception page (which is why there  are a 
> million components - they're all the Labels for the various 
> components/traces/whatever).
> This is what I think goes wrong:
> HtmlHeaderContainer throws an exception while rendering, or something, such 
> that its onDetach() is never called on it. This causes the reference it has 
> to headerResponse to never be set to null. It therefore has a ref to a 
> HeaderResponse, which has a ref to the Response object itself.
> We need to fix it so that onDetach() is always called, I guess. Probably need 
> to work out where to put the try {} finally {}, essentially.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to