myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leonardo Uribe (JIRA)" <>
Subject [jira] [Resolved] (MYFACES-4057) Serializable ViewScopeContextualStorage references non-serializable BeanManager
Date Fri, 29 Jul 2016 04:01:20 GMT


Leonardo Uribe resolved MYFACES-4057.
       Resolution: Fixed
         Assignee: Leonardo Uribe
    Fix Version/s: 2.2.11

I have checked the example and the problem is related to some changes in OWB. In TomEE 1.7.4
(OWB 1.2.7) it works well but in TomEE 7.0.1 (OWB 1.6.3) it throws the exception.

I have applied a patch that makes BeanManager transient in that location, and in that way
avoid the serialization at all. But the exception at restart (null pointer on createNormalScopeProxy)
is still present, so it could be a problem in OWB side.

Given that the second exception is related to OWB, I'll close this issue as fixed from MyFaces
side. I'll add some comments on OWB side.

> Serializable ViewScopeContextualStorage references non-serializable BeanManager 
> --------------------------------------------------------------------------------
>                 Key: MYFACES-4057
>                 URL:
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 2.2.10
>         Environment: TomEE 7.0.0 and 7.0.1
>            Reporter: Bauke Scholtz
>            Assignee: Leonardo Uribe
>             Fix For: 2.2.11
> 1. Have this CDI bean with JSF CDI view scope.
> {code}@Named @ViewScoped
> public class Bean implements Serializable {}{code}
> 2. Have this minimal page mapped to JSF servlet.
> {code}<!DOCTYPE html>#{bean}{code}
> 3. Open this page in a server using OpenWebBeans as CDI implementation (TomEE for example)
and have session persistence enabled (already default in TomEE).
> 4. Restart the server.
> 5. On shutdown below warning is logged.
> {code}
> WARNING: Cannot serialize session attribute openWebBeansSessionContext for session 34F40C623600849F43AD2153F2EB75D8
> org.apache.webbeans.container.BeanManagerImpl
> 	at
> 	...{code}
> 6. After restart below exception is thrown during deserializing session (stack trace
comes from TomEE 7.0.0).
> {code}java.lang.NullPointerException
> 	at org.apache.webbeans.proxy.NormalScopeProxyFactory.createNormalScopeProxy(
> 	at org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.readResolve(
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	...
> {code}
> Root cause appears to be that the serializable {{org.apache.myfaces.cdi.view.ViewScopeContextualStorage}}
class has a {{BeanManager}} property while the interface is not declared serializable.
> Related:

This message was sent by Atlassian JIRA

View raw message