Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

Array Index out of range issue

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

 
Bartender
Posts: 3225
34
IntelliJ IDE Oracle Spring Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Les Zeb
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Bartender
Posts: 3225
34
IntelliJ IDE Oracle Spring Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 want my playground back. Here, I'll give you this tiny ad for it:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic