You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2015/11/19 12:58:11 UTC
[jira] [Commented] (WICKET-6040) DebugBar not serializable
exception
[ https://issues.apache.org/jira/browse/WICKET-6040?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15013412#comment-15013412 ]
ASF subversion and git services commented on WICKET-6040:
---------------------------------------------------------
Commit a377eabcc4a0bd09b1ea2b1abceb8506dee11603 in wicket's branch refs/heads/wicket-6.x from [~svenmeier]
[ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=a377eab ]
WICKET-6040 restore AjaxHtmlHeaderContainer to be static, so it can be serialized before AjaxRequest has finished
> DebugBar not serializable exception
> -----------------------------------
>
> Key: WICKET-6040
> URL: https://issues.apache.org/jira/browse/WICKET-6040
> Project: Wicket
> Issue Type: Bug
> Components: wicket-devutils
> Affects Versions: 6.21.0
> Environment: jdk 7, ubuntu
> Reporter: Elvis Ciocoiu
> Assignee: Sven Meier
> Fix For: 6.22.0
>
>
> After upgrading to 6.21.0 I encountered NotSerializableException when refreshing DebugBar in an ajax event. Martin Grigorov suspects this is related to https://github.com/apache/wicket/commit/562d43ccdd7f305f8ca641817f4b63a07ee8b6a6.
> To reproduce this:
> 1. start the application in development mode
> 2. override onEvent in Application to refresh the DebugBar
> public void onEvent(IEvent<?> event) {
> if(event.getPayload() instanceof AjaxRequestTarget) {
> AjaxRequestTarget target = (AjaxRequestTarget) event.getPayload();
> // if we are in development refresh the debugbar (if exists)
> if(getConfigurationType() == RuntimeConfigurationType.DEVELOPMENT) {
> Component debugBar = page.get("debugBar");
> if(debugBar != null) target.add(debugBar);
> }
> }
> From stacktrace it seems this is related to org.apache.wicket.ajax.AbstractAjaxResponse$AjaxHtmlHeaderContainer:
> Caused by: java.lang.RuntimeException: An error occurred while getting the model object for Component: [Component id = data, page = ro.emp.wicket.StandaloneHomePage, path = 2:debugBar:content:contributors:3:contrib:link:data.Label, isVisible = true, isVersioned = true, markup = [markup = jar:file:/home/fanfy/.m2/repository/org/apache/wicket/wicket-devutils/6.21.0/wicket-devutils-6.21.0.jar!/org/apache/wicket/devutils/debugbar/StandardDebugPanel.html
> <span wicket:id="data"></span>, index = 0, current = '<span wicket:id="data">' (line 0, column 0)]]
> at org.apache.wicket.Component.getDefaultModelObject(Component.java:1617) ~[wicket-core-6.21.0.jar:6.21.0]
> at org.apache.wicket.Component.getDefaultModelObjectAsString(Component.java:1640) ~[wicket-core-6.21.0.jar:6.21.0]
> at org.apache.wicket.markup.html.basic.Label.onComponentTagBody(Label.java:131) ~[wicket-core-6.21.0.jar:6.21.0]
> at org.apache.wicket.markup.html.panel.DefaultMarkupSourcingStrategy.onComponentTagBody(DefaultMarkupSourcingStrategy.java:71) ~[wicket-core-6.21.0.jar:6.21.0]
> at org.apache.wicket.Component.internalRenderComponent(Component.java:2536) ~[wicket-core-6.21.0.jar:6.21.0]
> ... 132 common frames omitted
> Caused by: org.apache.wicket.WicketRuntimeException: Internal error cloning object
> at org.apache.wicket.core.util.lang.WicketObjects.cloneObject(WicketObjects.java:361) ~[wicket-core-6.21.0.jar:6.21.0]
> at org.apache.wicket.core.util.lang.WicketObjects.sizeof(WicketObjects.java:425) ~[wicket-core-6.21.0.jar:6.21.0]
> at org.apache.wicket.devutils.debugbar.PageSizeDebugPanel$2.getObject(PageSizeDebugPanel.java:96) ~[wicket-devutils-6.21.0.jar:6.21.0]
> at org.apache.wicket.devutils.debugbar.PageSizeDebugPanel$2.getObject(PageSizeDebugPanel.java:89) ~[wicket-devutils-6.21.0.jar:6.21.0]
> at org.apache.wicket.Component.getDefaultModelObject(Component.java:1612) ~[wicket-core-6.21.0.jar:6.21.0]
> ... 136 common frames omitted
> Caused by: java.io.NotSerializableException: org.apache.wicket.ajax.AjaxRequestHandler$1
> - field (class "org.apache.wicket.ajax.AbstractAjaxResponse$AjaxHtmlHeaderContainer", name: "this$0", type: "class org.apache.wicket.ajax.AbstractAjaxResponse")
> - object (class "org.apache.wicket.ajax.AbstractAjaxResponse$AjaxHtmlHeaderContainer", [AjaxHtmlHeaderContainer [Component id = _header_]])
> - element of array (index: 9)
> - array (class "[Ljava.lang.Object;", size: 18)
> - field (class "org.apache.wicket.MarkupContainer$ChildList", name: "childs", type: "class [Ljava.lang.Object;")
> - object (class "org.apache.wicket.MarkupContainer$ChildList", [[Component id = applicationTitle], [FocusComponentFeedbackPanel [Component id = feedbackPanel]], [DebugBar [Component id = debugBar]], [StackComponentContainerImpl [Component id = contentContainer]], [GlobalMenuPanel [Component id = menu]], [Fragment [Component id = customHeader]], [Fragment [Component id = customFooter]], [WebMarkupContainer [Component id = localeContainer]], [WebMarkupContainer [Component id = userInformations]], [AjaxHtmlHeaderContainer [Component id = _header_]]])
> - field (class "org.apache.wicket.MarkupContainer", name: "children", type: "class java.lang.Object")
> - root object (class "ro.emp.wicket.StandaloneHomePage", [Page class = ro.emp.wicket.StandaloneHomePage, id = 2, render count = 3])
> at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1180) ~[na:1.7.0_80]
> at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1547) ~[na:1.7.0_80]
> at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1508) ~[na:1.7.0_80]
> at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1431) ~[na:1.7.0_80]
> at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1177) ~[na:1.7.0_80]
> at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1377) ~[na:1.7.0_80]
> at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1173) ~[na:1.7.0_80]
> at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1547) ~[na:1.7.0_80]
> at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1508) ~[na:1.7.0_80]
> at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1431) ~[na:1.7.0_80]
> at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1177) ~[na:1.7.0_80]
> at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1547) ~[na:1.7.0_80]
> at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1508) ~[na:1.7.0_80]
> at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1431) ~[na:1.7.0_80]
> at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1177) ~[na:1.7.0_80]
> at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:347) ~[na:1.7.0_80]
> at org.apache.wicket.core.util.lang.WicketObjects.cloneObject(WicketObjects.java:306) ~[wicket-core-6.21.0.jar:6.21.0]
> ... 140 common frames omitted
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)