cancel
Showing results for 
Search instead for 
Did you mean: 

JCO RESOURECE ERROR

Former Member
0 Kudos

JCO_ERROR_RESOURCE: Trying to access row values in a table which does not have any rows yet

what i did is to get the result from the arraylist

returnAckList.size() return 2

and after that i set the row and pass back the result to R3 with Table parameters

i hit the error above

ANY IDEA...

ArrayList returnAckList=sendMail.sendAuthenticate(bean,beanList2,configList,Conte);

if(returnAckList.size()>0){

int k=0;

for(Iterator it=returnAckList.iterator();it.hasNext();){

OutMailAckBean ack=(OutMailAckBean)it.next();

System.err.println("k" +k);

result.setRow(k);

result.getField("MAILID").setValue(ack.getEmailId());

result.getField("ARDDR").setValue(ack.getReceipient());

result.getField("STATUS").setValue(ack.getAckDelivery());

result.getField("MADAT").setValue(ack.getDateSend().substring(0,10));

result.getField("MATIM").setValue(ack.getDateSend().substring(11,19));

k++;

System.err.println("Ack Row " +k +":" +" mailid: " +" ARDDR: " +result.getField("ARDDR").getString()

" status: "result.getField("STATUS").getString() +" type: " +result.getField("TTYPE").getString()

" MADAT: "result.getField("MADAT").getString() " MATIM: "result.getField("MATIM").getString());

}

}else{

System.err.println("AckList is empty!!!!!!!!");

}

Message was edited by:

yzme yzme

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Yzme,

From the error message, what I can make out is that you are trying to manipulate row elements in a JCo table that doesn't have any rows yet.

Instead of changing the row pointer, try adding rows to the table first and then set the values.


ArrayList returnAckList=sendMail.sendAuthenticate(bean,beanList2,configList,Conte);

if(returnAckList.size()>0){
int k=0;
for(Iterator it=returnAckList.iterator();it.hasNext();){
OutMailAckBean ack=(OutMailAckBean)it.next();
System.err.println("k" +k);
// result.setRow(k);
/* Instead of this line of code add the appendRow statement. 
I assume variable result is of type JCo.Table*/

<b>result.appendRow();</b>

result.getField("MAILID").setValue(ack.getEmailId());
result.getField("ARDDR").setValue(ack.getReceipient());
result.getField("STATUS").setValue(ack.getAckDelivery());
result.getField("MADAT").setValue(ack.getDateSend().substring(0,10));
result.getField("MATIM").setValue(ack.getDateSend().substring(11,19));
k++;

System.err.println("Ack Row " +k +":" +" mailid: " +" ARDDR: " +result.getField("ARDDR").getString()
+" status: "+result.getField("STATUS").getString() +" type: " +result.getField("TTYPE").getString()
+" MADAT: "+result.getField("MADAT").getString() +" MATIM: "+result.getField("MATIM").getString());
}
}else{
System.err.println("AckList is empty!!!!!!!!");
}

If my understanding is wrong, then please elaborate the problem.

Bala

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi, yzme.

Is this reproducible always?

If not, this might be tuning problem.

http://help.sap.com/saphelp_nw2004s/helpdata/en/f6/daea401675752ae10000000a155106/frameset.htm

This help.sap.com says like the following.

-


JCO_ERROR_RESOURCE

Indicates that JCO has run out of resources such as connections

in a connection pool

Read the exception text and check the JAVA application

-


Try once again with enough JCo connection parameters.

Best Regards.

Sejoon