Sven Linstaedt created MYFACES-3915:
---------------------------------------
Summary: NullpointerException during UIOuput state handling
Key: MYFACES-3915
URL: https://issues.apache.org/jira/browse/MYFACES-3915
Project: MyFaces Core
Issue Type: Bug
Affects Versions: 2.2.4
Reporter: Sven Linstaedt
Under the conditions:
* having a h:inputText in a composite component with binding to it's composite
component attribute map (like binding="#{cc.attrs.input}")
* attaching state holding converter (implements StateHolder) to the input with
non initial state
* having no other state saved (specifically UIOuput#saveState returns null)
a state array of size two is returned that looks like [null, converterState].
Restoring this state causes UIOuput to hand over the first array entry to
UIOuput, which directly fails with a NPE, if the initialState was not marked.
{code}
java.lang.NullPointerException: state
at
javax.faces.component.UIComponentBase.restoreState(UIComponentBase.java:2046)
at javax.faces.component.UIOutput.restoreState(UIOutput.java:241)
at javax.faces.component.UIInput.restoreState(UIInput.java:1060)
at
javax.faces.component.UIComponentBase.restoreAttachedState(UIComponentBase.java:1915)
at
javax.faces.component._DeltaStateHelper$InternalMap.restoreState(_DeltaStateHelper.java:925)
at
javax.faces.component.UIComponentBase.restoreAttachedState(UIComponentBase.java:1915)
at
javax.faces.component._DeltaStateHelper.copyMap(_DeltaStateHelper.java:289)
at
javax.faces.component._DeltaStateHelper._createDeltas(_DeltaStateHelper.java:216)
at
javax.faces.component._DeltaStateHelper.put(_DeltaStateHelper.java:425)
at
javax.faces.component._ComponentAttributesMap.put(_ComponentAttributesMap.java:603)
at
javax.faces.component._ComponentAttributesMap.put(_ComponentAttributesMap.java:55)
at
org.apache.myfaces.el.unified.resolver.CompositeComponentELResolver$CompositeComponentAttributesMapWrapper.put(CompositeComponentELResolver.java:418)
at
org.apache.myfaces.el.unified.resolver.CompositeComponentELResolver$CompositeComponentAttributesMapWrapper.put(CompositeComponentELResolver.java:271)
at javax.el.MapELResolver.setValue(MapELResolver.java:94)
at javax.el.CompositeELResolver.setValue(CompositeELResolver.java:83)
at org.apache.el.parser.AstValue.setValue(AstValue.java:221)
at
org.apache.el.ValueExpressionImpl.setValue(ValueExpressionImpl.java:252)
at
org.jboss.weld.el.WeldValueExpression.setValue(WeldValueExpression.java:64)
at
org.apache.myfaces.view.facelets.el.ContextAwareTagValueExpression.setValue(ContextAwareTagValueExpression.java:153)
at
org.apache.myfaces.view.facelets.el.LocationValueExpression.setValue(LocationValueExpression.java:157)
at javax.faces.component.UIComponent.processEvent(UIComponent.java:849)
at
org.apache.myfaces.lifecycle.DefaultRestoreViewSupport$RestoreStateCallback.visit(DefaultRestoreViewSupport.java:281)
at
org.apache.myfaces.component.visit.FullVisitContext.invokeVisitCallback(FullVisitContext.java:141)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1016)
at
javax.faces.component.UIComponentBase.visitTree(UIComponentBase.java:1191)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1044)
at
javax.faces.component.UIComponentBase.visitTree(UIComponentBase.java:1191)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1044)
at
javax.faces.component.UIComponentBase.visitTree(UIComponentBase.java:1191)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1044)
at
javax.faces.component.UIComponentBase.visitTree(UIComponentBase.java:1191)
at
javax.faces.component.UINamingContainer.visitTree(UINamingContainer.java:177)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1044)
at
javax.faces.component.UIComponentBase.visitTree(UIComponentBase.java:1191)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1032)
at
javax.faces.component.UIComponentBase.visitTree(UIComponentBase.java:1191)
at
kn.gvs.framework.jsf.component.UIComposedInputComponent.visitTree(UIComposedInputComponent.java:337)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1044)
at
javax.faces.component.UIComponentBase.visitTree(UIComponentBase.java:1191)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1044)
at
javax.faces.component.UIComponentBase.visitTree(UIComponentBase.java:1191)
at javax.faces.component.UIForm.visitTree(UIForm.java:345)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1044)
at
javax.faces.component.UIComponentBase.visitTree(UIComponentBase.java:1191)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1044)
at
javax.faces.component.UIComponentBase.visitTree(UIComponentBase.java:1191)
at
org.apache.myfaces.lifecycle.DefaultRestoreViewSupport.processComponentBinding(DefaultRestoreViewSupport.java:144)
at
org.apache.myfaces.lifecycle.RestoreViewExecutor.execute(RestoreViewExecutor.java:202)
at
org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:196)
at
org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:143)
at
org.apache.deltaspike.jsf.impl.listener.request.DeltaSpikeLifecycleWrapper.execute(DeltaSpikeLifecycleWrapper.java:89)
at
javax.faces.lifecycle.LifecycleWrapper.execute(LifecycleWrapper.java:46)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at
org.jboss.weld.servlet.ConversationFilter.doFilter(ConversationFilter.java:70)
[...]
{code}
--
This message was sent by Atlassian JIRA
(v6.2#6252)