关于struts2的The package name 'abc' at location错误

2 [main] INFO org.mortbay.log - Logging to org.slf4j.impl.SimpleLogger(org.mortbay.log) via org.mortbay.log.Slf4jLog
88 [main] INFO org.mortbay.log - jetty-6.1.6
1228 [main] INFO com.opensymphony.xwork2.config.providers.XmlConfigurationProvider - Parsing configuration file [struts-default.xml]
1402 [main] INFO com.opensymphony.xwork2.config.providers.XmlConfigurationProvider - Parsing configuration file [struts.xml]
1407 [main] WARN org.apache.struts2.config.Settings - Settings: Could not parse struts.locale setting, substituting default VM locale
1797 [main] ERROR org.mortbay.log - failed struts2
The package name 'abc' at location package - file:/media/项目/project/风险系统new/工程/WebRoot/WEB-INF/classes/struts.xml:8:49 is already been used by another package at location package - file:/media/%e9%a1%b9%e7%9b%ae/project/%e9%a3%8e%e9%99%a9%e7%b3%bb%e7%bb%9fnew/%e5%b7%a5%e7%a8%8b/WebRoot/WEB-INF/classes/struts.xml:8:49 - package - file:/media/项目/project/风险系统new/工程/WebRoot/WEB-INF/classes/struts.xml:8:49
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.addPackageConfig(DefaultConfiguration.java:95)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:435)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadPackages(XmlConfigurationProvider.java:239)
at org.apache.struts2.config.StrutsXmlConfigurationProvider.loadPackages(StrutsXmlConfigurationProvider.java:111)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:152)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:395)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:452)
at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:201)
at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:589)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:139)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1216)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:509)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:447)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117)
at org.mortbay.jetty.Server.doStart(Server.java:222)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at org.zk.jetty.jettyStart.main(jettyStart.java:22)
1799 [main] ERROR org.mortbay.log - Failed startup of context org.mortbay.jetty.webapp.WebAppContext@1901437{/,./WebRoot}
The package name 'abc' at location package - file:/media/项目/project/风险系统new/工程/WebRoot/WEB-INF/classes/struts.xml:8:49 is already been used by another package at location package - file:/media/%e9%a1%b9%e7%9b%ae/project/%e9%a3%8e%e9%99%a9%e7%b3%bb%e7%bb%9fnew/%e5%b7%a5%e7%a8%8b/WebRoot/WEB-INF/classes/struts.xml:8:49 - package - file:/media/项目/project/风险系统new/工程/WebRoot/WEB-INF/classes/struts.xml:8:49
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.addPackageConfig(DefaultConfiguration.java:95)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:435)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadPackages(XmlConfigurationProvider.java:239)
at org.apache.struts2.config.StrutsXmlConfigurationProvider.loadPackages(StrutsXmlConfigurationProvider.java:111)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:152)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:395)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:452)
at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:201)
at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:589)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:139)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1216)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:509)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:447)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117)
at org.mortbay.jetty.Server.doStart(Server.java:222)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at org.zk.jetty.jettyStart.main(jettyStart.java:22)
1817 [main] INFO org.mortbay.log - Started [email protected]:8088












以上是我在使用STRUTS2的时候出的问题,这个问题困扰了我好久。。。可是一直都不能成功,在GOOGLE里面也找了很久,可是都没有真正的解决方案。没办法,但是又必须要用STRUTS2。。。只能试了。。。

最开始在TOMCAT里面做,当时不晓得什么原因使它竟然运行了。。。
可是我用JETTY的时候还是出错。。。
后来又到LINUX里面做,还是出错。。。
很烦,很郁闷。。。

当要下班的时候突然心血来朝另外新建了一个工程,把所有代码COPY进去。。。成功进行了。。。再次郁闷。。。要原工程还是不能运行。。。无比郁闷

不知道新建了好多个工程,最后突然想到,第一次新建工程是默认的地址,即全是英文地址。而其它的则多多少少包含了点中文,会不会是因为这个原因?

新建工程,COPY代码,运行,成功。。。



中文路径。。。。。。555555555555555555555555555555555555555555555


至于原理什么的网上很多分析。。。大家自己去找嘛。。。。

你可能感兴趣的:(java,apache,struts,servlet,zk)