Re: StreamCorruptedException when using autocomplete

2008-03-20 Thread David Leangen

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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: StreamCorruptedException when using autocomplete

2008-03-20 Thread Igor Vaynberg
what if you make the search form class static?

-igor


On Thu, Mar 20, 2008 at 10:31 PM, David Leangen [EMAIL PROTECTED] 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: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: StreamCorruptedException when using autocomplete

2008-03-20 Thread David Leangen


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 [EMAIL PROTECTED] 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: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: StreamCorruptedException when using autocomplete

2008-03-18 Thread lars vonk
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 

Re: StreamCorruptedException when using autocomplete

2008-03-18 Thread Igor Vaynberg
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 [EMAIL PROTECTED] 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 [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

StreamCorruptedException when using autocomplete

2008-03-17 Thread David Leangen

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]