java.lang.ClassNotFoundException: org.apache.struts2.dispatcher.FilterDispatcher

本文介绍了一个简单的 Struts2 应用在部署后出现 FilterDispatcher 找不到的异常情况。通过检查 web-INF/lib 文件夹中的 jar 包,最终定位到问题是由外部项目依赖未正确引入导致。
org.apache.struts2.dispatcher.FilterDispatcher not found exception , 建了个简单的struts2 例子, 部署完之后运行报了找不到 filter 类异常 , 问了吴安国之后

定位为 ,jar包问题 , 最后发现tomcat webapp下面的lib里面没有 导入的jar包。


java.lang.ClassNotFoundException: org.apache.struts2.dispatcher.FilterDispatcher

找不到过滤器 , 第一步先看下webINF 下面的lib 文件夹下面的jar包有没有拷贝过来,
现在遇到一个情况就是加的其他项目的jar包引用, 之后把其他项目给关闭了, 导致本项目的
jar考不到 webINF 下面的lib 文件夹下面!!
####|2025-10-12 16:20:42.410|SEVERE|org.apache.catalina.core.StandardContext|_ThreadID=14;_ThreadName=pool-1-thread-3;_RequestID=7063f463-8143-49bd-bff5-2f8102477587;|WEBTIER101270: Exception starting filter struts2Filter java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.Ru ntimeException: java.lang.RuntimeException: com.opensymphony.xwork2.inject.DependencyException: com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException: No mapping found for dependency [type=java.lang.String, name='enabl eOGNLExpressionCache'] in public void com.opensymphony.xwork2.ognl.OgnlUtil.setEnableExpressionCache(java.lang.String). - Class: com.opensymphony.xwork2.inject.ContainerBuilder$4 File: ContainerBuilder.java Method: create Line: 132 - com/opensymphony/xwork2/inject/ContainerBuilder.java:132:-1 at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:501) at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74) at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:57) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:231) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:343) at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:77) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4566) at org.apache.catalina.core.StandardContext.start(StandardContext.java:5452) at com.bes.enterprise.web.WebModule.start(WebModule.java:342) at com.bes.enterprise.web.LifecycleStarter.doRun(LifecycleStarter.java:37) at com.bes.appserv.management.util.misc.RunnableBase.runSync(RunnableBase.java:284) at com.bes.appserv.management.util.misc.RunnableBase._submit(RunnableBase.java:156) at com.bes.appserv.management.util.misc.RunnableBase.submit(RunnableBase.java:172) at com.bes.enterprise.web.VirtualServer.startChildren(VirtualServer.java:1824) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1148) at org.apache.catalina.core.StandardHost.start(StandardHost.java:947) at com.bes.enterprise.web.LifecycleStarter.doRun(LifecycleStarter.java:37) at com.bes.appserv.management.util.misc.RunnableBase.runSync(RunnableBase.java:284) at com.bes.appserv.management.util.misc.RunnableBase.run(RunnableBase.java:321) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) 这个报错是什么含义
10-13
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值