本文主要是介绍JBOSS启动报错Given parent is not an ancestor of this virt,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
环境:JBOSS AS 7、 Linux、JDK1.7
报错信息:
2017-07-13 10:07:16,764 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC00001: Failed to start service jboss.deployment.unit."voc.war".STRUCTURE: org.jboss.msc.service.StartException in service jboss.deployment.unit."voc.war".STRUCTURE: Failed to process phase STRUCTURE of deployment "voc.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.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_80]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_80]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_80]
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: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:162) [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
可能原因:
jar包的manifest.mf中class-path导致的
本案例中,原始的jar包classpath:
Manifest-Version: 1.0
Class-Path: ridl.jar jurt.jar ../../lib/ ../bin/
Solar-Version: 320m14(Build:9489)
Sealed: true
RegistrationClassName: com.sun.star.comp.JavaUNOHelperServices
UNO-Type-Path:
修改后,重新打包的classpath,带manifest.mf打包命令"jar -cvfm juh-3.2.1.jar MANIFEST.MF com/*":
打包的文件结构:
注意:MANIFEST.MF文件最后一行为空行,结尾不能有空格
这篇关于JBOSS启动报错Given parent is not an ancestor of this virt的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!