aspose file tools*
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
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: 3071
    
  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: 3071
    
  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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Array Index out of range issue