OutOfMemoryError .. Wicket?

I’m getting the following error occasionally …INFO | jvm 1 | 2012/05/01 10:23:31 | SEVERE: Servlet.service() for servlet default threw exception INFO | jvm 1 | 2012/05/01 10:23:31 | java.lang.OutOfMemoryError: PermGen space INFO | jvm 1 | 2012/05/01 10:23:31 | at java.lang.Class.getDeclaredConstructors0(Native Method) INFO | jvm 1 | 2012/05/01 10:23:31 | at java.lang.Class.privateGetDeclaredConstructors(Class.java:2404) INFO | jvm 1 | 2012/05/01 10:23:31 | at java.lang.Class.getConstructor0(Class.java:2714) INFO | jvm 1 | 2012/05/01 10:23:31 | at java.lang.Class.newInstance0(Class.java:343) INFO | jvm 1 | 2012/05/01 10:23:31 | at java.lang.Class.newInstance(Class.java:325) INFO | jvm 1 | 2012/05/01 10:23:31 | at sun.reflect.MethodAccessorGenerator$1.run(MethodAccessorGenerator.java:399) INFO | jvm 1 | 2012/05/01 10:23:31 | at sun.reflect.MethodAccessorGenerator$1.run(MethodAccessorGenerator.java:396) INFO | jvm 1 | 2012/05/01 10:23:31 | at java.security.AccessController.doPrivileged(Native Method) INFO | jvm 1 | 2012/05/01 10:23:31 | at sun.reflect.MethodAccessorGenerator.generate(MethodAccessorGenerator.java:395) INFO | jvm 1 | 2012/05/01 10:23:31 | at sun.reflect.MethodAccessorGenerator.generateSerializationConstructor(MethodAccessorGenerator.java:113) INFO | jvm 1 | 2012/05/01 10:23:31 | at sun.reflect.ReflectionFactory.newConstructorForSerialization(ReflectionFactory.java:331) INFO | jvm 1 | 2012/05/01 10:23:31 | at java.io.ObjectStreamClass.getSerializableConstructor(ObjectStreamClass.java:1356) INFO | jvm 1 | 2012/05/01 10:23:31 | at java.io.ObjectStreamClass.access$1500(ObjectStreamClass.java:69) INFO | jvm 1 | 2012/05/01 10:23:31 | at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:480) INFO | jvm 1 | 2012/05/01 10:23:31 | at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:455) INFO | jvm 1 | 2012/05/01 10:23:31 | at java.security.AccessController.doPrivileged(Native Method) INFO | jvm 1 | 2012/05/01 10:23:31 | at java.io.ObjectStreamClass.<init>(ObjectStreamClass.java:455) INFO | jvm 1 | 2012/05/01 10:23:31 | at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:352) INFO | jvm 1 | 2012/05/01 10:23:31 | at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1130) INFO | jvm 1 | 2012/05/01 10:23:31 | at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:346) INFO | jvm 1 | 2012/05/01 10:23:31 | at org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory$2.writeObjectOverride(IObjectStreamFactory.java:121) INFO | jvm 1 | 2012/05/01 10:23:31 | at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:342) INFO | jvm 1 | 2012/05/01 10:23:31 | at org.apache.wicket.util.lang.Objects.objectToByteArray(Objects.java:1120) INFO | jvm 1 | 2012/05/01 10:23:31 | at org.apache.wicket.protocol.http.pagestore.AbstractPageStore.serializePage(AbstractPageStore.java:203) INFO | jvm 1 | 2012/05/01 10:23:31 | at org.apache.wicket.protocol.http.pagestore.DiskPageStore.storePage(DiskPageStore.java:840) INFO | jvm 1 | 2012/05/01 10:23:31 | at org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLevelCachePageMap.put(SecondLevelCacheSessionStore.java:332) INFO | jvm 1 | 2012/05/01 10:23:31 | at org.apache.wicket.Session.requestDetached(Session.java:1404) INFO | jvm 1 | 2012/05/01 10:23:31 | at org.apache.wicket.RequestCycle.detach(RequestCycle.java:1176) INFO | jvm 1 | 2012/05/01 10:23:31 | at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1454) INFO | jvm 1 | 2012/05/01 10:23:31 | at org.apache.wicket.RequestCycle.request(RequestCycle.java:545) INFO | jvm 1 | 2012/05/01 10:23:31 | at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:479) INFO | jvm 1 | 2012/05/01 10:23:31 | at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:312) INFO | jvm 1 | 2012/05/01 10:23:31 | INFO | jvm 1 | 2012/05/01 10:23:31 | INFO [ModuleManager ] [10:23:31,842]: Starting up module "potayto-potahto-site-designerclient"... INFO | jvm 1 | 2012/05/01 10:23:54 | May 01, 2012 10:23:53 AM org.apache.catalina.core.StandardWrapperValve invoke INFO | jvm 1 | 2012/05/01 10:23:54 | SEVERE: Servlet.service() for servlet Map threw exception INFO | jvm 1 | 2012/05/01 10:23:54 | java.lang.OutOfMemoryError: PermGen space… thinking that perhaps there’s something Wicket related I’m not taking into consideration? I’ve got a Homepage Panel setup, (refer to this thread).

Thanks!

Here’s my wild guess:

Wicket goes crazy serializing and deserializing your pages and all variable instances; perhaps you’ve got something with a big enough object graph that it runs out of memory serializing or deserializing the page.

That would mean that everything in that object graph is Serializable already or you haven’t posted the million warnings/errors wicket spits out about something not being serializable.

I’ll have to point Carl towards this thread… he’s the Wicket guru.