2012-08-30 26 views
3

我正在使用jboss-5.1.0.GA和jdk1.6。我有我的stock.ear在C:\ atgcertenv20120601 \ jboss-5.1.0.GA \ server \ AllStocks \ deploy \ stock.ear.While運行獲取部署錯誤。查找以下錯誤跟蹤。JBoss部署錯誤:引起:java.lang.RuntimeException:..xml中列出的.war模塊在.ear中不存在

15:41:17,518 ERROR [ProfileDeployAction] Failed to add deployment: stock.ear 
org.jboss.deployers.spi.DeploymentException: Exception determining structure: Ab 
stractVFSDeployment(stock.ear) 
     at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentExcept 
ion(DeploymentException.java:49) 
     at org.jboss.deployers.structure.spi.helpers.AbstractStructuralDeployers 
.determineStructure(AbstractStructuralDeployers.java:85) 
     at org.jboss.deployers.plugins.main.MainDeployerImpl.determineStructure(
MainDeployerImpl.java:1004) 
     at org.jboss.deployers.plugins.main.MainDeployerImpl.determineDeployment 
Context(MainDeployerImpl.java:440) 
     at org.jboss.deployers.plugins.main.MainDeployerImpl.addDeployment(MainD 
eployerImpl.java:390) 
     at org.jboss.deployers.plugins.main.MainDeployerImpl.addDeployment(MainD 
eployerImpl.java:300) 
     at org.jboss.system.server.profileservice.repository.MainDeployerAdapter 
.addDeployment(MainDeployerAdapter.java:86) 
     at org.jboss.system.server.profileservice.repository.ProfileDeployAction 
.install(ProfileDeployAction.java:61) 
     at org.jboss.system.server.profileservice.repository.AbstractProfileActi 
on.install(AbstractProfileAction.java:53) 
     at org.jboss.system.server.profileservice.repository.AbstractProfileServ 
ice.install(AbstractProfileService.java:361) 
     at org.jboss.dependency.plugins.AbstractControllerContext.install(Abstra 
ctControllerContext.java:348) 
     at org.jboss.dependency.plugins.AbstractController.install(AbstractContr 
oller.java:1631) 
     at org.jboss.dependency.plugins.AbstractController.incrementState(Abstra 
ctController.java:934) 
     at org.jboss.dependency.plugins.AbstractController.resolveContexts(Abstr 
actController.java:1082) 
     at org.jboss.dependency.plugins.AbstractController.resolveContexts(Abstr 
actController.java:984) 
     at org.jboss.dependency.plugins.AbstractController.change(AbstractContro 
ller.java:822) 
     at org.jboss.dependency.plugins.AbstractController.change(AbstractContro 
ller.java:553) 
     at org.jboss.system.server.profileservice.repository.AbstractProfileServ 
ice.activateProfile(AbstractProfileService.java:306) 
     at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(
ProfileServiceBootstrap.java:271) 
     at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java: 
461) 
     at org.jboss.Main.boot(Main.java:221) 
     at org.jboss.Main$1.run(Main.java:556) 
     at java.lang.Thread.run(Thread.java:662) 
Caused by: java.lang.RuntimeException: Error determining structure: stock.ear 
     at org.jboss.deployment.EARStructure.determineStructure(EARStructure.jav 
a:293) 
     at org.jboss.deployers.vfs.plugins.structure.StructureDeployerWrapper.de 
termineStructure(StructureDeployerWrapper.java:73) 
     at org.jboss.deployers.vfs.plugins.structure.VFSStructuralDeployersImpl. 
doDetermineStructure(VFSStructuralDeployersImpl.java:196) 
     at org.jboss.deployers.vfs.plugins.structure.VFSStructuralDeployersImpl. 
determineStructure(VFSStructuralDeployersImpl.java:221) 
     at org.jboss.deployers.structure.spi.helpers.AbstractStructuralDeployers 
.determineStructure(AbstractStructuralDeployers.java:77) 
     ... 21 more 
Caused by: java.lang.RuntimeException: stk_bootstrap.war module listed in applic 
ation.xml does not exist within .ear vfsfile:/C:/jboss-5.1.0.GA/server/AllStocks/deploy/ stock.ear/ 
     at org.jboss.deployment.EARStructure.determineStructure(EARStructure.jav 
a:272) 
     ... 25 more 

回答

4

這場戰爭真的在耳內嗎?你可以用WinRAR或類似的東西打開.ear並檢查。

您使用的是Eclipse嗎?如果您在Eclipse中關閉自動構建,那麼在包裝耳朵之前不會創建war或ejb.jar。 您可以手動執行或在Project - > Build Automatically下啓用它。

您是否將.war包含在.ear項目中?右鍵單擊項目,屬性並在「部署程序集」下選中。

enter image description here

+0

'自動構建'已啓用。但是'stk_bootstrap.war'還沒有被創建。 – NaaN

+0

但盧克,我沒有選項'部署大會'在那裏。 – NaaN

+1

好的,奇怪的......我不知道你是否有Java EE開發人員的Eclipse IDE,只有經典的(http://eclipse.org/downloads)? – Luke