Glactus
asked on
Java Agent
Hi,
I am using a java agent to send some documents to third party. The problem is the agent runs on varoius fields of the document and checks their values, in one field there are two values and the agent just runs for the first one and do no enters itno second and gives
" Array Index Out of range:1 "
I am pasting a part of code:
Please find the Java Console result also:
count 1
msg2-------->for starts here
msg2-------->x is 1
---1---
---2---
---3---
txt.getValueLength()14
Text:Chad Fuhrman
1: Chad Fuhrman
---3---Text=Text
---3---else start x-1 is 0
---3---else Text=Chad Fuhrman
---4---
---5---
---6---
msg20001026620000000000000 4289+ 18142 IT000075CChad Fuhrman Arthur Thomas/Electrolux 2011-03-21
msg2-------->x is 2
---1---
---2---
---3---
txt.getValueLength()14
Text:C
1: Chad Fuhrman
---3---Text=Text
---3---else start x-1 is 1
Java Exception: Array index out of range: 1
count 2
msg2-------->for starts here
msg2-------->x is 1
---1---
---2---
---3---
txt.getValueLength()14
Text:Chad Furman
1: Chad Furman
---3---Text=Text
---3---else start x-1 is 0
---3---else Text=Chad Furman
---4---
---5---
---6---
msg20001026620000000000000 3049+ 18142 IT000075CChad Furman Arthur Thomas/Electrolux 2011-03-27
msg2-------->x is 2
---1---
---2---
---3---
txt.getValueLength()14
Text:C
1: Chad Furman
---3---Text=Text
---3---else start x-1 is 1
Java Exception: Array index out of range: 1
Please Assist
I am using a java agent to send some documents to third party. The problem is the agent runs on varoius fields of the document and checks their values, in one field there are two values and the agent just runs for the first one and do no enters itno second and gives
" Array Index Out of range:1 "
I am pasting a part of code:
Vector sM = expdoc.getItemValue("Text");
for (int i=0; i<sM.size(); i++)
System.out.println((i+1) + ": " + sM.elementAt(i));
Please find the Java Console result also:
count 1
msg2-------->for starts here
msg2-------->x is 1
---1---
---2---
---3---
txt.getValueLength()14
Text:Chad Fuhrman
1: Chad Fuhrman
---3---Text=Text
---3---else start x-1 is 0
---3---else Text=Chad Fuhrman
---4---
---5---
---6---
msg20001026620000000000000
msg2-------->x is 2
---1---
---2---
---3---
txt.getValueLength()14
Text:C
1: Chad Fuhrman
---3---Text=Text
---3---else start x-1 is 1
Java Exception: Array index out of range: 1
count 2
msg2-------->for starts here
msg2-------->x is 1
---1---
---2---
---3---
txt.getValueLength()14
Text:Chad Furman
1: Chad Furman
---3---Text=Text
---3---else start x-1 is 0
---3---else Text=Chad Furman
---4---
---5---
---6---
msg20001026620000000000000
msg2-------->x is 2
---1---
---2---
---3---
txt.getValueLength()14
Text:C
1: Chad Furman
---3---Text=Text
---3---else start x-1 is 1
Java Exception: Array index out of range: 1
Please Assist
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER