Maven+Struts2+Spring+ibatis整合后Maven启动报错

月下浮云 2013-06-18 04:20:24
在Myeclipse中用Maven新建了个Web项目,整合了Struts2,Spring和Ibatis
用mvn clean install 命令执行后没有问题
再用mvnDebug jetty:run 命令执行后,报错了
Unable to load configuration. - package - file:/F:/Workspaces/HIP_WEBsite/target/classes/struts.xml:7:61
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:69)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:371)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:415)
at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:69)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:51

Caused by: The package name 'web' at location package - file:/F:/Workspaces/HIP_WEBsite/target/classes/struts.xml:7:61 is a
lready been used by another package at location package - file:/F:/Workspaces/HIP_WEBsite/src/main/webapp/WEB-INF/classes/s
truts.xml:7:61 - package - file:/F:/Workspaces/HIP_WEBsite/target/classes/struts.xml:7:61



struts.xml如下
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.1//EN" "http://struts.apache.org/dtds/struts-2.1.dtd">
<struts>
<constant name="struts.devMode" value="true" />
<constant name="struts.multipart.maxSize" value="10737418240" />
<constant name="struts.action.extension" value="action" />
<package name="web" extends="struts-default" namespace="/">
<interceptors>
<interceptor-stack name="statck">
<interceptor-ref name="autowiring" />
<interceptor-ref name="defaultStack" />
</interceptor-stack>
</interceptors>
<default-interceptor-ref name="statck" />
</package>
<include file="com/jzspark/web/utils/struts/struts-*.xml" />
</struts>


求大牛帮找出问题
...全文
63 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

24,923

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 Apache
社区管理员
  • Apache
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧