Reputation: 2180
I am building a JBoss Application Server module, on JBossAS 7.1.1. While trying to modify the classpath in the manifest file, I ran into this error:
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
Upvotes: 3
Views: 11745
Reputation: 86
Also, you could have something as:
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
instead of
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
In this case, review 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>
Upvotes: 7
Reputation: 2180
It turns out, a slight bug in MANIFEST.MF
was causing this issue. The file was:
Manifest-Version: 1.0
Class-Path:
Turns out, the bug was due to there being no space after Class-Path:
. This (only a space different) is what works:
Manifest-Version: 1.0
Class-Path:
Hopefully this will stop others from wondering.
Upvotes: 11