java.lang.StringIndexOutOfBoundsException: String index out of range: 3

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

Do you know how to solve this issue? Write a tip to help other users and build your expert profile.

Solutions on the web

via Oracle Community by 573663, 1 year ago
String index out of range: 0
via GitHub by pbludov
, 2 years ago
String index out of range: 1
via Oracle Community by 1062724, 1 year ago
via Oracle Community by 807596, 1 year ago
via Oracle Community by 800308, 1 month ago
java.lang.StringIndexOutOfBoundsException: String index out of range: 3
at java.lang.String.charAt(String.java:694)
at java.util.regex.Matcher.appendReplacement(Matcher.java:723)
at com.gargoylesoftware.htmlunit.javascript.regexp.HtmlUnitRegExpProxy.doAction(HtmlUnitRegExpProxy.java:96)
at net.sourceforge.htmlunit.corejs.javascript.NativeString.execIdCall(NativeString.java:388)
at net.sourceforge.htmlunit.corejs.javascript.IdFunctionObject.call(IdFunctionObject.java:129)
at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1688)
at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:845)
at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3130)
at com.gargoylesoftware.htmlunit.javascript.host.EventHandler.call(EventHandler.java:80)
at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:484)
at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$4.doRun(JavaScriptEngine.java:449)
at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:537)
at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:456)
at com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptFunctionIfPossible(HtmlPage.java:892)
at com.gargoylesoftware.htmlunit.javascript.host.EventListenersContainer.executeEventHandler(EventListenersContainer.java:182)
at com.gargoylesoftware.htmlunit.javascript.host.EventListenersContainer.executeBubblingListeners(EventListenersContainer.java:201)
at com.gargoylesoftware.htmlunit.javascript.host.Node.fireEvent(Node.java:655)
at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:537)
at com.gargoylesoftware.htmlunit.html.HtmlElement.fireEvent(HtmlElement.java:893)
at com.gargoylesoftware.htmlunit.html.HtmlPage.executeEventHandlersIfNeeded(HtmlPage.java:1106)
at com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:189)
at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:421)
at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:297)
at undefined.HtmlUnitTest.testTemplates(HtmlUnitTest.java:36)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99)
at org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81)
at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
at org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
at org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
at org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:66)
at org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35)
at org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)

Users with the same issue

6 times, 10 months ago
Samebug visitor profile picture
Unknown user
Once, 1 week ago
Once, 2 weeks ago
Once, 2 weeks ago
3 times, 1 month ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.