mwf_ejb.jar
1つのEJB( )とWAR( )を持つアプリケーションがありますmwf_web.war
。同じEARにパッケージ化すれば、すべて問題ありません。最初にEJBをデプロイし、次にWARをデプロイする方法はありますか?
試してみると、EJB JARは正常にデプロイされますが、WARをデプロイすると、次のエラーが発生します(JBoss AS 7.1.1の場合)。
MSC00001: Failed to start service jboss.deployment.unit."mwf_web.war".STRUCTURE: org.jboss.msc.service.StartException in service jboss.deployment.unit."mwf_web.war".STRUCTURE: Failed to process phase STRUCTURE of deployment "mwf_web.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_31]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_31]
at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_31]
Caused by: java.lang.IllegalArgumentException: Given parent is not an ancestor of this virtual file
at org.jboss.vfs.VirtualFile.getPathNameRelativeTo(VirtualFile.java:116)
at org.jboss.vfs.VirtualFile.getPathNameRelativeTo(VirtualFile.java:122)
at org.jboss.vfs.VirtualFile.getPathNameRelativeTo(VirtualFile.java:122)
at org.jboss.vfs.VirtualFile.getPathNameRelativeTo(VirtualFile.java:122)
at org.jboss.vfs.VirtualFile.getPathNameRelativeTo(VirtualFile.java:122)
at org.jboss.vfs.VirtualFile.getPathNameRelativeTo(VirtualFile.java:122)
at org.jboss.vfs.VirtualFile.getPathNameRelativeTo(VirtualFile.java:122)
at org.jboss.vfs.VirtualFile.getPathNameRelativeTo(VirtualFile.java:110)
at org.jboss.as.server.deployment.module.ManifestClassPathProcessor.createAdditionalModule(ManifestClassPathProcessor.java:193) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.server.deployment.module.ManifestClassPathProcessor.handlingExistingClassPathEntry(ManifestClassPathProcessor.java:185) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.server.deployment.module.ManifestClassPathProcessor.deploy(ManifestClassPathProcessor.java:160) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
... 5 more
META-INF / MANIFEST.MFに、標準的な方法で依存関係を定義するために、「Class-Path」ステートメントを追加しました。
Manifest-Version: 1.0
Dependencies: org.apache.log4j
Class-Path: mwf_ejb.jar