[MAGNOLIA-2385] SystemContentWrapper not serializable Created: 19/Sep/08  Updated: 23/Jan/13  Resolved: 19/Sep/08

Status: Closed
Project: Magnolia
Component/s: core
Affects Version/s: 3.5.9
Fix Version/s: 4.0

Type: Bug Priority: Minor
Reporter: Philippe Marschall Assignee: Jan Haderka
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Tomcat 6.0.16, Java 1.6.0_07, Windows XP


Issue Links:
relation
is related to MAGNOLIA-1758 WebcontextImpl stores a non-serializa... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

SystemContentWrapper is stored in the HTTP session but not serializable. This leads to the following stack trace when shutting down Tomcat.

WARN  org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/swc-magnolia-webapp] 19.09.2008 10:44:07 - 
Cannot serialize session attribute info.magnolia.context.WebContextImpl.user for session 52B54615B92F2B79DCC2178C35D3B103   
java.io.NotSerializableException: info.magnolia.cms.util.SystemContentWrapper
	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156)
	at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
	at org.apache.catalina.session.StandardSession.writeObject(StandardSession.java:1515)
	at org.apache.catalina.session.StandardSession.writeObjectData(StandardSession.java:959)
	at org.apache.catalina.session.StandardManager.doUnload(StandardManager.java:517)
	at org.apache.catalina.session.StandardManager.unload(StandardManager.java:463)
	at org.apache.catalina.session.StandardManager.stop(StandardManager.java:667)
	at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4512)
	at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1098)
	at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1098)
	at org.apache.catalina.core.StandardEngine.stop(StandardEngine.java:448)
	at org.apache.catalina.core.StandardService.stop(StandardService.java:584)
	at org.apache.catalina.core.StandardServer.stop(StandardServer.java:744)
	at org.apache.catalina.startup.Catalina.stop(Catalina.java:628)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:603)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)


 Comments   
Comment by Jan Haderka [ 19/Sep/08 ]

SystemContentWrapper is serializable. In fact if you read stacktrace carefully, it is WebContextImpl.user that can't be serialized. Yet again User itself is serializable (see MAGNOLIA-1758 for details) since r11858.

Comment by Philippe Marschall [ 19/Sep/08 ]

Ok, but why do we see this then in Magonlia 3.5.9? As far as I understand it should be fixed in this version.

Comment by Jan Haderka [ 19/Sep/08 ]

That is an interesting question indeed. Turns out WebContextImpl was not Serializable anymore. I've fixed the issue on trunk (r18176) and for 3.6 branch(r18177).

Generated at Mon Feb 12 03:36:12 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.