?
Solved

Java Agent

Posted on 2011-05-09
2
Medium Priority
?
482 Views
Last Modified: 2013-12-18
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
0
Comment
Question by:Glactus
2 Comments
 
LVL 46

Accepted Solution

by:
Sjef Bosman earned 1500 total points
ID: 35726653
The snippet you posted doesn't explain the debug output you posted as well, so drawing conclusions based only on the info above is dangerous.

What I see is the line with
1: Chad Furman
and there is more output, so I doubt that the error comes from the loop you posted.

Can we have more code please, maestro?
0
 

Author Closing Comment

by:Glactus
ID: 35963887
As the code was full but the error was not totally in Chad Furman but in the text field of teh document,
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
Screencast - Getting to Know the Pipeline
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question