2010-3-12 21:24:21 com.opensymphony.xwork2.validator.ActionValidatorManagerFactory <clinit>
信息: Detected AnnotationActionValidatorManager, initializing it...
2010-3-12 21:24:21 com.opensymphony.xwork2.util.OgnlUtil internalSetProperty
警告: Caught OgnlException while setting property 'trim' on type 'com.opensymphony.xwork2.validator.validators.RequiredFieldValidator'.
ognl.NoSuchPropertyException: com.opensymphony.xwork2.validator.validators.RequiredFieldValidator.trim
at ognl.ObjectPropertyAccessor.setProperty(ObjectPropertyAccessor.java:132)
at com.opensymphony.xwork2.util.OgnlValueStack$ObjectAccessor.setProperty(OgnlValueStack.java:82)
at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:1656)
at ognl.ASTProperty.setValueBody(ASTProperty.java:101)
at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177)
at ognl.SimpleNode.setValue(SimpleNode.java:246)
at ognl.Ognl.setValue(Ognl.java:476)
at com.opensymphony.xwork2.util.OgnlUtil.setValue(OgnlUtil.java:186)
at com.opensymphony.xwork2.util.OgnlUtil.internalSetProperty(OgnlUtil.java:360)
at com.opensymphony.xwork2.util.OgnlUtil.setProperties(OgnlUtil.java:76)
at com.opensymphony.xwork2.util.OgnlUtil.setProperties(OgnlUtil.java:103)
at com.opensymphony.xwork2.util.OgnlUtil.setProperties(OgnlUtil.java:90)
at com.opensymphony.xwork2.ObjectFactory.buildValidator(ObjectFactory.java:251)
at com.opensymphony.xwork2.validator.ValidatorFactory.getValidator(ValidatorFactory.java:267)
at com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.getValidators(AnnotationActionValidatorManager.java:81)

解决方案 »

  1.   


     Caught OgnlException while setting property 'trim' on type 'com.opensymphony.xwork2.validator.validators.RequiredFieldValidator'.
    ognl.NoSuchPropertyException: com.opensymphony.xwork2.validator.validators.RequiredFieldValidator.trim
    没有找到trim这个属性,你在哪个地方用到了。自己检查看看。
      

  2.   

    看到提示Ognl,我建议楼主看看导入的Struts2核心包是否正确
      

  3.   

    我也出现了这个问题,最后发现是我在age(int)下也写了<param name="trim">true</param> ,去掉后就不报警告了