Getting a Java.Lang.STRINGOUTOFBOUNDS message

Posted on 2006-04-27
Last Modified: 2007-12-19
This should be a quicky, as it's not a program I'm writing, I just need some information ...

I work on a Payroll system & we have to return Year End P35 & P14 information to the Inland Revenue. Last year we did this electronically for the first time ... this year, the IR & our software suppliers have made numerous changes, resulting in ...

... my Payroll Manager just trying to send the files to the Inland Revenue via a dedicated link, but getting an error message (I took this down over a crackly mobile to mobile call so may not be exact regarding spacing & casing !) :

Java.Lang.STRINGINDEXOUTOFBOUNDS: Exception String Index Out Of Range: 9

Is this likely to be caused by an error in our data, a possible mis-match in the Java versions being used by us & the Inland Revenue, or is there really no way of knowing and we need to get back to the vendors ?!?!?

Any help appreciated ...
Question by:vodkasoda
    LVL 15

    Accepted Solution

    I'd get back to the vendors.

    That sounds like a JAVA problem, not JAVASCRIPT. But we're all programmers and this sounds like a pretty generic problem, so no biggie. ;)

    I'd say that 1 of 2 things likely happened:

    1. You needed to use at least a 10 character string (a string just means text)
         10 characters and not 9 because the first character starts at index 0, not index 1. So the 9th index is the 10th character :)

    - or -

    2. Their program doesn't handle the length of your input string correctly

    Either way, it's their fault most likely and even if your input wasn't long enough, their program should still handle that error and tell you that it needs to be longer.


    Author Comment

    Brilliant, thanks dbritt, it was exactly that ... my FTP from Mainframe to PC needed a NOTRUNC command so as not to lose trailing spaces.
    LVL 15

    Expert Comment

    Any time :)

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    In Part 1 ( we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
    This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
    The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
    The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

    728 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

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now