Generally unexplained class issues like this are because the same class gets loaded a second time from a different class loader. I once had it throwing a ClassCastException that ClassA != ClassA. Hard to track down, though.
-- Jeremy Thomerson http://www.wickettraining.com On Fri, Jul 3, 2009 at 4:27 PM, bgooren<[email protected]> wrote: > > I got the same error today, seems totally random. > > The only possible explanation I have is that maybe the subclass (LoginPage$1 > in your case) stores a PageHolder class instead of the actual page > (LoginPage) when serialized, and when LoginPage$1 is deserialized, the > PageHolder retrieves/points to a different Page. > > I was just as baffled as you since in my case the two classes were totally > different, like in your case (com.application.MainPage vs > wicket.quickstart.LoginPage). > In my case it's two pages from the same application, but they are > functionally separate and never interact. > > In my case I made the inner class that caused the problem a static inner > class. Since I have been unable to reproduce the problem I cannot confirm if > this resolves the problem. > > Can you share what kind of class LoginPage$1 is? (it's the first anonymous > inner class in LoginPage) Is it a class which extends IModel? > > Also, you someone from the Wicket team confirm if my explanation above is > possible at all (PageHolder retrieving a different class when > deserializing)? > > Bas > > > MartinM wrote: >> >> Anybody know what is this situation? Wicket 1.4-rc4 >> >> From production: >> >> 2009-05-18 16:32:44,316 19598423 [btpool0-112] ERROR RequestCycle - >> cannot assign instance of com.application.MainPage to field >> wicket.quickstart.LoginPage$1.this$0 of type >> wicket.quickstart.LoginPage in instance of >> wicket.quickstart.LoginPage$1 >> java.lang.ClassCastException: cannot assign instance of >> com.application.MainPage to field wicket.quickstart.LoginPage$1.this$0 >> of type wicket.quickstart.LoginPage in instance of >> wicket.quickstart.LoginPage$1 >> at >> java.io.ObjectStreamClass$FieldReflector.setObjFieldValues(ObjectStreamClass.java:2032) >> at >> java.io.ObjectStreamClass.setObjFieldValues(ObjectStreamClass.java:1212) >> >> .. etc ... >> > > -- > View this message in context: > http://www.nabble.com/Anybody-know-what-is-this-situation--tp23597800p24329006.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > 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]
