NutzCN Logo
问答 启动时报类型转换错误 是配置文件的错误吗
发布于 3264天前 作者 leecardo 2727 次浏览 复制 上一个帖子 下一个帖子
标签: maven

错误代码
java.lang.ClassCastException: org.nutz.mvc.NutFilter cannot be cast to javax.servlet.Filter
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:107)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4656)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5309)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
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)
--------------------------------------------------
配置文件

JiujiuMVCFilter
org.nutz.mvc.NutFilter

modules
org.jiujiu.MainModule


ignore

^(.+[.])(jsp|png|gif|jpg|js|css|jspx|jpeg|html)$



exclusions
/monitoring

<filter-mapping>
    <filter-name>JiujiuMVCFilter</filter-name>
    <url-pattern>*.do</url-pattern>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>FORWARD</dispatcher>
</filter-mapping>
3 回复


JiujiuMVCFilter
org.nutz.mvc.NutFilter

modules
org.jiujiu.MainModule


ignore

^(.+[.])(jsp|png|gif|jpg|js|css|jspx|jpeg|html)$



exclusions
/monitoring


看不出问题在哪啊

maven? servlet-api的依赖的scope改成provided

来自炫酷的 NutzCN

添加回复
请先登陆
回到顶部