Caused by: Unable to locate parent package [json-default] for [class com.you.user.action.StudentActi
1、错误描述
信息: Choosing bean (struts) for (com.opensymphony.xwork2.util.TextParser) 2014-7-13 1:52:04 org.apache.struts2.spring.StrutsSpringObjectFactory info 信息: Initializing Struts-Spring integration... 2014-7-13 1:52:04 com.opensymphony.xwork2.spring.SpringObjectFactory info 信息: Setting autowire strategy to name 2014-7-13 1:52:04 org.apache.struts2.spring.StrutsSpringObjectFactory info 信息: ... initialized Struts-Spring integration successfully 2014-7-13 1:52:04 org.apache.struts2.dispatcher.Dispatcher error 严重: Dispatcher initialization failed Unable to load configuration. - [unknown location] at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:70) at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:445) at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:489) 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:279) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260) at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4809) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5485) 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:632) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1229) at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1875) 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 locate parent package [json-default] for [class com.you.user.action.StudentAction] - [unknown location] at org.apache.struts2.convention.PackageBasedActionConfigBuilder.getPackageConfig(PackageBasedActionConfigBuilder.java:1020) at org.apache.struts2.convention.PackageBasedActionConfigBuilder.buildConfiguration(PackageBasedActionConfigBuilder.java:666) at org.apache.struts2.convention.PackageBasedActionConfigBuilder.buildActionConfigs(PackageBasedActionConfigBuilder.java:348) at org.apache.struts2.convention.ClasspathPackageProvider.loadPackages(ClasspathPackageProvider.java:53) at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:268) at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67) ... 21 more 2014-7-13 1:52:04 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:501) 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:279) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260) at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4809) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5485) 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:632) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1229) at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1875) 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.init_PreloadConfiguration(Dispatcher.java:445) at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:489) ... 19 more Caused by: Unable to locate parent package [json-default] for [class com.you.user.action.StudentAction] - [unknown location] at org.apache.struts2.convention.PackageBasedActionConfigBuilder.getPackageConfig(PackageBasedActionConfigBuilder.java:1020) at org.apache.struts2.convention.PackageBasedActionConfigBuilder.buildConfiguration(PackageBasedActionConfigBuilder.java:666) at org.apache.struts2.convention.PackageBasedActionConfigBuilder.buildActionConfigs(PackageBasedActionConfigBuilder.java:348) at org.apache.struts2.convention.ClasspathPackageProvider.loadPackages(ClasspathPackageProvider.java:53) at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:268) at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67) ... 21 more 2014-7-13 1:52:04 org.apache.catalina.core.StandardContext startInternal 严重: Error filterStart 2014-7-13 1:52:04 org.apache.catalina.core.StandardContext startInternal 严重: Context [/FirstSSH] startup failed due to previous errors 2014-7-13 1:52:04 org.apache.catalina.core.ApplicationContext log 信息: Closing Spring root WebApplicationContext 2014-7-13 1:52:04 org.springframework.web.context.support.XmlWebApplicationContext doClose 信息: Closing Root WebApplicationContext: startup date [Sun Jul 13 01:51:58 CST 2014]; root of context hierarchy 2014-7-13 1:52:04 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc 严重: The web application [/FirstSSH] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered. 2014-7-13 1:52:04 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads 严重: The web application [/FirstSSH] appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak. 2014-7-13 1:52:04 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads 严重: The web application [/FirstSSH] appears to have started a thread named [Resource Destroyer in BasicResourcePool.close()] but has failed to stop it. This is very likely to create a memory leak. 2014-7-13 1:52:04 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks 严重: The web application [/FirstSSH] created a ThreadLocal with key of type [com.sun.faces.util.Util$1] (value [com.sun.faces.util.Util$1@1afbf49]) and a value of type [java.util.HashMap] (value [{com.sun.faces.patternCache={ = }}]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak. 2014-7-13 1:52:04 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deploying web application directory D:\MyEclipse\apache-tomcat-7.0.53\webapps\host-manager 2014-7-13 1:52:04 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deploying web application directory D:\MyEclipse\apache-tomcat-7.0.53\webapps\manager 2014-7-13 1:52:04 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deploying web application directory D:\MyEclipse\apache-tomcat-7.0.53\webapps\ROOT 2014-7-13 1:52:04 org.apache.coyote.AbstractProtocol start 信息: Starting ProtocolHandler ["http-apr-8686"] 2014-7-13 1:52:04 org.apache.coyote.AbstractProtocol start 信息: Starting ProtocolHandler ["ajp-apr-8009"] 2014-7-13 1:52:04 org.apache.catalina.startup.Catalina start 信息: Server startup in 12736 ms
2、错误原因
问题的原因是缺少struts2-json插件jar
3、解决办法
将“struts2-json-plugin-2.3.16.3.jar”拷贝到lib目录下,然后重启服务
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。