You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Tobias Haupt (Jira)" <ji...@apache.org> on 2020/01/17 12:56:00 UTC

[jira] [Commented] (WICKET-6702) AsynchronousPageStore with NotDetachedModelChecker - "Not detached model found" exception on several fast sequential Ajax calls

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

Tobias Haupt commented on WICKET-6702:
--------------------------------------

I'm also facing a related Problem while accessing a page that is currently serialized. It only appears when I trigger a big number of Ajax requests to the same page instance. I use the current version of wicket 8.7.0.

I put a debugger breakpoint into java.util.ArrayList.writeObject(ArrayList.java:766) and found out that the list, that is concurrently modified, is the children list of MarkupContainer. In my case the exception is triggered by a list (Repeater) that clears and rebuilds the contained elements.

Its hard to build a quickstart because it is a timing problem. In my case the serialized page is relatively big in terms of contained Components. It takes some time to serialize it.

{code:java}
org.apache.wicket.WicketRuntimeException: java.util.ConcurrentModificationException
 at org.apache.wicket.serialize.java.JavaSerializer$SerializationCheckerObjectOutputStream.writeObjectOverride(JavaSerializer.java:402) ~[wicket-core.j
ar:8.7.0]
 at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:344) ~[?:1.8.0_144]
 at org.apache.wicket.serialize.java.JavaSerializer.serialize(JavaSerializer.java:82) [wicket-core.jar:8.7.0]
 at org.apache.wicket.pageStore.AbstractPageStore.serializePage(AbstractPageStore.java:133) [wicket-core.jar:8.7.0]
 at org.apache.wicket.pageStore.DefaultPageStore.createSerializedPage(DefaultPageStore.java:281) [wicket-core.jar:8.7.0]
 at org.apache.wicket.pageStore.DefaultPageStore.storePage(DefaultPageStore.java:61) [wicket-core.jar:8.7.0]
 at org.apache.wicket.pageStore.AsynchronousPageStore$PageSavingRunnable.run(AsynchronousPageStore.java:208) [wicket-core.jar:8.7.0]
 at java.lang.Thread.run(Thread.java:748) [?:1.8.0_144]
Caused by: java.util.ConcurrentModificationException
 at java.util.ArrayList.writeObject(ArrayList.java:766) ~[?:1.8.0_144]
 at sun.reflect.GeneratedMethodAccessor183.invoke(Unknown Source) ~[?:?]
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_144]
 at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_144]
 at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:1028) ~[?:1.8.0_144]
 at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1496) ~[?:1.8.0_144]
 at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432) ~[?:1.8.0_144]
 at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178) ~[?:1.8.0_144]
 at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548) ~[?:1.8.0_144]
 at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509) ~[?:1.8.0_144]
 at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432) ~[?:1.8.0_144]
 at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178) ~[?:1.8.0_144]
 at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548) ~[?:1.8.0_144]
 at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509) ~[?:1.8.0_144]
 at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432) ~[?:1.8.0_144]
 at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178) ~[?:1.8.0_144]
 at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548) ~[?:1.8.0_144]
 at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509) ~[?:1.8.0_144]
 at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432) ~[?:1.8.0_144]
 at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178) ~[?:1.8.0_144]
 at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348) ~[?:1.8.0_144]
 at java.util.ArrayList.writeObject(ArrayList.java:762) ~[?:1.8.0_144]
 at sun.reflect.GeneratedMethodAccessor183.invoke(Unknown Source) ~[?:?]

[... ommited]{code}


> AsynchronousPageStore with NotDetachedModelChecker - "Not detached model found" exception on several fast sequential Ajax calls
> -------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-6702
>                 URL: https://issues.apache.org/jira/browse/WICKET-6702
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-core
>    Affects Versions: 8.5.0
>            Reporter: Sergei Tkachuk
>            Priority: Major
>         Attachments: QuickStart.zip
>
>
> Preconditions: Application uses AsynchronousPageStore (as it is by default).
> When there are several fast sequential Ajax calls to a component, then a component's LoadableDetachableModel gets attached and detached several times before real async serialization takes place. And at times the serialization is initiated when the model has been already attached once again by a subsequent Ajax call, and not detached yet as the request is still in progress. This causes NotDetachedModelChecker() to throw "Not detached model found!" exception
> Disabling async serialization fixes the problem.
> A test-case and a log attached.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)