cancel
Showing results for 
Search instead for 
Did you mean: 

Null pointer exception

Former Member
0 Kudos

Hi all,

I am not able to create a model object, error displays as Null pointer exception.

Z_51Vj_Rfc_Salesorder_Entry_Input eInput = new Z_51Vj_Rfc_Salesorder_Entry_Input();

Please Help .

Thanks in Advance,

Regards,

CSP

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Could you please paste the code in wdDoInit method of your controller? From the statck trace it looks like the error is occurring at line 106 (SalesOrderComp.java:106). Please double check what you have at this line and see if it is correct. If any additional parameters are added to the RFC after the application is deployed and run once, you need to restart the server to refresh the rfc metadata.

Thanks

Ram

Former Member
0 Kudos

Please find the following stack trace after following suggestions :

at com.sap.tc.webdynpro.modelimpl.dynamicrfc.AiiModelClass.createNewBaseTypeDescriptor(AiiModelClass.java:256)

at com.sap.tc.webdynpro.modelimpl.dynamicrfc.AiiModelClass.descriptor(AiiModelClass.java:222)

at com.bosch.ap.wd.janasbid_rbau.model.Z_51Vj_Rfc_Salesorder_Entry_Input.<init>(Z_51Vj_Rfc_Salesorder_Entry_Input.java:51)

at com.bosch.ap.wd.janasbid_rbau.SalesOrderComp.wdDoInit(SalesOrderComp.java:106)

at com.bosch.ap.wd.janasbid_rbau.wdp.InternalSalesOrderComp.wdDoInit(InternalSalesOrderComp.java:222)

Former Member
0 Kudos

HI Pradeep,

Try restarting J2ee server.

Regards,

Gopal

Former Member
0 Kudos

Hi,

Write these statements in wdDoInit() method

Z_51Vj_Rfc_Salesorder_Entry_Input eInput = new Z_51Vj_Rfc_Salesorder_Entry_Input();

wdContext.node<RequestNode>().bind(eInput);

Regards

LN

Former Member
0 Kudos

Hi,

I don't think the null pointer exception would be on the line mentioned by you. Could you please check the stack trace and give us the line which is resulting into null pointer exception.

Regards,

Murtuza

Former Member
0 Kudos

hi,

You have to bind thisobject to the context..

put the follwing code in the init() of your controller after declaring the object;

wdcontext.node<...>.bind(eInput);

Ankita