176142998

  BlogJava :: 首页 :: 联系 :: 聚合  :: 管理
  116 Posts :: 0 Stories :: 45 Comments :: 0 Trackbacks
2008-7-31 16:49:25 org.apache.struts2.config.Settings getLocale
警告: Settings: Could not parse struts.locale setting, substituting default VM locale
2008-7-31 16:49:26 com.opensymphony.xwork2.util.ObjectTypeDeterminerFactory <clinit>
信息: Setting DefaultObjectTypeDeterminer as default ...

错误信息 : WARN [struts2.config.Settings] Settings: Could not parse struts.locale setting, substituting default VM locale
解决方法 : 在 struts.properties 文件中加上 struts.locale=en_US
或者在struts.xml中加入<constant name="struts.locale" value="en_US"/>



信息: Server startup in 23313 ms
2008-7-31 16:59:47 org.apache.struts2.components.Form evaluateExtraParamsServletRequest
警告: No configuration found for the specified action: '/mystruts/sum.action' in namespace: ''. Form action defaulting to 'action' attribute's literal value.
2008-7-31 16:59:50 org.apache.struts2.components.Form evaluateExtraParamsServletRequest
警告: No configuration found for the specified action: '/mystruts/sum.action' in namespace: ''. Form action defaulting to 'action' attribute's literal value.


在struts.xml 中的sction 中取消namespace="/mystruts" 则会无此信息


信息: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/struts2] has not been started
2008-7-31 17:34:12 org.apache.catalina.core.ApplicationContext log
信息: Initializing Spring root WebApplicationContext
log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).
log4j:WARN Please initialize the log4j system properly.
2008-7-31 17:34:14 org.apache.catalina.core.StandardContext filterStart
严重: Exception starting filter struts2
Cannot locate the chosen ObjectFactory implementation: com.opensymphony.xwork2.ObjectFactory  - [unknown location]
 at org.apache.struts2.config.BeanSelectionProvider.alias(BeanSelectionProvider.java:224)
 at org.apache.struts2.config.BeanSelectionProvider.alias(BeanSelectionProvider.java:195)
 at org.apache.struts2.config.BeanSelectionProvider.register(BeanSelectionProvider.java:153)
 at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:131)
 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.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275)
 at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397)
 at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108)
 at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3693)
 at org.apache.catalina.core.StandardContext.start(StandardContext.java:4340)
 at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1105)
 at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1203)
 at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:293)
 at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
 at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337)
 at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)
 at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
 at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)
 at java.lang.Thread.run(Unknown Source)
2008-7-31 17:34:14 org.apache.catalina.core.StandardContext start
严重: Error filterStart
2008-7-31 17:34:14 org.apache.catalina.core.StandardContext start
严重: Context [/struts2] startup failed due to previous errors
2008-7-31 17:34:14 org.apache.catalina.core.ApplicationContext log
信息: Closing Spring root WebApplicationContext


struts.properties 文件设置如下:

         struts.objectFactory = spring


原因:

        缺少 struts2-spring-plugin-2.0.11.1.jar

 

Struts2 中使用 Spring 的 IOC 应加入以下 jar 包

        spring-core-2.0.5.jar

        spring-beans-2.0.5.jar

        spring-context-2.0.5.jar

        spring-web-2.0.5.jar

        struts2-spring-plugin-2.0.11.1.jar

 

/WEB-INF/web.xml 文件中加入SpringContextLoaderListener 监听器,方便Spring与Web容器交互。

        <listener>
             <listener-class>
                   org.springframework.web.context.ContextLoaderListener
             </listener-class>
         </listener>

posted on 2008-07-31 17:06 飞飞 阅读(1169) 评论(0)  编辑  收藏

只有注册用户登录后才能发表评论。


网站导航:
博客园   IT新闻   Chat2DB   C++博客   博问