You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by JamesXWang <ja...@gmail.com> on 2012/12/18 05:06:55 UTC

Re: Error serializing object class com.mapp.LoginPage [object=[Page class = com.myapp.LoginPage, id = 0, render count = 1]]

Hi Martin,

Here is the exception stack trace from SerializableChecker - 

SEVERE: java.lang.NoSuchMethodException:
com.myapp.LoginPage.writeObject(java.io.ObjectOutputStream)
	at java.lang.Class.getDeclaredMethod(Class.java:1954)
	at
org.apache.wicket.core.util.io.SerializableChecker.internalCheck(SerializableChecker.java:505)
	at
org.apache.wicket.core.util.io.SerializableChecker.check(SerializableChecker.java:391)
	at
org.apache.wicket.core.util.io.SerializableChecker.writeObjectOverride(SerializableChecker.java:742)
	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:342)
	at
org.apache.wicket.serialize.java.JavaSerializer$CheckerObjectOutputStream.writeObjectOverride(JavaSerializer.java:258)
	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:342)
	at
org.apache.wicket.serialize.java.JavaSerializer.serialize(JavaSerializer.java:76)
	at
org.apache.wicket.pageStore.DefaultPageStore.serializePage(DefaultPageStore.java:376)
	at
org.apache.wicket.pageStore.DefaultPageStore.storePage(DefaultPageStore.java:150)
	at
org.apache.wicket.page.PageStoreManager$PersistentRequestAdapter.storeTouchedPages(PageStoreManager.java:383)
	at
org.apache.wicket.page.RequestAdapter.commitRequest(RequestAdapter.java:171)
	at
org.apache.wicket.page.AbstractPageManager.commitRequest(AbstractPageManager.java:98)
	at
org.apache.wicket.page.PageManagerDecorator.commitRequest(PageManagerDecorator.java:73)
	at
org.apache.wicket.page.PageAccessSynchronizer$2.commitRequest(PageAccessSynchronizer.java:281)
	at org.apache.wicket.Application$2.onDetach(Application.java:1628)
	at
org.apache.wicket.request.cycle.RequestCycleListenerCollection$3.notify(RequestCycleListenerCollection.java:105)
	at
org.apache.wicket.request.cycle.RequestCycleListenerCollection$3.notify(RequestCycleListenerCollection.java:101)
	at
org.apache.wicket.util.listener.ListenerCollection$1.notify(ListenerCollection.java:120)
	at
org.apache.wicket.util.listener.ListenerCollection.reversedNotify(ListenerCollection.java:144)
	at
org.apache.wicket.util.listener.ListenerCollection.reversedNotifyIgnoringExceptions(ListenerCollection.java:113)
	at
org.apache.wicket.request.cycle.RequestCycleListenerCollection.onDetach(RequestCycleListenerCollection.java:100)
	at
org.apache.wicket.request.cycle.RequestCycle.onDetach(RequestCycle.java:593)
	at
org.apache.wicket.request.cycle.RequestCycle.detach(RequestCycle.java:542)
	at
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:285)
	at
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188)
	at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:245)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
	at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
	at
org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
	at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
	at
com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
	at
com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
	at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)
	at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)
	at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
	at
com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
	at
com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
	at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
	at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
	at
com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
	at
com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
	at
com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
	at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
	at
com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
	at
com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
	at java.lang.Thread.run(Thread.java:722)



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Error-serializing-object-class-com-myapp-LoginPage-object-Page-class-com-myapp-LoginPage-id-0-render-tp4654853p4654867.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Error serializing object class com.mapp.LoginPage [object=[Page class = com.myapp.LoginPage, id = 0, render count = 1]]

Posted by JamesXWang <ja...@gmail.com>.
ok, thanks. I will upgrade it right now and let you know the result soon.



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Error-serializing-object-class-com-myapp-LoginPage-object-Page-class-com-myapp-LoginPage-id-0-render-tp4654853p4654874.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Error serializing object class com.mapp.LoginPage [object=[Page class = com.myapp.LoginPage, id = 0, render count = 1]]

Posted by Martin Grigorov <mg...@apache.org>.
Please create a quickstart.
Wicket usually shows which field is not Serializable. Not sure why it
doesn't work for you.


On Wed, Dec 19, 2012 at 12:14 PM, JamesXWang <ja...@gmail.com>wrote:

> Hi Guys,
>
> It's my fault. It isn't a bug of wicket. After another 2 hours debugging I
> finally found the root cause in the code of my app. There is a private
> static class XXX{} in a very deep hierachy of one of my util class. And
> that
> private class XXX hasn't implements the Serializable.
>
> But if Wicket can throw a more friendly serializing exception like (the
> class xxx or field fff can't be serialized) will be great helpul - given
> that, this kind of missing serializing private class issue will be fixed in
> few minutes instead of two days.
>
> Thanks,
> James
>
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Error-serializing-object-class-com-myapp-LoginPage-object-Page-class-com-myapp-LoginPage-id-0-render-tp4654853p4654915.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>

Re: Error serializing object class com.mapp.LoginPage [object=[Page class = com.myapp.LoginPage, id = 0, render count = 1]]

Posted by JamesXWang <ja...@gmail.com>.
Hi Guys,

It's my fault. It isn't a bug of wicket. After another 2 hours debugging I
finally found the root cause in the code of my app. There is a private
static class XXX{} in a very deep hierachy of one of my util class. And that
private class XXX hasn't implements the Serializable.

But if Wicket can throw a more friendly serializing exception like (the
class xxx or field fff can't be serialized) will be great helpul - given
that, this kind of missing serializing private class issue will be fixed in
few minutes instead of two days.

Thanks,
James




--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Error-serializing-object-class-com-myapp-LoginPage-object-Page-class-com-myapp-LoginPage-id-0-render-tp4654853p4654915.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Error serializing object class com.mapp.LoginPage [object=[Page class = com.myapp.LoginPage, id = 0, render count = 1]]

Posted by Martin Grigorov <mg...@apache.org>.
Bug reports are accepted only with quickstart applications ;-)
Create a quickstart and attach it to a ticket in Jira.


On Tue, Dec 18, 2012 at 2:36 PM, JamesXWang <ja...@gmail.com> wrote:

> Hi Martin,
>
> I've tried the wicket 6.3 quickstart but can't reproduce it. But after more
> deep debug I've found the root cause on my app -
>
> 1. On my html there is a Sortable list.
>
> 2. I've implemented some code to extends
> org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider
>
> 3. then on the method -
> @Override
>             protected void populateItem(final Item item) {..}
>
> I've added item.add() to get list data
>
> 4. if I set a WebMarkupContainer wmc.setVisible(false); and call
> item.add(wmc) then will cause the serializable exception.
>
> Does it a bug of Wicket or do I need call some api after setVisible(false)?
>
> Thanks!
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Error-serializing-object-class-com-myapp-LoginPage-object-Page-class-com-myapp-LoginPage-id-0-render-tp4654853p4654880.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>

Re: Error serializing object class com.mapp.LoginPage [object=[Page class = com.myapp.LoginPage, id = 0, render count = 1]]

Posted by JamesXWang <ja...@gmail.com>.
Hi Martin,

I've tried the wicket 6.3 quickstart but can't reproduce it. But after more
deep debug I've found the root cause on my app - 

1. On my html there is a Sortable list.

2. I've implemented some code to extends
org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider

3. then on the method - 
@Override
            protected void populateItem(final Item item) {..}

I've added item.add() to get list data

4. if I set a WebMarkupContainer wmc.setVisible(false); and call
item.add(wmc) then will cause the serializable exception.

Does it a bug of Wicket or do I need call some api after setVisible(false)?

Thanks!



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Error-serializing-object-class-com-myapp-LoginPage-object-Page-class-com-myapp-LoginPage-id-0-render-tp4654853p4654880.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Error serializing object class com.mapp.LoginPage [object=[Page class = com.myapp.LoginPage, id = 0, render count = 1]]

Posted by Martin Grigorov <mg...@apache.org>.
"SEVERE: " looks to me like java.util.logging is in use.

Upgrade to Wicket 6.3.0 and try again. If you can reproduce it in a
quickstart application then please attach it to a ticket in Jira.


On Tue, Dec 18, 2012 at 11:18 AM, JamesXWang <ja...@gmail.com>wrote:

> I am using Wicket6.1 and logback. The logback keep writing this serializing
> error to its DB. Do you know why this exception happenned? I've double
> checked my wicket pages relevant code but found nothing about this
> exception. Seems everything should be able to be serialized.
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Error-serializing-object-class-com-myapp-LoginPage-object-Page-class-com-myapp-LoginPage-id-0-render-tp4654853p4654872.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>

Re: Error serializing object class com.mapp.LoginPage [object=[Page class = com.myapp.LoginPage, id = 0, render count = 1]]

Posted by JamesXWang <ja...@gmail.com>.
I am using Wicket6.1 and logback. The logback keep writing this serializing
error to its DB. Do you know why this exception happenned? I've double
checked my wicket pages relevant code but found nothing about this
exception. Seems everything should be able to be serialized.



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Error-serializing-object-class-com-myapp-LoginPage-object-Page-class-com-myapp-LoginPage-id-0-render-tp4654853p4654872.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Error serializing object class com.mapp.LoginPage [object=[Page class = com.myapp.LoginPage, id = 0, render count = 1]]

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

Which version of Wicket is this ?

Here is the code:

try
{
writeObjectMethod = cls.getDeclaredMethod("writeObject",
 new Class[] { java.io.ObjectOutputStream.class });
}
catch (SecurityException e)
 {
// we can't access / set accessible to true
writeObjectMethodMissing.add(cls);
 }
catch (NoSuchMethodException e)
{
 // cls doesn't have that method
writeObjectMethodMissing.add(cls);
}

i.e. NoSuchMethodException is catched and never logged.
Do you use SecurityManager ?




On Tue, Dec 18, 2012 at 6:06 AM, JamesXWang <ja...@gmail.com> wrote:

> Hi Martin,
>
> Here is the exception stack trace from SerializableChecker -
>
> SEVERE: java.lang.NoSuchMethodException:
> com.myapp.LoginPage.writeObject(java.io.ObjectOutputStream)
>         at java.lang.Class.getDeclaredMethod(Class.java:1954)
>         at
>
> org.apache.wicket.core.util.io.SerializableChecker.internalCheck(SerializableChecker.java:505)
>         at
>
> org.apache.wicket.core.util.io.SerializableChecker.check(SerializableChecker.java:391)
>         at
>
> org.apache.wicket.core.util.io.SerializableChecker.writeObjectOverride(SerializableChecker.java:742)
>         at
> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:342)
>         at
>
> org.apache.wicket.serialize.java.JavaSerializer$CheckerObjectOutputStream.writeObjectOverride(JavaSerializer.java:258)
>         at
> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:342)
>         at
>
> org.apache.wicket.serialize.java.JavaSerializer.serialize(JavaSerializer.java:76)
>         at
>
> org.apache.wicket.pageStore.DefaultPageStore.serializePage(DefaultPageStore.java:376)
>         at
>
> org.apache.wicket.pageStore.DefaultPageStore.storePage(DefaultPageStore.java:150)
>         at
>
> org.apache.wicket.page.PageStoreManager$PersistentRequestAdapter.storeTouchedPages(PageStoreManager.java:383)
>         at
>
> org.apache.wicket.page.RequestAdapter.commitRequest(RequestAdapter.java:171)
>         at
>
> org.apache.wicket.page.AbstractPageManager.commitRequest(AbstractPageManager.java:98)
>         at
>
> org.apache.wicket.page.PageManagerDecorator.commitRequest(PageManagerDecorator.java:73)
>         at
>
> org.apache.wicket.page.PageAccessSynchronizer$2.commitRequest(PageAccessSynchronizer.java:281)
>         at org.apache.wicket.Application$2.onDetach(Application.java:1628)
>         at
>
> org.apache.wicket.request.cycle.RequestCycleListenerCollection$3.notify(RequestCycleListenerCollection.java:105)
>         at
>
> org.apache.wicket.request.cycle.RequestCycleListenerCollection$3.notify(RequestCycleListenerCollection.java:101)
>         at
>
> org.apache.wicket.util.listener.ListenerCollection$1.notify(ListenerCollection.java:120)
>         at
>
> org.apache.wicket.util.listener.ListenerCollection.reversedNotify(ListenerCollection.java:144)
>         at
>
> org.apache.wicket.util.listener.ListenerCollection.reversedNotifyIgnoringExceptions(ListenerCollection.java:113)
>         at
>
> org.apache.wicket.request.cycle.RequestCycleListenerCollection.onDetach(RequestCycleListenerCollection.java:100)
>         at
>
> org.apache.wicket.request.cycle.RequestCycle.onDetach(RequestCycle.java:593)
>         at
> org.apache.wicket.request.cycle.RequestCycle.detach(RequestCycle.java:542)
>         at
>
> org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:285)
>         at
>
> org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188)
>         at
>
> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:245)
>         at
>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
>         at
>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
>         at
>
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
>         at
>
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
>         at
>
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
>         at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
>         at
>
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
>         at
>
> org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
>         at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
>         at
>
> com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
>         at
>
> com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
>         at
> com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)
>         at
> com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)
>         at
> com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
>         at
>
> com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
>         at
>
> com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
>         at
> com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
>         at
> com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
>         at
> com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
>         at
>
> com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
>         at
>
> com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
>         at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
>         at
>
> com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
>         at
>
> com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
>         at java.lang.Thread.run(Thread.java:722)
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Error-serializing-object-class-com-myapp-LoginPage-object-Page-class-com-myapp-LoginPage-id-0-render-tp4654853p4654867.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>