Bonjour tout le monde,
Je ne sais pas trop si c'est le bon endroit pour poster mon problème mais je suis désespérée. En effet cela fait maintenant plusieurs jour que je suis coincée Il faut dire, que je suis nulle dans tous ce qui concerne tomcat et que je commence à développer en spring )
J'ai développé 3 applications (gestion courrier, gestion horaire, gestion procédure) qui fonctionnent toutes les 3 sous tomcat6. Le serveur où se trouve tomcat6 s'arrête tous les jours et il redémarre de manière automatique. Tomcat6 redémarre de manière automatique
Gestion Horaire et Gestion Procédure sont 2 applications développée en utilisant JEE, spring-service, et hibernate.
Sur ces 2 applications, seule la première insérée sur tomcat redémarre de manière automatique, la seconde devant être redémarré manuellement (je dois aller dans l'administration de tomcat et je dois cliquer sur "true" pour que l'application fonctionne). J'ai déployé directement sur le serveur tomcat (via winscp) puis j'ai déployé en utilisant l'interface d’administration de tomcat via les fichiers war. Le problème de démarrage automatique demeure.
Après mainte recherche (car je ne connais pas grand chose à tomcat, j'ai trouvé ce message d'erreur :
sachant que dans web.xml se trouvant dans
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3 GRAVE: Exception lors de l'envoi de l'évènement contexte initialisé (context initialized) à l'instance de classe d'écoute (listener) org.springframework.web.util.Log4jConfigListener java.lang.IllegalStateException: Web app root system property already set to different value: 'webapp.root' = [D:\BackUp\STRUTS2\workspaceIntranet\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\GestionProcedure\] instead of [D:\BackUp\STRUTS2\workspaceIntranet\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\GestionHoraire\] - Choose unique values for the 'webAppRootKey' context-param in your web.xml files!
D:\BackUp\STRUTS2\workspaceIntranet\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\ROOT\
dans le fichier web.xml qui se trouve dans l'application Gestion Horaire (qui se trouve dans D:\BackUp\STRUTS2\workspaceIntranet\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\GestionHoraire\WEB-INF)
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5 <?xml version="1.0" encoding="ISO-8859-1"?> <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd" version="2.5"> </web-app>
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88 <?xml version="1.0" encoding="UTF-8"?> <web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> <display-name>GestionHoraire</display-name> <welcome-file-list> <welcome-file>index.html</welcome-file> <welcome-file>index.htm</welcome-file> <welcome-file>index.jsp</welcome-file> <welcome-file>default.html</welcome-file> <welcome-file>default.htm</welcome-file> <welcome-file>default.jsp</welcome-file> </welcome-file-list> <!--SPRING--> <context-param> <param-name>contextConfigLocation</param-name> <param-value> /WEB-INF/config/hibernate.cfg.xml /WEB-INF/config/applicationContext.xml /WEB-INF/config/spring-dao.xml /WEB-INF/config/spring-service.xml </param-value> </context-param> <listener> <listener-class>com.maison.enfant.gestion.horaire.ActionGlobalMessagesListener</listener-class> </listener> <listener> <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class> </listener> <!--SPRING--> <!--SPRING SECURITY--> <listener> <listener-class> org.springframework.security.ui.session.HttpSessionEventPublisher</listener-class> </listener> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <!-- filter> <filter-name>springSecurityFilterChain</filter-name> <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class> </filter> <filter-mapping> <filter-name>springSecurityFilterChain</filter-name> <url-pattern>/*</url-pattern> </filter-mapping--> <!--SPRING SECURITY--> <!-- HIBERNATE --> <filter> <filter-name>Spring OpenEntityManagerInViewFilter</filter-name> <filter-class> org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter </filter-class> </filter> <filter-mapping> <filter-name>Spring OpenEntityManagerInViewFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <!-- HIBERNATE --> <!--STRUTS 2--> <filter> <filter-name>struts2</filter-name> <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class> </filter> <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <!--STRUTS 2--> </web-app>
dans le fichier web.xml qui se trouve dans l'application Gestion Procédure (qui se trouve dans D:\BackUp\STRUTS2\workspaceIntranet\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\GestionHoraire\WEB-INF
Pourriez vous me dire comment faire pour que les 2 applications développées sous SRPING démarre de manière automatique ? Je vous remercie d'avoir de votre aide
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88 <?xml version="1.0" encoding="UTF-8"?> <web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> <display-name>GestionProcedure</display-name> <welcome-file-list> <welcome-file>index.html</welcome-file> <welcome-file>index.htm</welcome-file> <welcome-file>index.jsp</welcome-file> <welcome-file>default.html</welcome-file> <welcome-file>default.htm</welcome-file> <welcome-file>default.jsp</welcome-file> </welcome-file-list> <!--SPRING--> <context-param> <param-name>contextConfigLocation</param-name> <param-value> /WEB-INF/config/hibernate.cfg.xml /WEB-INF/config/applicationContext.xml /WEB-INF/config/spring-dao.xml /WEB-INF/config/spring-service.xml </param-value> </context-param> <listener> <listener-class>procedure.gestion.ActionGlobalMessagesListener</listener-class> </listener> <listener> <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class> </listener> <!--SPRING--> <!--SPRING SECURITY--> <listener> <listener-class> org.springframework.security.ui.session.HttpSessionEventPublisher</listener-class> </listener> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <!-- filter> <filter-name>springSecurityFilterChain</filter-name> <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class> </filter> <filter-mapping> <filter-name>springSecurityFilterChain</filter-name> <url-pattern>/*</url-pattern> </filter-mapping--> <!--SPRING SECURITY--> <!-- HIBERNATE --> <filter> <filter-name>Spring OpenEntityManagerInViewFilter</filter-name> <filter-class> org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter </filter-class> </filter> <filter-mapping> <filter-name>Spring OpenEntityManagerInViewFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <!-- HIBERNATE --> <!--STRUTS 2--> <filter> <filter-name>struts2</filter-name> <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class> </filter> <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <!--STRUTS 2--> </web-app>
Partager