Wildfly部署因缺少“jboss.deployment.unit”

时间:2017-07-05 16:05:07

标签: java mongodb wildfly wildfly-10

目前,我第一次尝试将Wildfly与MongoDB和Hibernate OGM结合使用。当我将Project部署到Wildfly时,会发生以下错误:

"{ \"WFLYCTL0080: Failed services\" => {\"jboss.deployment.unit.\\\"{MYAPP}.war\\\".STRUCTURE\" => \"org.jboss.msc.service.StartException in service jboss.deployment.unit.\\\"{MYAPP}.war\\\".STRUCTURE: WFLYSRV0153: Failed to process phase STRUCTURE of deployment \\\"{MYAPP}.war\\\"
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYSRV0168: Error loading jboss-deployment-structure.xml from {MYUSERDIR}/wildfly10/standalone/deployments/{MYAPP}.war/WEB-INF/jboss-deployment-structure.xml
Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[2,1]
    Message: Unexpected element '{http://www.jboss.com/xml/ns/javaee}jboss-web'\"},
\"WFLYCTL0412: Required services that are not installed:\" => [\"jboss.deployment.unit.\\\"{MYAPP}.war\\\".STRUCTURE\"],
\"WFLYCTL0180: Services with missing/unavailable dependencies\" => undefined }"

我的jboss-deployment-structure.xml看起来像这样:

<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure> 
<deployment>
    <dependencies>
        <module name="org.hibernate" slot="ogm" services="import" />
        <module name="org.hibernate.ogm.mongodb" slot="main" services="import" />
    </dependencies>
</deployment>
</jboss-deployment-structure> 

这个Jboss Document提到将模块(我做过)添加到Wildfly文件夹,并将一个条目添加到我手动创建的Manifest.mf文件中。

有人有想法,接下来要尝试什么? 我还要感谢一本好的教程建议书。

图片的标题说明:

0 个答案:

没有答案