2006-09-13 09:03:46,902 ERROR [Engine] StandardContext[]Error during
mapping
java.lang.StringIndexOutOfBoundsException: String index out of range:
-18
at java.lang.String.getChars(String.java:724)
at
org.apache.tomcat.util.buf.CharChunk.append(CharChunk.java:353)
at
org.apache.catalina.core.ApplicationContext.getRequestDispatcher(ApplicationContext.java:432)
at
org.apache.catalina.core.ApplicationContextFacade.getRequestDispatcher(ApplicationContextFacade.java:196)
at
org.apache.coyote.tomcat5.CoyoteRequest.getRequestDispatcher(CoyoteRequest.java:1320)
at
org.apache.coyote.tomcat5.CoyoteRequestFacade.getRequestDispatcher(CoyoteRequestFacade.java:388)
at
org.tuckey.web.filters.urlrewrite.RewrittenUrl.getRequestDispatcher(RewrittenUrl.java:241)
at
org.tuckey.web.filters.urlrewrite.RewrittenUrl.doRewrite(RewrittenUrl.java:175)
at
org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:728)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
...
This error is always followed by an error like this:
2006-09-13 09:03:46,903 ERROR [Engine] StandardWrapperValve[default]:
Servlet.service() for servlet default threw exception
javax.servlet.ServletException: unable to get request dispatcher for
/servlet/ViewSiteServlet?OfficeId=850&&CategoryId=14321
at
org.tuckey.web.filters.urlrewrite.RewrittenUrl.getRequestDispatcher(RewrittenUrl.java:244)
at
org.tuckey.web.filters.urlrewrite.RewrittenUrl.doRewrite(RewrittenUrl.java:175)
at
org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:728)
...
Here's the rule with the domain sanitized:
<rule>
<condition name="host" next="or">www\.somedomain\.com</condition>
<condition name="host">somedomain\.com</condition>
<from>^/[^.?]*\??([^.]*)$</from>
<to type="forward"
last="true">/servlet/ViewSiteServlet?OfficeId=850&$1</to>
</rule>
Ther rewrite is working .. but the errors are filling the logs and
possibly hiding other problems that are going on. I was wondering if
anyone else has seen this? If so, what was the resolution?