jboss eap-6.1 Échec du traitement de la phase POST_MODULE de déploiement \“de l'éducation.la guerre\”
Utilisé hibernate, spring mvc. Fichiers:
web.xml
<web-app 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>Spring MVC Application</display-name>
<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>
<servlet>
<servlet-name>mvc-dispatcher</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>mvc-dispatcher</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>mvc-dispatcher</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>mvc-dispatcher</servlet-name>
<url-pattern>*.css</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>mvc-dispatcher</servlet-name>
<url-pattern>*.js</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>mvc-dispatcher</servlet-name>
<url-pattern>*.gif</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>mvc-dispatcher</servlet-name>
<url-pattern>*.jpg</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>mvc-dispatcher</servlet-name>
<url-pattern>*.png</url-pattern>
</servlet-mapping>
</web-app>
principal fichier de contexte
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd"
>
<context:component-scan base-package="com.education"/>
<context:component-scan base-package="com.education.controllers"/>
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/pages/"/>
<property name="suffix" value=".jsp"/>
</bean>
<mvc:annotation-driven />
<mvc:resources mapping="/resources/**" location="/resources/" />
<import resource="root-context.xml" />
</beans>
root-context.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:jee="http://www.springframework.org/schema/jee" xmlns:lang="http://www.springframework.org/schema/lang"
xmlns:p="http://www.springframework.org/schema/p" xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee.xsd
http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">
<context:annotation-config />
<context:component-scan base-package="com.education.Dao" />
<context:component-scan base-package="com.education.Service" />
<import resource="data.xml" />
<import resource="security.xml" />
</beans>
Avant que je successuly compiler et exécuter cette application, puis ajoutez le code hibernate et ce fichiers xml et de rencontrer d'erreur.
Code d'erreur
16:40:50,403 ERREUR [org.jboss.comme.serveur] (gestion-gestionnaire-fil -
12) JBAS015870: Déploiement de déploiement "de l'éducation.de guerre" a été annulée
à la suite de l'échec du message: {"JBAS014671: Échec de services" =>
{"jboss.le déploiement.de l'unité.\"l'éducation.la guerre\".POST_MODULE" =>
"org.jboss.msc.service.StartException en service
jboss.le déploiement.de l'unité.\"l'éducation.la guerre\".POST_MODULE: JBAS018733:
Impossible de traiter de la phase POST_MODULE de déploiement \"de l'éducation.la guerre\"
Causés par: java.lang.LinkageError: impossible de lien org/springframework/web/filtre/GenericFilterBean (Module
\"le déploiement.l'éducation.guerre:principal\" de Service, Chargeur de Module)
Causés par: java.lang.NoClassDefFoundError: org/springframework/contexte/EnvironmentAware
Causés par: java.lang.ClassNotFoundException: org.springframework.contexte.EnvironmentAware de [Module
\"le déploiement.l'éducation.guerre:principal\" de Service, Chargeur de Module]"}}
16:40:50,533 INFO [org.jboss.comme.serveur.déploiement] (MSC service
fil 1-7) JBAS015877: Arrêté du déploiement de l'éducation.la guerre
(runtime-nom: l'éducation.la guerre) dans 130ms
- Quelle est la version de Printemps utilisez-vous?
- Version 3.2.0
Vous devez vous connecter pour publier un commentaire.
Cette ligne dans le stacktrace dit tout:
Vous devez ajouter
spring-context
à votre pom.xml fichier si vous utilisez Maven:Note la version peut varier en fonction de votre projet
Je suis d'accord avec Kevin que dans votre cas, la catégorie fichiers sont manquants. Ainsi, vous aurez à placer les Bocaux contenant ces fichiers de classe. Toutefois, j'ai été confronté à ce problème sur les serveurs Linux. Le problème était lié au problème de permissions de fichier. Dans ce cas, il est difficile d'attraper la question que les messages d'erreur ou les journaux de ne pas indiquer clairement le problème. Habituellement Linux est bon quand il s'agit de problème d'autorisation. J'ai été la création de la GUERRE des fichiers en tant qu'utilisateur root, mais était en cours d'exécution serveur jboss comme jboss utilisateur. Enfin, j'ai eu à "sudo su jboss" (utilisateur avec lequel Jboss server est en cours d'exécution) et permet de créer et de déployer mes artefacts.