Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Won't Fix
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
JDK version and platform:Sun 1.4.2_08-b03 under Linux 2.6 IA32
Description
When I tried to serialize an inline (inner) class with XStream from a servlet running on JBoss 4.0.1sp1 the servlet kept throwing a java.lang.OutOfMemoryError exception.
Everythign worked fine when I made the the class its own file.
Make it a static nested class. If it is just an inner class, you have an implicit pointer to enclosing object - in this case servlet. Servlet in turn has a references to servlet context, which in turn can have reference to entire JBoss container. And when you try to serialize entire JBoss, OOME seems like a valid error