Skip to Content
author's profile photo Former Member
Former Member

getting context exception


I am getting context exception like as Path 'null' does not point to an attribute, but to View(path=AccountComp/AccountHistory,

i created context as

Node --> category

Attribute --> Category.description

Node -->Source

Node--> points

Attribute --> Source.Points.sdate

Attribute -->Source.points.Edate

Attribute --> Source.points.label

and to set the values for the attribute in a loop i created the nodes added the element to it like as

IPublicAccountComp.ICategoryNode dnode = wdContext.nodeCategory();

for (int i = 0; i < CategoryValues.length; i++)


IPublicAccountComp.ICategoryElement cat1 = dnode.createCategoryElement();




for (int i = 0; i < CatLabels.length; i++)

{ IPublicAccountComp.ISourceNode snode = wdContext.nodeSource();

IPublicAccountComp.ISourceElement src= snode.createSourceElement();

IPublicAccountComp.IPointsNode oupt1 = snode.nodePoints();

IPublicAccountComp.IPointsElement pEle = oupt1.createPointsElement();








i dont know where i went wrong would you please help me in this



Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Oct 19, 2011 at 06:33 PM

    You are creating element Source and then creating child element Points before adding the parent element Source first

    You need to create and then add the element before you can add a child node to it

    Hope this explains,


    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 14, 2011 at 05:22 PM


    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.