-
Couldn't load subscription status.
- Fork 38.8k
Description
J John opened SPR-11168 and commented
I upgraded spring versions of a spring-portlet-mvc application from 3.1.4.RELEASE to 3.25.RELEASE. And i am getting following exception, when ever trying to set a non-serializable object into portlet-session or servlet-session
[#|2013-12-04T17:19:05.122+0200|INFO|oracle-glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=157;_ThreadName=http-thread-pool-4270(3);|17:19:05,113 ERROR [CustomSimpleMappingExceptionResolver:109] An unexpected error occured. Redirecting to the error page.
java.lang.IllegalArgumentException: PWC2788: setAttribute: Non-serializable attribute with name FOO_BAR
at org.apache.catalina.session.ManagerBase.checkSessionAttribute(ManagerBase.java:832)
at org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1713)
at org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardSessionFacade.java:178)
at com.liferay.portal.servlet.SharedSessionWrapper.setAttribute(SharedSessionWrapper.java:161)
at com.liferay.portlet.PortletSessionImpl.setAttribute(PortletSessionImpl.java:279)
at example.ExampleController.helloWorld(ExampleController.java:48)
My Application is running on a LiferayPortal-6.1 running on a Glassfish-3.1 server
The fix for https://jira.springsource.org/browse/SPR-10219 is causing this issue. The fix added <distributable/> tag in spring-web/src/main/resources/META-INF/web-fragment.xml, which may be making the whole application distributable and thus mandating all session-objs to be serializable.
Affects: 3.2.5
Issue Links:
- Tomcat Session Replication not working with Spring 3.2 [SPR-10219] #14852 Tomcat Session Replication not working with Spring 3.2
- Spring 3.2.2+ on GlassFish 3.1 leads to IllegalArgumentException: PWC2788: setAttribute: Non-serializable attribute [SPR-11389] #16016 Spring 3.2.2+ on GlassFish 3.1 leads to IllegalArgumentException: PWC2788: setAttribute: Non-serializable attribute
2 votes, 5 watchers