在我的WEB-INF目录中 JBoss的部署-structure.xml
<jboss-deployment-structure>
<deployment>
<dependencies>
<module name="com.ticomgeo.crowbar" />
</dependencies>
</deployment>
</jboss-deployment-structure>
在$ JBOSS_HOME / modules / com / ticomgeo / crowbar / main中 modules.xml
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.1" name="com.ticomgeo.crowbar">
<resources>
<resource-root path="properties"/>
</resources>
</module>
war文件无法部署,并出现以下错误
2018-03-28 17:52:25,195 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-6) MSC000001: Failed to start service jboss.module.service."deployment.crowbar-server.war".main: org.jboss.msc.service.StartException in service jboss.module.service."deployment.crowbar-server.war".main: WFLYSRV0179: Failed to load module: deployment.crowbar-server.war:main
at org.jboss.as.server.moduleservice.ModuleLoadService.start(ModuleLoadService.java:91)
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: org.jboss.modules.ModuleNotFoundException: com.ticomgeo.crowbar:main
at org.jboss.modules.Module.addPaths(Module.java:1042)
at org.jboss.modules.Module.link(Module.java:1398)
at org.jboss.modules.Module.relinkIfNecessary(Module.java:1426)
at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:238)
at org.jboss.as.server.moduleservice.ModuleLoadService.start(ModuleLoadService.java:68)
... 5 more
答案 0 :(得分:0)
它应该在一个层中。提供的是系统/层/基础 因此,在$ JBOSS_HOME / modules / system / layers / base / com / ticomgeo / crowbar / main中创建文件应该可以使它工作。