2017-03-17 51 views
0

我正在开发一个简单的有状态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]" 
] 
} 

这是什么意思?看起来有些依赖文件丢失。他们是什么。

我很感谢您的帮助。 :)

+0

你为什么将你的EJB构建到RAR文件中? –

+0

@SteveC好吧,我是新来的。我应该将它构建到WAR文件还是JAR中 –

回答

1

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

如果您打算公开某些Web内容(包括REST Web服务),请使用WAR包,如果您要仅写入业务逻辑,请使用JAR包装。

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