开发EJB时部署失败

时间:2017-03-17 01:55:40

标签: java java-ee jboss ejb

我正在开发一个简单的有状态EJB。部署它时,我收到错误消息:

23:12:34,971 ERROR [org.jboss.as.server] (management-handler-thread - 2) WFLYSRV0021: Deploy of deployment "EJBTest2_ejb_exploded.rar" was rolled back with the following failure message: 
{
"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"EJBTest2_ejb_exploded.rar\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"EJBTest2_ejb_exploded.rar\".INSTALL: WFLYSRV0153: Failed to process phase INSTALL of deployment \"EJBTest2_ejb_exploded.rar\"
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: org.jboss.jca.common.api.validator.ValidateException: IJ010075: The resource adapter metadata must contain either an outbound or inbound configuration
Caused by: org.jboss.jca.common.api.validator.ValidateException: IJ010075: The resource adapter metadata must contain either an outbound or inbound configuration"},
"WFLYCTL0180: Services with missing/unavailable dependencies" => [
    "jboss.naming.context.java.comp.EJBTest2_ejb_exploded.EJBTest2_ejb_exploded.CartEJB.ValidatorFactory is missing [jboss.naming.context.java.comp.EJBTest2_ejb_exploded.EJBTest2_ejb_exploded.CartEJB]",
    "jboss.naming.context.java.comp.EJBTest2_ejb_exploded.EJBTest2_ejb_exploded.CartEJB.InAppClientContainer is missing [jboss.naming.context.java.comp.EJBTest2_ejb_exploded.EJBTest2_ejb_exploded.CartEJB]",
    "jboss.deployment.unit.\"EJBTest2_ejb_exploded.rar\".batch.environment is missing [jboss.deployment.unit.\"EJBTest2_ejb_exploded.rar\".beanmanager]",
    "jboss.deployment.unit.\"EJBTest2_ejb_exploded.rar\".weld.weldClassIntrospector is missing [jboss.deployment.unit.\"EJBTest2_ejb_exploded.rar\".beanmanager]",
    "jboss.naming.context.java.comp.EJBTest2_ejb_exploded.EJBTest2_ejb_exploded.CartEJB.InstanceName is missing [jboss.naming.context.java.comp.EJBTest2_ejb_exploded.EJBTest2_ejb_exploded.CartEJB]",
    "jboss.naming.context.java.comp.EJBTest2_ejb_exploded.EJBTest2_ejb_exploded.CartEJB.Validator is missing [jboss.naming.context.java.comp.EJBTest2_ejb_exploded.EJBTest2_ejb_exploded.CartEJB]"
]
}

这是什么意思?似乎缺少一些依赖文件。他们是什么。

感谢您的帮助。 :)

1 个答案:

答案 0 :(得分:1)

您应该创建 WAR JAR 包,而不是RAR(用于资源存档)。

如果您要公开一些Web内容(包括REST Web服务),请使用WAR包,如果您只想编写业务逻辑,请使用JAR包。

如果项目正在构建控制工具如maven只是更改打包节点值,否则应在IDE中进行更改。