Bonjour à tous,

je suis occupé à développez une petite application en Struts, Spring et sans javascript... Lorsque je valide le formulaire suivante :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
 
public class MovieForm extends ValidatorForm {
 
        .....
 
	public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
		ActionErrors errors = super.validate(mapping, request);
		if (errors == null) {
			errors = new ActionErrors();
		}
 		if (StringUtils.isBlank(getTitle())) {
			  errors.add(ActionErrors.GLOBAL_MESSAGE, new ActionMessage("movie.error.title"));
		}
		String duration = getDuration();
		if (StringUtils.isBlank(getDuration()) || (!StringUtils.isNumeric(duration))) {
			errors.add(ActionErrors.GLOBAL_MESSAGE, new ActionMessage("movie.error.duration"));
		}
 
		if (StringUtils.isBlank(getKind())) {
			  errors.add(ActionErrors.GLOBAL_MESSAGE, new ActionMessage("movie.error.kind"));
		}		  
		if (StringUtils.isBlank(getKind())) {
			  errors.add(ActionErrors.GLOBAL_MESSAGE, new ActionMessage("movie.error.media"));
		}		  
		return errors;
	}
avant même qu'il ne retourne vers l'action adéquate, Struts m'envoit une erreur :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
 
java.lang.IllegalArgumentException: Resources cannot be null.
	org.apache.commons.validator.Validator.<init>(Validator.java:161)
	org.apache.struts.validator.Resources.initValidator(Resources.java:475)
	org.apache.struts.validator.ValidatorForm.validate(ValidatorForm.java:104)
	movie.MovieForm.validate(MovieForm.java:78)
	org.apache.struts.action.RequestProcessor.processValidate(RequestProcessor.java:950)
	org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:207)
	org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
	org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
	org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:75)
Je ne comprends pas, c'est à se flinguer. Ca doit surement être tout bête :-) Quelqu'un aurait une idée ? Voici le struts-config.xml :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
 
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd">
<struts-config>
	<!-- ========== Form Bean Definitions =================================== -->
	<form-beans>
		<form-bean name="movieForm" type="movie.MovieForm"/>
	</form-beans>
 
 
	<!-- ========== Action Mapping Definitions ============================== -->
	<action-mappings>
		<action path="/startup"
				type="startup.StartupAction"
				parameter="init"
				validate="false">
		  	    <forward name="success" path=".startup"/>
		</action>	
 
		<action path="/editMovie"
				type="movie.MovieAction"
				name="movieForm"
				parameter="init"
				validate="false">
		  	    <forward name="success" path=".movie.edit"/>
		</action>			
 
		<action path="/movieSave"
				type="movie.MovieAction"
				name="movieForm"
				parameter="save"
				input=".movie.edit"
				validate="true">
		  	    <forward name="success" path=".movie.edit"/>
		</action>					
	</action-mappings>
 
	<message-resources parameter="ApplicationResources"/>
 
	<!-- ========== Plugins ============================== -->
	<plug-in className="org.apache.struts.tiles.TilesPlugin" >
		<set-property property="definitions-config" value="/WEB-INF/tiles-defs.xml"/>
		<set-property property="definitions-debug" value="1" />
		<set-property property="definitions-parser-details" value="0" />
		<set-property property="definitions-parser-validate" value="true" />
	</plug-in>
 
</struts-config>
Pour celui ou celle qui arrive à m'aider ou qui a tenté de m'aider je l'en remercie déjà d'avance.

Coyote