Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

NullPointerException when deselecting all SelectManyChoice elements and submitting

Filipe BaptistaJul 20 2016 — edited Jul 20 2016

Hi,

I have an ADF application (JDev version 11.1.1.9.0.) where I present a page form to the user, with its components (inputText, selectOneChoice, selectManyChoice, etc.) already filled.

The user can change the value of each component and submit them.

However, if the user deselects all the elements from a selectManyChoice component (the component has autoSubmit=true) I get the following error:

ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase PROCESS_VALIDATIONS 3[[
java.lang.NullPointerException
        at oracle.adfinternal.view.faces.model.binding.FacesCtrlListBinding.findObjectFromIndex(FacesCtrlListBinding.java:292)
        at oracle.adfinternal.view.faces.model.binding.FacesCtrlListBinding.getInputValue(FacesCtrlListBinding.java:215)
        at oracle.jbo.uicli.binding.JUCtrlValueBinding.internalGet(JUCtrlValueBinding.java:2374)
        at oracle.jbo.uicli.binding.JUCtrlListBinding.internalGet(JUCtrlListBinding.java:3807)
        at oracle.adfinternal.view.faces.model.binding.FacesCtrlListBinding.internalGet(FacesCtrlListBinding.java:524)
        at oracle.adf.model.binding.DCControlBinding.get(DCControlBinding.java:768)
        at javax.el.MapELResolver.getValue(MapELResolver.java:196)
        at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:173)
        at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:200)
        at com.sun.el.parser.AstValue.getValue(AstValue.java:138)
        at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:206)
        at org.apache.myfaces.trinidad.bean.FacesBeanImpl.getProperty(FacesBeanImpl.java:68)
     . . .

ADF_FACES-60096:Server Exception during PPR, #1[[
java.lang.NullPointerException
        at oracle.adfinternal.view.faces.model.binding.FacesCtrlListBinding.findObjectFromIndex(FacesCtrlListBinding.java:292)
        at oracle.adfinternal.view.faces.model.binding.FacesCtrlListBinding.getInputValue(FacesCtrlListBinding.java:215)
        at oracle.jbo.uicli.binding.JUCtrlValueBinding.internalGet(JUCtrlValueBinding.java:2374)
        at oracle.jbo.uicli.binding.JUCtrlListBinding.internalGet(JUCtrlListBinding.java:3807)
        at oracle.adfinternal.view.faces.model.binding.FacesCtrlListBinding.internalGet(FacesCtrlListBinding.java:524)
        at oracle.adf.model.binding.DCControlBinding.get(DCControlBinding.java:768)
        at javax.el.MapELResolver.getValue(MapELResolver.java:196)
        at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:173)
        at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:200)
        at com.sun.el.parser.AstValue.getValue(AstValue.java:138)
        at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:206)
        at org.apache.myfaces.trinidad.bean.FacesBeanImpl.getProperty(FacesBeanImpl.java:68)
     . . .

ADF Component:

<af:selectManyChoice value="#{bindings.ApplicationLOV.inputValue}"
                                             label="* #{taskBundle.APPLICATION_AREA}"
                                             disabled="#{!pageFlowScope.customTaskDetailMBean.attributes.applicationAreaEditable}"
                                             id="smc3"
                                             binding="#{pageFlowScope.customTaskDetailMBean.applicationAreaSMC}"
                                             autoSubmit="true"
                                             valueChangeListener="#{pageFlowScope.customTaskDetailMBean.applicationAreaListener}">
          <f:selectItems value="#{bindings.ApplicationLOV.items}"
                                id="si13"/>
</af:selectManyChoice>

By getting the referred error, the valueChangeListener of that component isn't even executed.

I have a line to print that the method is being called and nothing is printed. I also tried in Debug Mode with a break point on the first line of the valueChangeListener method but it isn't captured.

I can not figure out why this is happening.

Any help is much appreciated.

Thanks in advance,

Filipe

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 17 2016
Added on Jul 20 2016
2 comments
335 views