java.lang.IllegalArgumentException: PWC2788: setAttribute: Non-serializable attribute with name FOO_BAR

Spring JIRA | J John | 3 years ago
  1. 0

    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 {code} [#|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) {code} 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.

    Spring JIRA | 3 years ago | J John
    java.lang.IllegalArgumentException: PWC2788: setAttribute: Non-serializable attribute with name FOO_BAR
  2. 0

    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 {code} [#|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) {code} 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.

    Spring JIRA | 3 years ago | J John
    java.lang.IllegalArgumentException: PWC2788: setAttribute: Non-serializable attribute with name FOO_BAR
  3. 0

    GitHub comment 34#210079035

    GitHub | 8 months ago | ygorgasparin
    java.lang.IllegalArgumentException: PWC2788: setAttribute: Non-serializable attribute with name auth0tokens
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Pet clinic - Find Ownerss tab - Error setAttribute: Non-serializable attribute with name owner

    GitHub | 2 years ago | tuma80
    java.lang.IllegalArgumentException: setAttribute: Non-serializable attribute with name owner
  6. 0

    java.lang.IllegalArgumentException: setAttribute: Non-serializable attribute

    Stack Overflow | 8 years ago
    java.lang.IllegalArgumentException: setAttribute: Non-serializable attribute

    1 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalArgumentException

      PWC2788: setAttribute: Non-serializable attribute with name FOO_BAR

      at org.apache.catalina.session.ManagerBase.checkSessionAttribute()
    2. Glassfish Core
      StandardSessionFacade.setAttribute
      1. org.apache.catalina.session.ManagerBase.checkSessionAttribute(ManagerBase.java:832)
      2. org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1713)
      3. org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardSessionFacade.java:178)
      3 frames
    3. Liferay Portal Impl
      SharedSessionWrapper.setAttribute
      1. com.liferay.portal.servlet.SharedSessionWrapper.setAttribute(SharedSessionWrapper.java:161)
      1 frame
    4. Liferay Portal Service
      PortletSessionImpl.setAttribute
      1. com.liferay.portlet.PortletSessionImpl.setAttribute(PortletSessionImpl.java:279)
      1 frame
    5. example
      ExampleController.helloWorld
      1. example.ExampleController.helloWorld(ExampleController.java:48)
      1 frame