2017-03-17 107 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中進行更改。