3

JBossAS7.1.1でJBossApplicationServerモジュールを構築しています。マニフェストファイルのクラスパスを変更しようとしたときに、次のエラーが発生しました。

12:30:53,097 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015876: Starting deployment of "MyDeployableProject.war"
12:30:53,141 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC00001: Failed to start service jboss.deployment.unit."MyDeployableProject.war".STRUCTURE: org.jboss.msc.service.StartException in service jboss.deployment.unit."MyDeployableProject.war".STRUCTURE: Failed to process phase STRUCTURE of deployment "MyDeployableProject.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) [classes.jar:1.6.0_31]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [classes.jar:1.6.0_31]
    at java.lang.Thread.run(Thread.java:680) [classes.jar:1.6.0_31]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: Failed to get manifest for deployment "/opt/server/bin/jboss-as-7.1.1.Final/standalone/deployments/MyDeployableProject.war"
    at org.jboss.as.server.deployment.module.ManifestAttachmentProcessor.deploy(ManifestAttachmentProcessor.java:73) [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
Caused by: java.io.IOException: invalid header field
    at java.util.jar.Attributes.read(Attributes.java:393) [classes.jar:1.6.0_31]
    at java.util.jar.Manifest.read(Manifest.java:182) [classes.jar:1.6.0_31]
    at java.util.jar.Manifest.<init>(Manifest.java:52) [classes.jar:1.6.0_31]
    at org.jboss.vfs.VFSUtils.readManifest(VFSUtils.java:216)
    at org.jboss.vfs.VFSUtils.getManifest(VFSUtils.java:199)
    at org.jboss.as.server.deployment.module.ManifestAttachmentProcessor.deploy(ManifestAttachmentProcessor.java:69) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
    ... 6 more
4

2 に答える 2

11

MANIFEST.MFわずかなバグがこの問題を引き起こしていたことが判明しました。ファイルは次のとおりです。

Manifest-Version: 1.0
Class-Path:

結局のところ、バグはの後にスペースがないことが原因でしたClass-Path:。これ(スペースが異なるだけ)が機能します:

Manifest-Version: 1.0
Class-Path: 

うまくいけば、これは他の人が不思議に思うのを防ぐでしょう。

于 2012-06-04T18:10:31.140 に答える
7

また、次のようなものがあります。

Manifest-Version: 1.0
Dependencies: org.slf4j,org.apache.commons.logging
**,org.joda.time**
Built-By: Pablo
Build-Jdk: 1.6.0_30
Created-By: Apache Maven
Archiver-Version: Plexus Archiver

それ以外の

Manifest-Version: 1.0
Dependencies: org.slf4j,org.apache.commons.logging,org.joda.time
Built-By: Pablo
Build-Jdk: 1.6.0_30
Created-By: Apache Maven
Archiver-Version: Plexus Archiver

この場合、pom.xmlを確認してください

<plugin>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.2</version>
                <configuration>
                    <failOnMissingWebXml>false</failOnMissingWebXml>
                    <archive>
                        <manifestEntries>
<!-- IMPORTANT: All dependencies in te same line -->                            <Dependencies>org.slf4j,org.apache.commons.logging,org.joda.time</Dependencies>
                        </manifestEntries>

                    </archive>
                </configuration>
            </plugin>

于 2012-08-26T20:13:55.320 に答える