问题描述
- struts2 出现错误 求帮忙
-
可能是Jdk环境不兼容的问题,但我以前用时没出现这样的错误啊,请大家给一个修改方向
console 出现以下错误:
ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.
17:40:14.334 [localhost-startStop-2] ERROR org.apache.struts2.dispatcher.Dispatcher - Dispatcher initialization failed
com.opensymphony.xwork2.config.ConfigurationException: Unable to load configuration.Caused by: com.opensymphony.xwork2.config.ConfigurationException: Parent package is not defined: default
2015-10-15 17:40:14 org.apache.catalina.core.StandardContext filterStart
严重: Exception starting filter struts2
Unable to load configuration. - [unknown location]Caused by: Unable to load configuration. - [unknown location]
2015-10-15 17:40:14 org.apache.catalina.core.StandardContext startInternal
严重: Error filterStart
2015-10-15 17:40:14 org.apache.catalina.core.StandardContext startInternal
严重: Context [/Esell] startup failed due to previous errors
2015-10-15 17:40:14 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
严重: The web application [/Esell] created a ThreadLocal with key of type com.sun.faces.util.Util$1 and a value of type java.util.HashMap 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.
2015-10-15 17:43:24 org.apache.catalina.startup.HostConfig checkResources
信息: Reloading context [/Esell]
2015-10-15 17:43:25 com.sun.faces.config.ConfigureListener contextInitialized
信息: 初始化上下文 '/Esell' 的 Mojarra 2.0.3 (FCS b03)
2015-10-15 17:43:25 com.sun.faces.spi.InjectionProviderFactory createInstance
信息: JSF1048:有 PostConstruct/PreDestroy 注释。标有这些注释的 ManagedBeans 方法将表示注释已处理。
ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.
17:43:26.301 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] ERROR org.apache.struts2.dispatcher.Dispatcher - Dispatcher initialization failed
com.opensymphony.xwork2.config.ConfigurationException: Unable to load configuration.Caused by: com.opensymphony.xwork2.config.ConfigurationException: Parent package is not defined: default
2015-10-15 17:43:26 org.apache.catalina.core.StandardContext startInternal
严重: Error filterStart
2015-10-15 17:43:26 org.apache.catalina.core.StandardContext startInternal
严重: Context [/Esell] startup failed due to previous errors
2015-10-15 17:43:26 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
严重: The web application [/Esell] created a ThreadLocal with key of type com.sun.faces.util.Util$1 and a value of type java.util.HashMap 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.
2015-10-15 17:43:56 org.apache.catalina.startup.HostConfig checkResources
信息: Reloading context [/Esell]
2015-10-15 17:43:57 com.sun.faces.config.ConfigureListener contextInitialized
信息: 初始化上下文 '/Esell' 的 Mojarra 2.0.3 (FCS b03)
2015-10-15 17:43:57 com.sun.faces.spi.InjectionProviderFactory createInstance
信息: JSF1048:有 PostConstruct/PreDestroy 注释。标有这些注释的 ManagedBeans 方法将表示注释已处理。
ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.
17:43:58.424 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] ERROR org.apache.struts2.dispatcher.Dispatcher - Dispatcher initialization failed
com.opensymphony.xwork2.config.ConfigurationException: Unable to load configuration.Caused by: com.opensymphony.xwork2.config.ConfigurationException: Parent package is not defined: default
2015-10-15 17:43:58 org.apache.catalina.core.StandardContext filterStart
严重: Exception starting filter struts2
Unable to load configuration. - [unknown location]Caused by: Unable to load configuration. - [unknown location]
Caused by: Parent package is not defined: default - [unknown location]
2015-10-15 17:43:58 org.apache.catalina.core.StandardContext startInternal
严重: Error filterStart
2015-10-15 17:43:58 org.apache.catalina.core.StandardContext startInternal
严重: Context [/Esell] startup failed due to previous errors
2015-10-15 17:43:58 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
严重: The web application [/Esell] created a ThreadLocal with key of type com.sun.faces.util.Util$1 and a value of type java.util.HashMap 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.
2015-10-15 17:44:28 org.apache.catalina.startup.HostConfig checkResources
信息: Reloading context [/Esell]
2015-10-15 17:44:29 com.sun.faces.config.ConfigureListener contextInitialized
信息: 初始化上下文 '/Esell' 的 Mojarra 2.0.3 (FCS b03)
2015-10-15 17:44:29 com.sun.faces.spi.InjectionProviderFactory createInstance
信息: JSF1048:有 PostConstruct/PreDestroy 注释。标有这些注释的 ManagedBeans 方法将表示注释已处理。
ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.
17:44:30.614 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] ERROR org.apache.struts2.dispatcher.Dispatcher - Dispatcher initialization failed
com.opensymphony.xwork2.config.ConfigurationException: Unable to load configuration.Caused by: com.opensymphony.xwork2.config.ConfigurationException: Parent package is not defined: default
2015-10-15 17:44:30 org.apache.catalina.core.StandardContext filterStart
严重: Exception starting filter struts2
Unable to load configuration. - [unknown location]Caused by: Unable to load configuration. - [unknown location]
Caused by: Parent package is not defined: default - [unknown location]
2015-10-15 17:44:30 org.apache.catalina.core.StandardContext startInternal
严重: Error filterStart
2015-10-15 17:44:30 org.apache.catalina.core.StandardContext startInternal
严重: Context [/Esell] startup failed due to previous errors
2015-10-15 17:44:30 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
严重: The web application [/Esell] created a ThreadLocal with key of type com.sun.faces.util.Util$1 and a value of type java.util.HashMap 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.
解决方案
解决方案二:
没有Log4J配置文件...