org.apache.naming.resources.DirContextURLConnection.getInputStream中的java.io.FileNotFoundException

时间:2012-01-30 18:09:25

标签: java servlets jsf-2

我正在使用JSF 2.0,tomcat 7.0,eclipse 3.0。直到几天前,我的网络应用程序运行良好。当我启动并尝试登录时,servlet会抛出此错误:

SEVERE: Servlet.service() for servlet [Faces Servlet] in context with path [/app] threw exception
java.io.FileNotFoundException
    at org.apache.naming.resources.DirContextURLConnection.getInputStream(DirContextURLConnection.java:381)
    at com.sun.faces.facelets.impl.DefaultFaceletCache._getLastModified(DefaultFaceletCache.java:161)
    at com.sun.faces.facelets.impl.DefaultFaceletCache.access$000(DefaultFaceletCache.java:62)
    at com.sun.faces.facelets.impl.DefaultFaceletCache$1.newInstance(DefaultFaceletCache.java:82)
    at com.sun.faces.facelets.impl.DefaultFaceletCache$1.newInstance(DefaultFaceletCache.java:79)
    at com.sun.faces.util.ExpiringConcurrentCache$1.call(ExpiringConcurrentCache.java:99)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at com.sun.faces.util.ExpiringConcurrentCache.get(ExpiringConcurrentCache.java:114)
    at com.sun.faces.facelets.impl.DefaultFaceletCache.getFacelet(DefaultFaceletCache.java:119)
    at com.sun.faces.facelets.impl.DefaultFaceletCache.getFacelet(DefaultFaceletCache.java:62)
    at com.sun.faces.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:248)
    at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:366)
    at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:346)
    at com.sun.faces.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:199)
    at com.sun.faces.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:155)
    at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93)
    at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:82)
    at com.sun.faces.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:152)
    at com.sun.faces.application.view.FaceletViewHandlingStrategy.buildView(FaceletViewHandlingStrategy.java:744)
    at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:100)
    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:509)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at php.java.servlet.PhpCGIFilter.doFilter(PhpCGIFilter.java:126)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:242)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at my.filters.authfilter.doFilter(authfilter.java:55)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:242)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:203)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:108)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:558)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:379)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:242)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:259)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:281)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)

我不知道它在找什么文件。关于如何调试这个的任何想法?感谢。

2 个答案:

答案 0 :(得分:0)

我发现了few similar个帖子,他们似乎都指出了web.xml中的配置问题。

我会从调试开始。

答案 1 :(得分:0)

没关系,通过精心遍历每个文件关联找到它。原来缺少UI文件调用的模板文件。如果有更好的方法来找到这些丢失的文件,我很想知道。感谢。