Description
wicket complains that ValueMap$NullSafeKeyComparator is not serializable:
2070 ERROR [btpool0-19] org.apache.wicket.util.lang.Objects - Error serializing object class testapp.pages.ContactPage [object=[Page class = testapp.pages.ContactPage, id = 0, version = 0]]
org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException: Unable to serialize class: org.apache.wicket.util.value.ValueMap$NullSafeKeyComparator
Field hierarchy is:
0 [class=testapp.pages.ContactPage, path=0]
java.lang.Object org.apache.wicket.Component.data [class=[Lorg.apache.wicket.MetaDataEntry;]
java.lang.Object org.apache.wicket.Component.data[0] [class=org.apache.wicket.MetaDataEntry]
java.lang.Object org.apache.wicket.MetaDataEntry.object [class=org.apache.wicket.PageParameters]
private java.util.Comparator java.util.TreeMap.comparator [class=org.apache.wicket.util.value.ValueMap$NullSafeKeyComparator] <----- field that is not serializable
at org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:349)
at org.apache.wicket.util.io.SerializableChecker.checkFields(SerializableChecker.java:618)
at org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:541)
at org.apache.wicket.util.io.SerializableChecker.checkFields(SerializableChecker.java:618)
at org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:541)
at org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:395)
at org.apache.wicket.util.io.SerializableChecker.checkFields(SerializableChecker.java:618)
at org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:541)
at org.apache.wicket.util.io.SerializableChecker.writeObjectOverride(SerializableChecker.java:687)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:298)
at org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory$2.writeObjectOverride(IObjectStreamFactory.java:127)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:298)
at org.apache.wicket.util.lang.Objects.objectToByteArray(Objects.java:1100)
at org.apache.wicket.protocol.http.pagestore.AbstractPageStore.serializePage(AbstractPageStore.java:200)
at org.apache.wicket.protocol.http.pagestore.DiskPageStore.storePage(DiskPageStore.java:814)
at org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLevelCachePageMap.put(SecondLevelCacheSessionStore.java:327)
at org.apache.wicket.Session.requestDetached(Session.java:1391)
at org.apache.wicket.RequestCycle.detach(RequestCycle.java:1113)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1384)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:499)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:387)
at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:199)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:828)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)
Caused by: java.io.NotSerializableException: org.apache.wicket.util.value.ValueMap$NullSafeKeyComparator
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:391)
at java.util.TreeMap.writeObject(TreeMap.java:1466)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:917)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1339)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1251)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:391)
at org.apache.wicket.protocol.http.pagestore.AbstractPageStore$PageSerializer.serializePage(AbstractPageStore.java:319)
at org.apache.wicket.Page.writePageObject(Page.java:1335)
at org.apache.wicket.Component.writeObject(Component.java:4303)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:917)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1339)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
at org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory$2.writeObjectOverride(IObjectStreamFactory.java:119)
... 24 more