Link to home
Start Free TrialLog in
Avatar of Glactus
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:
 
 Vector sM = expdoc.getItemValue("Text");
							        for (int i=0; i<sM.size(); i++)
							          System.out.println((i+1) + ": " + sM.elementAt(i));

Open in new window


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---
msg200010266200000000000004289+       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---
msg200010266200000000000003049+       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
ASKER CERTIFIED SOLUTION
Avatar of Sjef Bosman
Sjef Bosman
Flag of France image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Glactus
Glactus

ASKER

As the code was full but the error was not totally in Chad Furman but in the text field of teh document,