Cannot create a session after the response has been committed

后端 未结 4 1877
余生分开走
余生分开走 2020-12-30 02:40

Opening the JSF page gives me the following exception:

Caused by: java.lang.IllegalStateException: Cannot create a session after the response has been

4条回答
  •  情书的邮戳
    2020-12-30 03:46

    [SOLVED]

    It took days to diagnose this problem, but finally I am able to solve this problem.

    It was actually @ViewScoped and it has a managed property DAO object which was not serialized. So after view is rendered, facelets also produce this exception, but JSF view already rendered and that's why this exception showed.

    Solution: Make all objects serialized in @ViewScoped bean, and mark "transient" who are not serialized like in my case it was DAO object in JSF @ViewScoped.

提交回复
热议问题