Have you found out which Page it tries to deserialize? Did you try to
deserialize this exact page using another widget? The exception indicates
the internal object stream format is corrupted. So this would indeed mean it
would also occur if you try to to deserialize it using a "normal" widget.
Here is more info about the (de)serialization protocol
http://java.sun.com/j2se/1.5.0/docs/guide/serialization/spec/protocol.html#8101

I could be way of here so please correct me if I am wrong: I don't know the
Wicket internals exactly, but I noticed that the DiskPageStore uses a pool
of FileChannels to access the files and if I understand the code correctly
it allows the file to be opened for read and write the same time. See
FilePoonChannel.newFileChannel where the channel is opened in "rw" mode. So
maybe it could be a timing issue and  you are trying to deserialize a Page
that is still in the process of being serialized?

Lars



On Tue, Mar 18, 2008 at 2:30 AM, David Leangen <[EMAIL PROTECTED]> wrote:

>
> It seems to me that if there was a problem with Serialization, then
> normal pages would not work, right?
>
> So, does anybody have an idea why my pages generally work, but I get a
> StreamCorruptedException only when using the autocomplete component?
>
> The stack trace and also stepping through the code in detail are not
> giving me any good hints yet...
>
>
> Thanks!
> Dave
>
>
>
>
> On Mon, 2008-03-17 at 13:38 +0900, David Leangen wrote:
> > Can anybody suggest how I can try to resolve my
> > StreamCorruptedException?
> >
> > I have an autocomplete text field. When I hit the back button and modify
> > the text, I get the said Exception.
> >
> > I've tried stepping through the code, but the error is not obvious at
> > all.
> >
> > The error only happens with the autocomplete widget (i.e. when I modify
> > the text in the related text box). Nothing else (different query or use
> > of controls or links) triggers this Exception.
> >
> >
> > Thanks!
> > Dave
> >
> >
> >
> >
> > java.lang.RuntimeException: Could not deserialize object using
> > `org.apache.wicket.util.io.IObjectStreamFactory
> > $DefaultObjectStreamFactory` object factory
> >       at
> > org.apache.wicket.util.lang.Objects.byteArrayToObject(Objects.java:406)
> >       at
> >
> org.apache.wicket.protocol.http.pagestore.AbstractPageStore.deserializePage
> (AbstractPageStore.java:228)
> >       at
> > org.apache.wicket.protocol.http.pagestore.DiskPageStore.getPage(
> DiskPageStore.java:702)
> >       at org.apache.wicket.protocol.http.SecondLevelCacheSessionStore
> > $SecondLevelCachePageMap.get(SecondLevelCacheSessionStore.java:311)
> >       at org.apache.wicket.Session.getPage(Session.java:745)
> >       at
> >
> org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage
> (AbstractRequestCycleProcessor.java:443)
> >       at
> > org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(
> WebRequestCycleProcessor.java:139)
> >       at org.apache.wicket.RequestCycle.step(RequestCycle.java:1224)
> >       at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1316)
> >       at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
> >       at
> > org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java
> :354)
> >       at
> > org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java
> :121)
> >       at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
> >       at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
> >       at
> > org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
> >       at
> > org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:367)
> >       at
> > org.ops4j.pax.web.service.internal.HttpServiceHandler.handle(
> HttpServiceHandler.java:66)
> >       at
> > org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
> >       at
> > org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
> >       at
> > org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
> >       at org.mortbay.jetty.Server.handle(Server.java:285)
> >       at
> > org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:502)
> >       at org.mortbay.jetty.HttpConnection
> > $RequestHandler.headerComplete(HttpConnection.java:821)
> >       at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:513)
> >       at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java
> :208)
> >       at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java
> :378)
> >       at org.mortbay.jetty.bio.SocketConnector
> > $Connection.run(SocketConnector.java:226)
> >       at org.mortbay.thread.BoundedThreadPool
> > $PoolThread.run(BoundedThreadPool.java:442)
> >
> >
> > Caused by: java.io.StreamCorruptedException
> >       at java.io.ObjectInputStream.readObject0(ObjectInputStream.java
> :1332)
> >       at
> > java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
> >       at
> > java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)
> >       at
> > java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java
> :1719)
> >       at java.io.ObjectInputStream.readObject0(ObjectInputStream.java
> :1305)
> >       at java.io.ObjectInputStream.readObject(ObjectInputStream.java
> :348)
> >       at
> > org.apache.wicket.util.lang.Objects.byteArrayToObject(Objects.java:392)
> >       ... 27 more
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to