cancel
Showing results for 
Search instead for 
Did you mean: 

EP server is getting restarted becauses of Web Dynpro java code

Former Member
0 Kudos

Hi All,

Node strucure is

-->Prospect(Value Node)

-->Opportunity(Value Node)

--> Opportunity ID(Value attr)

-->ProspectID(Value attr)

-->Prospect Name(Value Attr)

		int nProspectOppNodeSize = wdContext.nodeZopportunity().size();
		IPrivateStaffingView.IProspectNodeElement eleProspect;
		IPrivateStaffingView.IOpportunityNodeElement eleOpportunity;
		wdContext.nodeZopportunity().moveFirst();
		for(int i=0;i<nProspectOppNodeSize;i++)
		{
			eleProspect = wdContext.nodeProspectNode().createProspectNodeElement();
			wdContext.nodeProspectNode().addElement(eleProspect);
			eleProspect.setProspectID(wdContext.currentZopportunityElement().getProspect_Id());
			eleProspect.setProspectName(wdContext.currentZopportunityElement().getProspect_Name());
			
			String strCurrentProspectID =  wdContext.currentZopportunityElement().getProspect_Id();
			while(strCurrentProspectID.equalsIgnoreCase(wdContext.currentZopportunityElement().getProspect_Id()))
			{
				eleOpportunity = wdContext.nodeOpportunityNode().createOpportunityNodeElement();
				wdContext.nodeOpportunityNode().addElement(eleOpportunity);
				eleOpportunity.setOpportunityID(wdContext.currentOpportunityNodeElement().getOpportunityID());
			wdContext.nodeZopportunity().moveNext();
			}
			wdContext.nodeZopportunity().moveNext();
		}

	wdContext.nodeZopportunity().moveFirst();
	int nProspect = -1;
	for(int i=0; i<wdContext.nodeZopportunity().size(); i++)
	{
		if(wdContext.currentDisplReq_Zsr_MasterElement().getProspect_Id().equalsIgnoreCase(wdContext.currentProspectNodeElement().getProspectID()))
		{
			nProspect = i;
		}
		wdContext.nodeProspectNode().moveNext();
	}
	wdContext.nodeProspectNode().moveTo(nProspect);

Please help

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi ,

WD code cant restart your java engine.. It might be that your code is running in infinite loops eating up heaps of memory..

Check this line..

for(int i=0; i

<b>><</b>

wdContext.nodeZopportunity().size(); i++)

Regards

Bharathwaj

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello,

I think the problem is that you are not controlling the end of this bucle:

String strCurrentProspectID = wdContext.currentZopportunityElement().getProspect_Id();

while(strCurrentProspectID .equalsIgnoreCase(wdContext

.currentZopportunityElement().getProspect_Id()))

{ ...

wdContext.nodeZopportunity().moveNext();

}

you can do something like:

int count = 0;

int num_ele = number of elements of node Zopportunity

while (<b>count<num_ele</b> && strCurrentProspectID .equalsIgnoreCase(wdContext

.currentZopportunityElement().getProspect_Id()))

{

...

wdContext.nodeZopportunity().moveNext();

<b>count++;</b>

}

Former Member
0 Kudos

Hello,

I think the problem is that you are not controlling the end of this bucle:

String strCurrentProspectID = wdContext.currentZopportunityElement().getProspect_Id();

while(strCurrentProspectID .equalsIgnoreCase(wdContext

.currentZopportunityElement().getProspect_Id()))

{ ...

wdContext.nodeZopportunity().moveNext();

}

you can do something like:

int count = 0;

int num_ele = number of elements of node Zopportunity

while (<b>count<num_ele</b> && strCurrentProspectID .equalsIgnoreCase(wdContext

.currentZopportunityElement().getProspect_Id()))

{

...

wdContext.nodeZopportunity().moveNext();

count++;

}