2 qq 39817945 qq_39817945 于 2017.09.15 14:11 提问

严重: Exception starting filter struts2

架包架包

web.xml :

图片说明
图片说明

struts.xml:

图片说明

Spring-mybatis.xml:

图片说明
图片说明

严重: Exception starting filter struts2
Unable to load configuration. - bean - jar:file:/D:/Program/ApacheSoftwareFoundation/Tomcat7.0/webapps/stt/WEB-INF/lib/struts2-core-2.3.24.jar!/struts-default.xml:90:87
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:493)
at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:193)
at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:105)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4958)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5652)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1260)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:2002)
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)
Caused by: Unable to load configuration. - bean - jar:file:/D:/Program/ApacheSoftwareFoundation/Tomcat7.0/webapps/stt/WEB-INF/lib/struts2-core-2.3.24.jar!/struts-default.xml:90:87
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:70)
at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:967)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:435)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:479)
... 17 more

第一次使用Struts2+Spring+mybatis框架,启动Tomcat 7.0时一直报错,求大神指点

2个回答

lmmzsn
lmmzsn   2017.09.15 14:21
已采纳

根据你的错误提示:Caused by: java.lang.ClassNotFoundException: freemarker.cache.TemplateLoader,可以判断你是确少了TemplateLoader这个class文件导致的。
而这个文件是在freemarker的jar包里的。
我看你导入的jar包里也没有freemaker相关的。
你可以在eclipse里按CTRL+Shift+T,然后输入TemplateLoader,看看有没有这样的文件

qq_39817945
qq_39817945 果然是少了freemarker这个架包
2 个月之前 回复
lmmzsn
lmmzsn 回复zezr: 那个log你应该多贴一点出来,一般的最根本原因在最下面。
2 个月之前 回复
qq_39817945
qq_39817945 有三个TemplateLoader,有两个是接口的图标:freemarker.cache-D:\myeclipse11\stu2\webRoot\WEB-INF\lib\freemaker-2.3.22jar
2 个月之前 回复
a179952270
a179952270   2017.09.15 14:23

1 : 路径问题... file:/D:/Program%20Files/Apache%20Software%20Foundati
2: 缺少包.支官网下载全包

Csdn user default icon
上传中...
上传图片
插入图片