IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

Java service error - String Index out of range

  • 1.  Java service error - String Index out of range

    Posted Tue December 11, 2007 07:05 PM

    we are calling a java service and receiving message embeded in response as
    “String index out of range: -1”
    but the same service when invoked from other servers with same input gives us correct response.
    any ideas please

    thanks,
    mandar.


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 2.  RE: Java service error - String Index out of range

    Posted Tue December 11, 2007 07:14 PM

    One likely possibility is that something is trying to locate a specific character in a string (something other than the input data), and then doing a substring. The find isn’t finding the character and so is returning -1. Then the code isn’t checking that result, and is trying to do a substring of the string. Which fails.

    Search for uses of pub.string:indexOf and/or pub.string:substring to help you zero in on the offending code.


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB