[MGNLUI-2477] Not Serializable Exception Created: 04/Jul/13  Updated: 18/Jul/14  Resolved: 18/Jul/14

Status: Closed
Project: Magnolia UI
Component/s: None
Affects Version/s: 5.0
Fix Version/s: 5.2.x

Type: Bug Priority: Critical
Reporter: Kevin Coshic Assignee: Unassigned
Resolution: Duplicate Votes: 1
Labels: maintenance, support
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File WebappClassLoader.png     Text File localhost.2013-07-10.log    
Issue Links:
duplicate
duplicates MGNLUI-351 UI classes persisted in session not s... Closed
relation
is related to MGNLUI-351 UI classes persisted in session not s... 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   

I created a new MGNL Project using the Maven's archetypes, but when I run the MGNL WebApp it throws an exception java.io.NotSerializableException. I tested this in Eclipse Kepler IDE and NetBeans IDE, and in both the exception is thrown.



 Comments   
Comment by Kevin Coshic [ 04/Jul/13 ]

Not Serializable Exception in Eclipse Kepler

Comment by Jan Haderka [ 09/Jul/13 ]

Could you please provide complete stacktrace as a text file rather then screenshot?
Also listing of all the libs in your webapp would be helpful. It doesn't seem like any Magnolia related class, but rather Tomcat's WebappClassloader, which indeed should not be serialized.

Comment by Kevin Coshic [ 10/Jul/13 ]

I added a Log File ( localhost.2013-07-10.log ). This exception was produced in the Magnolia CMS Tomcat Bundle.

Comment by Jan Haderka [ 12/Jul/13 ]

So it seems that some variable of an instance of AdminCentral class holds a reference to webapp class loader and causes failure to serialize session when stopping the server. While this is definitively not nice and should be fixed, I don't see that as a problem unless you run author instance in Tomcat cluster.

Could you please describe actions you did to get to this state? I presume you log in the UI and then shutdown or restart server w/o actually logging out, correct?

Comment by Kevin Coshic [ 12/Jul/13 ]

"I presume you log in the UI and then shutdown or restart server." <--- Exactly

Comment by Tobias Mattsson [ 04/Dec/13 ]

Moved to MGNLUI project.

Comment by Markus Grieder [ 17/Dec/13 ]

Workaround for Tomcat until this is fixed: Disable Session Persistence:
http://tomcat.apache.org/tomcat-7.0-doc/config/manager.html#Disable_Session_Persistence
-> put a context.xml in META-INF (for example in 'webapps\magnoliaAuthor\META-INF\context.xml'):
----------------
<?xml version="1.0" encoding="UTF-8"?>
<Context>
<Manager pathname=""/>
</Context>
----------------
MGNLUI-351 is about the same problem, but in the session are more than UI-classes which are not serializable. The anonymous BootstrapListener-class in AdmincentralVaadinServlet for example could be made a static class to resolve one problem. ("-Dsun.io.serialization.extendedDebugInfo=true" helps a lot to fix something like that)

Comment by Richard Unger [ 20/May/14 ]

The WebAppClassLoader problem is something we have observed as well. It is very annoying to have the messages on startup during development, but more seriously it means sessions cannot be serialized/deserialized. Not only is this a severe limitation for the prodect magnolia - you currently aren't cluster-capable, but it actually also affects all setups, regardless of cluster or not, as sessions cannot be restored after restarting tomcat. That means each time you restart tomcat all users (unnecessarily) lose their sessions.

As for MGNLUI-351, Vaadin had massive problems with the "Serializable" interface on their classes, which AFAIK they have been working hard to fix.
I have observed that the magnolia code does not have Serializable on many of its UI objects (don't forget anonymous classes!) - that is definately something I would adress sooner rather than later...

Generated at Mon Feb 12 08:57:00 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.