来自[Module“deployment.RGWeb.war:main”的org.springframework.context.ApplicationContext来自Service Module Loader]

时间:2017-01-31 07:25:37

标签: java wildfly

我正在使用wildfly 10.1.0,我正在尝试运行我的网络项目,但我收到了以下错误

12:49:17,589 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) WFLYSRV0027: Starting deployment of "RGWeb.war" (runtime-name: "RGWeb.war")
12:49:18,047 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.deployment.unit."RGWeb.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."RGWeb.war".POST_MODULE: WFLYSRV0153: Failed to process phase POST_MODULE of deployment "RGWeb.war"
	at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:154)
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoClassDefFoundError: org/springframework/context/ApplicationContext
	at java.lang.Class.getDeclaredConstructors0(Native Method)
	at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
	at java.lang.Class.getConstructor0(Class.java:3075)
	at java.lang.Class.getConstructor(Class.java:1825)
	at org.jboss.as.jsf.deployment.JSFManagedBeanProcessor.deploy(JSFManagedBeanProcessor.java:100)
	at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:147)
	... 5 more
Caused by: java.lang.ClassNotFoundException: org.springframework.context.ApplicationContext from [Module "deployment.RGWeb.war:main" from Service Module Loader]
	at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:198)
	at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:363)
	at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:351)
	at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:93)
	... 11 more

12:49:18,048 ERROR [org.jboss.as.controller.management-operation] (DeploymentScanner-threads - 1) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "RGWeb.war")]) - failure description: {
    "WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"RGWeb.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"RGWeb.war\".POST_MODULE: WFLYSRV0153: Failed to process phase POST_MODULE of deployment \"RGWeb.war\"
    Caused by: java.lang.NoClassDefFoundError: org/springframework/context/ApplicationContext
    Caused by: java.lang.ClassNotFoundException: org.springframework.context.ApplicationContext from [Module \"deployment.RGWeb.war:main\" from Service Module Loader]"},
    "WFLYCTL0412: Required services that are not installed:" => ["jboss.deployment.unit.\"RGWeb.war\".POST_MODULE"],
    "WFLYCTL0180: Services with missing/unavailable dependencies" => undefined
}
12:49:18,071 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 1) WFLYSRV0010: Deployed "RGWeb.war" (runtime-name : "RGWeb.war")
12:49:18,071 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 1) WFLYCTL0183: Service status report
WFLYCTL0186:   Services which failed to start:      service jboss.deployment.unit."RGWeb.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."RGWeb.war".POST_MODULE: WFLYSRV0153: Failed to process phase POST_MODULE of deployment "RGWeb.war"

你可以帮我解决这个问题吗?

谢谢

1 个答案:

答案 0 :(得分:0)

您在类路径中缺少spring库。尝试将spring库放在webapp的类路径中:WEB-INF / lib。

通过添加依赖项,使用maven部署通常可以帮助解决此类问题。请尝试查看此页面:http://www.mastertheboss.com/jboss-server/wildfly-8/maven-configuration-for-java-ee-7-projects-on-wildfly