Open GoogleCodeExporter opened 9 years ago
The underlying problem can also cause an exception when getServletPath() is
called.
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1949)
at
com.google.inject.servlet.UriPatternType$RegexUriPatternMatcher.extractPath(UriP
atternType.java:116)
at com.google.inject.servlet.ServletDefinition$2.computePath(ServletDefinition.java:204)
at
com.google.inject.servlet.ServletDefinition$2.getServletPath(ServletDefinition.j
ava:190)
at com.google.foo.bar.SomeServlet.doGet(ShortLaunchUrlServlet.java:43)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:216)
at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:141)
at
com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.
java:93)
at
com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.j
ava:63)
at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:134)
at
com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.j
ava:59)
at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:134)
at
com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.j
ava:59)
at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:134)
at
com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.j
ava:59)
at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:134)
at
com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.j
ava:59)
at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:134)
at
com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.j
ava:59)
at com.google.someFilter.doFilter(LaunchCalModule.java:527)
at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:129)
at
com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.j
ava:59)
at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:134)
at
com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.j
ava:59)
at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:134)
at
com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.j
ava:59)
at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:134)
at
com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.j
ava:59)
at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:134)
at
com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.j
ava:59)
at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:134)
at
com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.j
ava:59)
at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:134)
at
com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.j
ava:59)
at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:134)
at
com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.j
ava:59)
at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:134)
at
com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.j
ava:59)
at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:134)
at
com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.j
ava:59)
at
com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.j
ava:122)
at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:110)
The servlet in question was registered with the following regex:
"^/((?:index\\.php/)?something/view/)?(\\d+)$"
and the request was of the form http://server/1234
Original comment by grandche...@gmail.com
on 22 May 2009 at 12:20
Dhanji, could you take a look into this? I think it's an easy fix...
Original comment by limpbizkit
on 22 Jun 2009 at 2:22
Yep I'll patch this shortly.
Original comment by dha...@gmail.com
on 22 Jun 2009 at 11:38
Has this patch been lost? I am seeing the same issue as mentioned in comment #1
for the regexp "^/(?!(css|img|js)).*" (with Guice 3.0).
Original comment by th...@ginkel.com
on 24 May 2012 at 9:51
Same for "/api/auth(/.*[^(\\.jsp)])?$"
(with Guice 3.0)
Original comment by rod...@alukhanov.ru
on 28 Jan 2013 at 12:50
Original issue reported on code.google.com by
limpbizkit
on 21 May 2009 at 11:31