You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by David Leangen <wi...@leangen.net> on 2008/03/17 05:38:39 UTC
Finding the cause of an Exception
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: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: StreamCorruptedException when using autocomplete
Posted by lars vonk <la...@gmail.com>.
Hi,
I think in that case (deserializing with a changed class) an
InvalidClassException is thrown. See
http://java.sun.com/j2se/1.5.0/docs/api/java/io/ObjectInputStream.html#readObject()and
http://java.sun.com/j2se/1.5.0/docs/api/java/io/InvalidClassException.html
According to the docs the StreamCorruptedExeption means that the header of
the object stream is inconsistent, so I think it can't even start with
deserializing the class. The exception is thrown by
http://java.sun.com/j2se/1.5.0/docs/api/java/io/ObjectInputStream.html#readStreamHeader()
.
Lars
On Tue, Mar 18, 2008 at 8:44 AM, Igor Vaynberg <ig...@gmail.com>
wrote:
> are you using a class reloading mechanism of any sort? this error
> would make sense if wicket saved a page to store, you changed the
> class def and wicket tried to deserialize an instance of that changed
> class....
>
> -igor
>
>
> On Tue, Mar 18, 2008 at 12:42 AM, lars vonk <la...@gmail.com> wrote:
> > 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 <wi...@leangen.net>
> 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: users-unsubscribe@wicket.apache.org
> > > > For additional commands, e-mail: users-help@wicket.apache.org
> > > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > For additional commands, e-mail: users-help@wicket.apache.org
> > >
> > >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
Re: StreamCorruptedException when using autocomplete
Posted by David Leangen <wi...@leangen.net>.
Looks like this is the possible cause:
https://issues.apache.org/jira/browse/WICKET-1445
We're just checking up on that now.
On Fri, 2008-03-21 at 14:55 +0900, David Leangen wrote:
>
> Already tried that. Same problem. :-(
>
>
>
> On Thu, 2008-03-20 at 22:53 -0700, Igor Vaynberg wrote:
> > what if you make the search form class static?
> >
> > -igor
> >
> >
> > On Thu, Mar 20, 2008 at 10:31 PM, David Leangen <wi...@leangen.net> wrote:
> > >
> > > Thanks for the suggestions...
> > >
> > >
> > > > are you using a class reloading mechanism of any sort? this error
> > > > would make sense if wicket saved a page to store, you changed the
> > > > class def and wicket tried to deserialize an instance of that changed
> > > > class....
> > >
> > > No, none.
> > >
> > > I took out all the widgets from the form, and the error still occurs, so
> > > I guess it's not the autocomplete after all. But it still makes no sense
> > > to me.
> > >
> > > Well, I don't know what to say. This is all I'm doing, which I've done
> > > many times before.
> > >
> > >
> > > public class MyPanel
> > > extends Panel
> > > {
> > > private static final long serialVersionUID = 1L;
> > >
> > > public TermOverviewPanel(
> > > final String id,
> > > final IModel model,
> > > final PageParameters pageParameters )
> > > {
> > > super( id, model );
> > > add( new SearchForm( "form", model ) );
> > > }
> > >
> > > public class SearchForm
> > > extends Form
> > > {
> > > private static final long serialVersionUID = 1L;
> > >
> > > public SearchForm(
> > > final String id,
> > > final IModel model )
> > > {
> > > super( id );
> > > }
> > > }
> > > }
> > >
> > > If I remove the form from this panel, all is well (even if I add
> > > different widgets). This leads me to believe that the page is ok.
> > >
> > > If I add a form to the parent page, I don't get this error. I guess that
> > > would mean that the problem must be in the panel, but there seems to be
> > > nothing in this simple panel that should cause this type of error.
> > >
> > >
> > > I don't get it...
> > >
> > >
> > >
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > For additional commands, e-mail: users-help@wicket.apache.org
> > >
> > >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: StreamCorruptedException when using autocomplete
Posted by David Leangen <wi...@leangen.net>.
Already tried that. Same problem. :-(
On Thu, 2008-03-20 at 22:53 -0700, Igor Vaynberg wrote:
> what if you make the search form class static?
>
> -igor
>
>
> On Thu, Mar 20, 2008 at 10:31 PM, David Leangen <wi...@leangen.net> wrote:
> >
> > Thanks for the suggestions...
> >
> >
> > > are you using a class reloading mechanism of any sort? this error
> > > would make sense if wicket saved a page to store, you changed the
> > > class def and wicket tried to deserialize an instance of that changed
> > > class....
> >
> > No, none.
> >
> > I took out all the widgets from the form, and the error still occurs, so
> > I guess it's not the autocomplete after all. But it still makes no sense
> > to me.
> >
> > Well, I don't know what to say. This is all I'm doing, which I've done
> > many times before.
> >
> >
> > public class MyPanel
> > extends Panel
> > {
> > private static final long serialVersionUID = 1L;
> >
> > public TermOverviewPanel(
> > final String id,
> > final IModel model,
> > final PageParameters pageParameters )
> > {
> > super( id, model );
> > add( new SearchForm( "form", model ) );
> > }
> >
> > public class SearchForm
> > extends Form
> > {
> > private static final long serialVersionUID = 1L;
> >
> > public SearchForm(
> > final String id,
> > final IModel model )
> > {
> > super( id );
> > }
> > }
> > }
> >
> > If I remove the form from this panel, all is well (even if I add
> > different widgets). This leads me to believe that the page is ok.
> >
> > If I add a form to the parent page, I don't get this error. I guess that
> > would mean that the problem must be in the panel, but there seems to be
> > nothing in this simple panel that should cause this type of error.
> >
> >
> > I don't get it...
> >
> >
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: StreamCorruptedException when using autocomplete
Posted by Igor Vaynberg <ig...@gmail.com>.
what if you make the search form class static?
-igor
On Thu, Mar 20, 2008 at 10:31 PM, David Leangen <wi...@leangen.net> wrote:
>
> Thanks for the suggestions...
>
>
> > are you using a class reloading mechanism of any sort? this error
> > would make sense if wicket saved a page to store, you changed the
> > class def and wicket tried to deserialize an instance of that changed
> > class....
>
> No, none.
>
> I took out all the widgets from the form, and the error still occurs, so
> I guess it's not the autocomplete after all. But it still makes no sense
> to me.
>
> Well, I don't know what to say. This is all I'm doing, which I've done
> many times before.
>
>
> public class MyPanel
> extends Panel
> {
> private static final long serialVersionUID = 1L;
>
> public TermOverviewPanel(
> final String id,
> final IModel model,
> final PageParameters pageParameters )
> {
> super( id, model );
> add( new SearchForm( "form", model ) );
> }
>
> public class SearchForm
> extends Form
> {
> private static final long serialVersionUID = 1L;
>
> public SearchForm(
> final String id,
> final IModel model )
> {
> super( id );
> }
> }
> }
>
> If I remove the form from this panel, all is well (even if I add
> different widgets). This leads me to believe that the page is ok.
>
> If I add a form to the parent page, I don't get this error. I guess that
> would mean that the problem must be in the panel, but there seems to be
> nothing in this simple panel that should cause this type of error.
>
>
> I don't get it...
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: StreamCorruptedException when using autocomplete
Posted by David Leangen <wi...@leangen.net>.
Thanks for the suggestions...
> are you using a class reloading mechanism of any sort? this error
> would make sense if wicket saved a page to store, you changed the
> class def and wicket tried to deserialize an instance of that changed
> class....
No, none.
I took out all the widgets from the form, and the error still occurs, so
I guess it's not the autocomplete after all. But it still makes no sense
to me.
Well, I don't know what to say. This is all I'm doing, which I've done
many times before.
public class MyPanel
extends Panel
{
private static final long serialVersionUID = 1L;
public TermOverviewPanel(
final String id,
final IModel model,
final PageParameters pageParameters )
{
super( id, model );
add( new SearchForm( "form", model ) );
}
public class SearchForm
extends Form
{
private static final long serialVersionUID = 1L;
public SearchForm(
final String id,
final IModel model )
{
super( id );
}
}
}
If I remove the form from this panel, all is well (even if I add
different widgets). This leads me to believe that the page is ok.
If I add a form to the parent page, I don't get this error. I guess that
would mean that the problem must be in the panel, but there seems to be
nothing in this simple panel that should cause this type of error.
I don't get it...
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: StreamCorruptedException when using autocomplete
Posted by Igor Vaynberg <ig...@gmail.com>.
are you using a class reloading mechanism of any sort? this error
would make sense if wicket saved a page to store, you changed the
class def and wicket tried to deserialize an instance of that changed
class....
-igor
On Tue, Mar 18, 2008 at 12:42 AM, lars vonk <la...@gmail.com> wrote:
> 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 <wi...@leangen.net> 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: users-unsubscribe@wicket.apache.org
> > > For additional commands, e-mail: users-help@wicket.apache.org
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: StreamCorruptedException when using autocomplete
Posted by lars vonk <la...@gmail.com>.
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 <wi...@leangen.net> 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: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
StreamCorruptedException when using autocomplete
Posted by David Leangen <wi...@leangen.net>.
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: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org