HTTP Status 500 – Internal Server Error


Type 异常报告

消息 Request processing failed; nested exception is java.lang.StringIndexOutOfBoundsException: String index out of range: -39

描述 服务器遇到一个意外的情况,阻止它完成请求。

Exception

org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.StringIndexOutOfBoundsException: String index out of range: -39
	org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:656)
	org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:634)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
	org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
	org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
	com.watercms.common.web.ProcessTimeFilter.doFilter(ProcessTimeFilter.java:38)
	com.watercms.common.web.WebFilter.doFilter(WebFilter.java:45)

Root Cause

java.lang.StringIndexOutOfBoundsException: String index out of range: -39
	java.lang.String.substring(Unknown Source)
	com.watercms.core.web.front.URLHelper.getPageInfo(URLHelper.java:208)
	com.watercms.core.web.front.URLHelper.getPageInfo(URLHelper.java:66)
	com.watercms.cms.action.front.DynamicPageAct.dynamic(DynamicPageAct.java:82)
	sun.reflect.GeneratedMethodAccessor728.invoke(Unknown Source)
	sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	java.lang.reflect.Method.invoke(Unknown Source)
	org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176)
	org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:426)
	org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:414)
	org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790)
	org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
	org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
	org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:634)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
	org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
	org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
	com.watercms.common.web.ProcessTimeFilter.doFilter(ProcessTimeFilter.java:38)
	com.watercms.common.web.WebFilter.doFilter(WebFilter.java:45)

Note 主要问题的全部 stack 信息可以在 server logs 里查看


Apache Tomcat/9.0.21