This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Java in General and the fly likes Array Index out of range issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Array Index out of range issue" Watch "Array Index out of range issue" New topic
Author

Array Index out of range issue

Les Zeb
Greenhorn

Joined: Feb 01, 2011
Posts: 2
Hello:
I have just started learning java to support our production applications...please bear with me if I ask basic questions.
I got an issue in one of our java processes. It failed with an error - Array index out of range: 1
It would be appreciated if you please provide some pointers. Below is the code snippet where its failing:

These are the arguments being passed thru command line - /Folder1/pssmmail/day1 /Folder2/pssmmmail/day1 ImpWebV4
Thanks for any help you could provide.

Mohamed Sanaulla
Saloon Keeper

Joined: Sep 08, 2007
Posts: 3064
    
  33

Welcome to JavaRanch

From where is this method: processArguments() invoked? Please post complete code. Also post the Stacktrace(Exception details) which you are getting.

How are you launching your program? Are you providing some command line arguments when launching the program?


Mohamed Sanaulla | My Blog
Les Zeb
Greenhorn

Joined: Feb 01, 2011
Posts: 2
Thanks!! We are launching this thru shell script and yes we are providing command line arguments which I posted in earlier post.
Please find below the complete code:



Exception details:

Mohamed Sanaulla
Saloon Keeper

Joined: Sep 08, 2007
Posts: 3064
    
  33

Which is the line 186 in ClickFoxEmailScrubProcess.java? Check if getArguments() returns the correct array. Also see if your initialization() method is setting the array passed correctly.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Array Index out of range issue
 
Similar Threads
Command line arguments help.
Sun Cirtification
Counting uppercase? Part 2!
Queue
String array of main