求大神解救,为什么会出错啊

qq159357258 2015-10-15 10:50:47
ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.
22:35:45.025 [localhost-startStop-1] ERROR org.apache.struts2.dispatcher.Dispatcher - Dispatcher initialization failed
com.opensymphony.xwork2.config.ConfigurationException: Unable to load configuration.
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:70) ~[xwork-core-2.3.24.jar:2.3.24]
at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:967) ~[struts2-core-2.3.24.jar:2.3.24]
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:435) ~[struts2-core-2.3.24.jar:2.3.24]
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:479) [struts2-core-2.3.24.jar:2.3.24]
at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74) [struts2-core-2.3.24.jar:2.3.24]
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:57) [struts2-core-2.3.24.jar:2.3.24]
at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:277) [catalina.jar:7.0.29]
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:258) [catalina.jar:7.0.29]
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:382) [catalina.jar:7.0.29]
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:103) [catalina.jar:7.0.29]
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4650) [catalina.jar:7.0.29]
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5306) [catalina.jar:7.0.29]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [catalina.jar:7.0.29]
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901) [catalina.jar:7.0.29]
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) [catalina.jar:7.0.29]
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:618) [catalina.jar:7.0.29]
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1100) [catalina.jar:7.0.29]
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1618) [catalina.jar:7.0.29]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) [?:1.6.0_13]
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [?:1.6.0_13]
at java.util.concurrent.FutureTask.run(FutureTask.java:138) [?:1.6.0_13]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [?:1.6.0_13]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [?:1.6.0_13]
at java.lang.Thread.run(Thread.java:619) [?:1.6.0_13]
Caused by: com.opensymphony.xwork2.config.ConfigurationException: Parent package is not defined: default
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.buildPackageContext(XmlConfigurationProvider.java:674) ~[xwork-core-2.3.24.jar:2.3.24]
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:523) ~[xwork-core-2.3.24.jar:2.3.24]
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadPackages(XmlConfigurationProvider.java:295) ~[xwork-core-2.3.24.jar:2.3.24]
at org.apache.struts2.config.StrutsXmlConfigurationProvider.loadPackages(StrutsXmlConfigurationProvider.java:112) ~[struts2-core-2.3.24.jar:2.3.24]
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:264) ~[xwork-core-2.3.24.jar:2.3.24]
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67) ~[xwork-core-2.3.24.jar:2.3.24]
... 23 more
2015-10-15 22:35:45 org.apache.catalina.core.StandardContext filterStart
严重: Exception starting filter struts2
Unable to load configuration. - [unknown location]
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:493)
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.initFilter(ApplicationFilterConfig.java:277)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:258)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:382)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:103)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4650)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5306)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:618)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1100)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1618)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: Unable to load configuration. - [unknown location]
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)
... 20 more
Caused by: Parent package is not defined: default - [unknown location]
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.buildPackageContext(XmlConfigurationProvider.java:674)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:523)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadPackages(XmlConfigurationProvider.java:295)
at org.apache.struts2.config.StrutsXmlConfigurationProvider.loadPackages(StrutsXmlConfigurationProvider.java:112)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:264)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)
... 23 more
...全文
71 点赞 收藏 4
写回复
4 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
haiyun2600 2015-10-16
: Exception starting filter struts2 Caused by: Unable to load configuration. - [unknown location] Caused by: Parent package is not defined: default - [unknown location] 明显struts2需要的包没导入啊 ,你把需要的包导进去在试下
回复
qq159357258 2015-10-16
这是我的struts文件,应该是这样配置没错啊!?
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
	"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
	"http://struts.apache.org/dtds/struts-2.3.dtd">

<struts>
	<package name="default"  extends="struts-default">
		<action name="loginAction" class="Action.LoginAction">
			<result name="input">/index.jsp</result>
			<result name="error">/index.jsp</result>
			<result name="success">/main.jsp</result>
		</action>
		
		<action name="registerAction" class="Action.RegisterAction">
			<result name="input">/register.jsp</result>
			<result name="error">/register.jsp</result>
			<result name="success">/index.jsp</result>
		</action>
		
		<action name="upMessAction" class="Action.UpdateMessAction">
			<result name="input">/updateMessage.jsp</result>
			<result name="error">/updateMessage.jsp</result>
			<result name="success">/lookMessage.jsp</result>
		</action>
		
		<action name="upPassAction" class="Action.UpdatePassAction">
			<result name="input">/updatePass.jsp</result>
			
			<result name="success">/lookMessage.jsp</result>
		</action>
	</package>


</struts>
回复
log4j的jar包没加进去
回复
Usher丶AckMan 2015-10-15
错误帮你翻译一下,应该是struts2的拦截器配置有问题,你看一下struts2.xml文件
回复
相关推荐
发帖
Web 开发
创建于2007-09-28

8.0w+

社区成员

Java Web 开发
申请成为版主
帖子事件
创建了帖子
2015-10-15 10:50
社区公告
暂无公告