New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

activeweb fix #2118

Merged
merged 1 commit into from Jun 26, 2016

Conversation

Projects
None yet
2 participants
@knewmanTE
Contributor

knewmanTE commented Jun 22, 2016

The update and queries tests for activeweb were breaking, throwing the following error:

org.javalite.templator.TemplateException: java.lang.StringIndexOutOfBoundsException: String index out of range: -1; java.lang.StringIndexOutOfBoundsException: String index out of range: -1

This may be indicative of a larger issue with the javalite template rendering engine, but in the meantime, adding a space to the beginning of the queries template seems to fix the problem.

Full stack trace for the exception:

org.javalite.activeweb.ViewException: org.javalite.templator.TemplateException: java.lang.StringIndexOutOfBoundsException: String index out of range: -1; java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    at org.javalite.activeweb.RenderTemplateResponse.doProcess(RenderTemplateResponse.java:91)
    at org.javalite.activeweb.ControllerResponse.process(ControllerResponse.java:64)
    at org.javalite.activeweb.ControllerRunner.renderResponse(ControllerRunner.java:141)
    at org.javalite.activeweb.ControllerRunner.run(ControllerRunner.java:73)
    at org.javalite.activeweb.RequestDispatcher.doFilter(RequestDispatcher.java:202)
    at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:89)
    at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:156)
    at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:289)
    at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:838)
    at com.caucho.network.listen.TcpSocketLink.dispatchRequest(TcpSocketLink.java:1348)
    at com.caucho.network.listen.TcpSocketLink.handleRequest(TcpSocketLink.java:1304)
    at com.caucho.network.listen.TcpSocketLink.handleRequestsImpl(TcpSocketLink.java:1288)
    at com.caucho.network.listen.TcpSocketLink.handleRequests(TcpSocketLink.java:1196)
    at com.caucho.network.listen.TcpSocketLink.handleAcceptTaskImpl(TcpSocketLink.java:993)
    at com.caucho.network.listen.ConnectionTask.runThread(ConnectionTask.java:117)
    at com.caucho.network.listen.ConnectionTask.run(ConnectionTask.java:93)
    at com.caucho.network.listen.SocketLinkThreadLauncher.handleTasks(SocketLinkThreadLauncher.java:169)
    at com.caucho.network.listen.TcpSocketAcceptThread.run(TcpSocketAcceptThread.java:61)
    at com.caucho.env.thread2.ResinThread2.runTasks(ResinThread2.java:173)
    at com.caucho.env.thread2.ResinThread2.run(ResinThread2.java:118)
Caused by: org.javalite.templator.TemplateException: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    at org.javalite.templator.Template.<init>(Template.java:24)
    at org.javalite.activeweb.templator.TemplatorManager.merge(TemplatorManager.java:29)
    at org.javalite.activeweb.RenderTemplateResponse.doProcess(RenderTemplateResponse.java:82)
    ... 19 more
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    at java.lang.String.substring(String.java:1960)
    at org.javalite.templator.AbstractTag.matchEndTag(AbstractTag.java:124)
    at org.javalite.templator.Template.parse(Template.java:69)
    at org.javalite.templator.Template.<init>(Template.java:20)
    ... 21 more

@nbrady-techempower nbrady-techempower merged commit 26676df into TechEmpower:round-14 Jun 26, 2016

1 check failed

continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details

@knewmanTE knewmanTE deleted the knewmanTE:activeweb-fix branch Sep 15, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment