找不到Tomcat 8.5 ServletException JSP文件(但那里是100%)

时间:2018-08-07 18:08:32

标签: java spring-mvc jsp tomcat8 spring-webflow

我正在对Tomcat 8.5.x中的一个问题进行疑难解答。 此问题仅影响一个部署(DEV服务器);完全相同的源和配置可在其他地方完美运行。

这是示例堆栈跟踪(完整):

ERROR [uP-PortletExec-199-pr015-RENDER-[portlet-admin]] o.s.web.portlet.DispatcherPortlet 2018-08-07 08:18:44,738 - Could not complete request
org.springframework.webflow.execution.FlowExecutionException: Exception thrown in state 'listChannels' of flow 'portlet-manager'
    at org.springframework.webflow.engine.impl.FlowExecutionImpl.wrap(FlowExecutionImpl.java:573)
    at org.springframework.webflow.engine.impl.FlowExecutionImpl.start(FlowExecutionImpl.java:227)
    at org.springframework.webflow.executor.FlowExecutorImpl.launchExecution(FlowExecutorImpl.java:140)
    at org.springframework.webflow.mvc.portlet.FlowHandlerAdapter.startFlowRender(FlowHandlerAdapter.java:272)
    at org.springframework.webflow.mvc.portlet.FlowHandlerAdapter.handleRender(FlowHandlerAdapter.java:134)
    at org.springframework.web.portlet.DispatcherPortlet.doRenderService(DispatcherPortlet.java:764)
    at org.springframework.web.portlet.FrameworkPortlet.processRequest(FrameworkPortlet.java:537)
    at org.springframework.web.portlet.FrameworkPortlet.doDispatch(FrameworkPortlet.java:483)
    at javax.portlet.GenericPortlet.render(GenericPortlet.java:251)
    at org.apereo.portal.portlet.container.FilterChainImpl.doFilter(FilterChainImpl.java:179)
    at org.apereo.portal.portlet.container.FilterChainImpl.processFilter(FilterChainImpl.java:95)
    at org.apereo.portal.portlet.container.FilterManagerImpl.processFilter(FilterManagerImpl.java:114)
    at org.apache.pluto.container.driver.PortletServlet.dispatch(PortletServlet.java:340)
    at org.apache.pluto.container.driver.PortletServlet.doGet(PortletServlet.java:261)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:635)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:728)
    at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:591)
    at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:527)
    at org.apache.pluto.driver.container.DefaultPortletInvokerService.invoke(DefaultPortletInvokerService.java:233)
    at org.apache.pluto.driver.container.DefaultPortletInvokerService.render(DefaultPortletInvokerService.java:117)
    at sun.reflect.GeneratedMethodAccessor283.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
    at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:85)
    at org.apereo.portal.portlet.dao.jpa.ThreadContextClassLoaderAspect.doThreadContextClassLoaderUpdate(ThreadContextClassLoaderAspect.java:63)
    at sun.reflect.GeneratedMethodAccessor181.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:629)
    at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:618)
    at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
    at com.sun.proxy.$Proxy356.render(Unknown Source)
    at org.apache.pluto.container.impl.PortletContainerImpl.doRender(PortletContainerImpl.java:157)
    at org.apereo.portal.portlet.rendering.PortletRendererImpl.doRender(PortletRendererImpl.java:456)
    at org.apereo.portal.portlet.rendering.PortletRendererImpl.doRenderMarkup(PortletRendererImpl.java:275)
    at org.apereo.portal.portlet.rendering.worker.PortletRenderExecutionWorker.callInternal(PortletRenderExecutionWorker.java:69)
    at org.apereo.portal.portlet.rendering.worker.PortletRenderExecutionWorker.callInternal(PortletRenderExecutionWorker.java:33)
    at org.apereo.portal.portlet.rendering.worker.PortletExecutionWorker$1.call(PortletExecutionWorker.java:185)
    at org.apereo.portal.portlet.rendering.worker.PortletExecutionWorker$ExecutionLifecycleCallable.call(PortletExecutionWorker.java:225)
    at org.apereo.portal.portlet.rendering.worker.PortletExecutionCallable.call(PortletExecutionCallable.java:113)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalStateException: Exception occurred rendering view org.springframework.web.servlet.view.JstlView: unnamed; URL [/WEB-INF/flows/portlet-mana
ger/listChannels.jsp]
    at org.springframework.webflow.mvc.view.AbstractMvcView.render(AbstractMvcView.java:208)
    at org.springframework.webflow.engine.ViewState.render(ViewState.java:293)
    at org.springframework.webflow.engine.ViewState.doEnter(ViewState.java:185)
    at org.springframework.webflow.engine.State.enter(State.java:194)
    at org.springframework.webflow.engine.Flow.start(Flow.java:527)
    at org.springframework.webflow.engine.impl.FlowExecutionImpl.start(FlowExecutionImpl.java:368)
    at org.springframework.webflow.engine.impl.FlowExecutionImpl.start(FlowExecutionImpl.java:223)
    ... 52 common frames omitted
Caused by: javax.portlet.PortletException: javax.servlet.ServletException: File [/WEB-INF/flows/portlet-manager/listChannels.jsp] not found
    at org.apache.pluto.container.impl.PortletRequestDispatcherImpl.doDispatch(PortletRequestDispatcherImpl.java:187)
    at org.apache.pluto.container.impl.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:222)
    at org.springframework.webflow.mvc.portlet.PortletMvcView.doRender(PortletMvcView.java:67)
    at org.springframework.webflow.mvc.view.AbstractMvcView.render(AbstractMvcView.java:204)
    ... 58 common frames omitted
Caused by: javax.servlet.ServletException: File [/WEB-INF/flows/portlet-manager/listChannels.jsp] not found
    at org.apache.jasper.servlet.JspServlet.handleMissingResource(JspServlet.java:408)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:388)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:330)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:728)
    at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:591)
    at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:527)
    at org.apache.pluto.container.impl.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:268)
    at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:160)
    at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:303)
    at org.springframework.web.servlet.ViewRendererServlet.renderView(ViewRendererServlet.java:114)
    at org.springframework.web.servlet.ViewRendererServlet.processRequest(ViewRendererServlet.java:86)
    at org.springframework.web.servlet.ViewRendererServlet.doGet(ViewRendererServlet.java:66)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:635)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:728)
    at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:591)
    at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:527)
    at org.apache.pluto.container.impl.PortletRequestDispatcherImpl.doDispatch(PortletRequestDispatcherImpl.java:174)
    ... 61 common frames omitted

一些其他要点:

  • 该文件-/WEB-INF/flows/portlet-manager/listChannels.jsp-正确存在该文件的位置100%。
  • 此堆栈跟踪只是一个示例;对于在同一Web应用程序中调用的每个JSP文件,我都遇到类似的错误
  • 其他Web应用程序不受影响;他们的JSP似乎可以正常工作

有人见过类似这个问题吗?谁能想到其他要检查的东西?

2 个答案:

答案 0 :(得分:1)

可能是文件所有权问题。试试:

  

找到[tomcat_home]-! -user [expected_owner] -ls

应显示[expected_owner]不拥有的所有文件。

如果找到了一些不属于用户的文件,请尝试:

  

sudo chown -R [expected_owner]:[expected_group] [tomcat_home]

答案 1 :(得分:1)

我认为我们应该关注此消息

Caused by: javax.servlet.ServletException: File [/WEB-INF/flows/portlet-manager/listChannels.jsp] not found

为什么文件具有前缀/WEB-INF/flows/portlet-manager/

我猜这是因为您返回的是这样的空字符串:

return ""