cancel
Showing results for 
Search instead for 
Did you mean: 

Exception:com.sap.tc.webdynpro.progmodel.context.ContextException: NodeElem

pradeep_kumar5
Active Participant
0 Kudos

Hi Experts,

I am consuming RFC to my webdynpro java application. The rfc takes some input values and returns some output vaules.

In the application I had taken model to my component and mapped ( model --> component --> view ). i created Application and deployed it. it is giving the following Exception.

com.sap.tc.webdynpro.progmodel.context.ContextException: NodeElement(.ComponentOne.Zbapi_Material_Create_Input): model node element cannot be created without a model instance

at com.sap.tc.webdynpro.progmodel.context.ModelNodeElement.<init>(ModelNodeElement.java:63)

at com.sap.demo.sample.wd.comp.componentone.wdp.IPublicComponentOne$IZbapi_Material_Create_InputElement.<init>(IPublicComponentOne.java:357)

at com.sap.demo.sample.wd.comp.componentone.wdp.IPublicComponentOne$IContextNode.doCreateElement(IPublicComponentOne.java:55)

at com.sap.tc.webdynpro.progmodel.context.NodeInfo.createElement(NodeInfo.java:1269)

Here actually it had to display the input screen (default view page )but while loading the starting page it gives the above exception.

I searches lot of forums, but they are related to particular inputfields, but here it is not that scenario, i am not using any fields here just to display the view page. I don't know exactly what was the mistake, Help me please if you know.

Regards,

Pradeep Kumar

Accepted Solutions (1)

Accepted Solutions (1)

junwu
Active Contributor
0 Kudos

can you show the code which the exception occurred.

did you use wizard to generate the code?

Answers (2)

Answers (2)

pradeep_kumar5
Active Participant
0 Kudos

hi,

Here, iam not using any code in view contex, just i mapped model to controller(Right click on component controller --> Apply Template --> select service controller --> select web service --> mapping the attributes --> finish ) and controller to view context (drag and drop navigation link and mapping the attributes), then i created application and deployed, while loading the page itself it gives the Exception.

Any idea..

Regards,

Pradeep Kumar

0 Kudos

Hi Pradeep,

Did you checked that all the requierd code has been genarated or not in component controller?

If you use apply template--> servicee controller some times service controller will not genarate the requierd code.

check in the wdDoInit() method whether the following code has been genarated or not.

if not wirte tht code.

//$$begin Service Controller(17224717)

WSTest model = new WSTest();

wdContext.nodeRequest_EmployeeDeatilsByType().bind(new Request_EmployeeDeatilsByType(model));

//$$end

Revert back if you have any quaries.

Thanks & Regards,

Bhargava.

Former Member
0 Kudos

Hi,

Check in doInit() method of your controller or view, you must have written a code to create element of a model node

The error message that you got states that you are creating an element of a model node without creating the model object

It you have written any code in doInit() method of your controller or view, post the code so that i can check

Or post the generated service controller code

Regards,

Amol

former_member185879
Active Contributor
0 Kudos

Hello Pradeep,

There is a problem in executing the RFC. Can you paste the code you used to execute the RFC.

Check the answer provided by Bala Baskaran.

Regards

Nizamudeen SM