Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

  1. ,
    Expert tip

    Thrown by String methods to indicate that an index is either negative or greater than the size of the string. For some methods such as the charAt method, this exception also is thrown when the index is equal to the size of the string.

  2. ,
    via oracle.com by Unknown author

    Thrown by String methods to indicate that an index is either negative or greater than the size of the string. For some methods such as the charAt method, this exception also is thrown when the index is equal to the size of the string.

Solutions on the web

via GitHub by arvindsv
, 1 year ago
via Google Groups by Unknown author, 1 year ago
via GitHub by tomzo
, 1 year ago
String index out of range: -4
via Google Groups by Moritz Lenz, 1 year ago
via Google Groups by Gerd Katzenbeisser, 1 year ago
String index out of range: -4
java.lang.StringIndexOutOfBoundsException: String index out of range: -4 at java.lang.String.charAt(Unknown Source) at org.bouncycastle.util.encoders.Base64Encoder.decode(Unknown Source) at org.bouncycastle.util.encoders.Base64.decode(Unknown Source) at org.bouncycastle.util.io.pem.PemReader.loadObject(Unknown Source) at org.bouncycastle.util.io.pem.PemReader.readPemObject(Unknown Source) at com.thoughtworks.go.security.Registration.fromJson(Registration.java:49) at com.thoughtworks.go.agent.service.SslInfrastructureService$RemoteRegistrationRequester.readResponse(SslInfrastructureService.java:202) at com.thoughtworks.go.agent.service.SslInfrastructureService$RemoteRegistrationRequester.requestRegistration(SslInfrastructureService.java:195) at com.thoughtworks.go.agent.service.SslInfrastructureService.register(SslInfrastructureService.java:110) at com.thoughtworks.go.agent.service.SslInfrastructureService.registerIfNecessary(SslInfrastructureService.java:94) at com.thoughtworks.go.agent.AgentController.rpcLoop(AgentController.java:173) at com.thoughtworks.go.agent.AgentController.loop(AgentController.java:165) at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source)