myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jakob Korherr (JIRA)" <>
Subject [jira] Commented: (MYFACES-2466) NullPointerException in UIComponentBase.restoreDeltaSystemEventListenerClassMap() when UIViewRoot subscribed to PostAddToViewEvent
Date Sat, 16 Jan 2010 21:09:54 GMT


Jakob Korherr commented on MYFACES-2466:

So, I finally found the problem:

The problem is that _systemEventListenerClassMap is saved and restored in the same way as
_behaviorsMap, but _systemEventListenerClassMap is not recreated via the view declaration
language like _behaviorsMap, because the listeners were added programatically via UIComponent.subscribeToEvent().
So there is no Map instance and there are no _DeltaList instances to which the delta state
could be applied.

However, I do not know if this already is the right behavior? Are SystemEventListeners on
UIComponents only allowed to be applied via the VDL? This would change things...

> NullPointerException in UIComponentBase.restoreDeltaSystemEventListenerClassMap() when
UIViewRoot subscribed to PostAddToViewEvent
> ----------------------------------------------------------------------------------------------------------------------------------
>                 Key: MYFACES-2466
>                 URL:
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-314
>    Affects Versions: 2.0.0-alpha-2
>            Reporter: Jakob Korherr
>         Attachments: exception-trigger.patch
> java.lang.NullPointerException
> 	at javax.faces.component.UIComponentBase.restoreDeltaSystemEventListenerClassMap(
> 	at javax.faces.component.UIComponentBase.restoreState(
> 	at javax.faces.component.UIViewRoot.restoreState(
> 	at org.apache.myfaces.view.facelets.DefaultFaceletsStateManagementStrategy.restoreStateFromMap(
> 	at org.apache.myfaces.view.facelets.DefaultFaceletsStateManagementStrategy.restoreView(
> 	at org.apache.myfaces.application.jsp.JspStateManagerImpl.restoreView(
> 	at org.apache.myfaces.view.ViewDeclarationLanguageBase.restoreView(
> 	at org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.restoreView(
> 	at org.apache.myfaces.application.ViewHandlerImpl.restoreView(
> 	at org.apache.myfaces.lifecycle.RestoreViewExecutor.execute(
> 	at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(
> 	at org.apache.myfaces.lifecycle.LifecycleImpl.execute(
> 	at javax.faces.webapp.FacesServlet._handleStandardRequest(
> 	... 13 more
> In this scenario savedObject is an instance of _AttachedDeltaWrapper, but _systemEventListenerClassMap
is empty and so it returns null for get(entry.getKey()). Thus a NullPointerException is thrown
in the following line (

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message