Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
351 views
in Technique[技术] by (71.8m points)

struts2 - AnnotationActionValidatorManager - Caught exception while loading file java/lang/Object-validation.xml

Struts version of our application is 2.3.8. Getting following exception after every post back to the server. Application is deployed on to WebSphere server. We don't have any validation xml in the project.

ERROR com.opensymphony.xwork2.validator.AnnotationActionValidatorManager - Caught exception while loading file java/lang/Object-validation.xml

java.lang.NullPointerException at com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.loadFile(AnnotationActionValidatorManager.java:391) at        com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.buildClassValidatorConfigs(AnnotationActionValidatorManager.java:279) at 
com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.buildValidatorConfigs(AnnotationActionValidatorManager.java:371) at 
com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.buildValidatorConfigs(AnnotationActionValidatorManager.java:350) at 
com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.getValidators(AnnotationActionValidatorManager.java:102) at 
com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.validate(AnnotationActionValidatorManager.java:141) at 
com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.validate(AnnotationActionValidatorManager.java:133) at 
com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.validate(AnnotationActionValidatorManager.java:128) at 
com.opensymphony.xwork2.validator.ValidationInterceptor.doBeforeInvocation(ValidationInterceptor.java:222)
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

There seems to be a bug since Struts2 2.3.4 version. You can refer the JIRA. This bug has been fixed in 2.3.7 version. I would recommend you to verify that all your Struts2 libraries are properly updated and deployed with the correct version. Please try upgrading your Struts2 to higher version. The difference i see is that exception accurs with AnnotationActionValidatorManager in your case, where as in the bug list. it is DefaultActionValidatorManager on which loadFile() method is invoked


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...