cancel
Showing results for 
Search instead for 
Did you mean: 

Java WebDynpro Adaptive RFC Null pointer exception when setting model

former_member192818
Active Participant
0 Kudos

Hi Guys,

I get a null pointer exception when setting the model to the AdaptiveRFC input structure. Here is the exception.

java.lang.NullPointerException: while trying to invoke the method com.sap.tc.cm.base.metadata.BaseModelClassInfo.getPropertyInfos() of a null object loaded from local variable 'modelClassInfo' com.sap.tc.cm.base.model.BaseGenericModelClass.<init>(BaseGenericModelClass.java:90) com.sap.tc.cm.arfc2.model.ARFC2GenericModelClass.<init>(ARFC2GenericModelClass.java:93) com.sap.tc.cm.arfc2.gci.ARFC2TypedModelClass.createDelegate(ARFC2TypedModelClass.java:674) com.sap.tc.cm.arfc2.gci.ARFC2TypedModelClass.<init>(ARFC2TypedModelClass.java:346) com.illumiti.initiation.wd.models.model_lumpsum.Zrelo_Services.<init>(Zrelo_Services.java:39)

Here is the Code: The exception light is in bold.

Model_Lumpsum modelInstance = new Model_Lumpsum(); Zrw_Init_Get_Auto_Ma_Update_Input materialsInput = new Zrw_Init_Get_Auto_Ma_Update_Input(modelInstance); materialsInput.setClient(clientId); List<Zrelo_Services> newList = new ArrayList(); for(int k=0; k< wdContext.nodeCBNode().size();k++){ Zrelo_Services zrel = new Zrelo_Services(modelInstance); String service = wdContext.nodeCBNode().getCBNodeElementAt(k).getService(); boolean selected = wdContext.nodeCBNode().getCBNodeElementAt(k).getChecked(); zrel.setMain_Service(service); zrel.setSelected(selected ); newList.add(zrel); } materialsInput.setServices(newList);

Is there any reason that you guys can see that an exception can occur on the line that is in bold.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Sumit,

i am getting the same error. were you able to find a solution to that?