我已经使用JAX-WS开发了OSGi包,并试图将其部署到jboss eap 6中,但是会出现以下错误。
11:39:09,798 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.deployment.unit."web-service.war".STRUCTURE: org.jboss.msc.service.StartException in service jboss.deployment.unit."web-service.war".STRUCTURE: JBAS018733: Failed to process phase STRUCTURE of deployment "web-service.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:123) [jboss-as-server-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA-redhat-1.jar:1.0.2.GA-redhat-1]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA-redhat-1.jar:1.0.2.GA-redhat-1]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_17]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_17]
at java.lang.Thread.run(Thread.java:619) [rt.jar:1.6.0_17]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS018741: Failed to get manifest for deployment "/D:/jboss-eap-6.0/bin/content/web-service.war"
at org.jboss.as.server.deployment.module.ManifestAttachmentProcessor.deploy(ManifestAttachmentProcessor.java:74) [jboss-as-server-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:116) [jboss-as-server-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
... 5 more
Caused by: java.io.IOException: invalid header field
at java.util.jar.Attributes.read(Attributes.java:389) [rt.jar:1.6.0_17]
at java.util.jar.Manifest.read(Manifest.java:182) [rt.jar:1.6.0_17]
at java.util.jar.Manifest.<init>(Manifest.java:52) [rt.jar:1.6.0_17]
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:70) [jboss-as-server-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
... 6 more
MANIFEST.MF文件的代码是。
Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Created-By: 1.6.0_16 (Sun Microsystems Inc.)
Built-By: langfr
Build-Jdk: 1.6.0_16
Bundle-ClassPath: WEB-INF/classes/
Private-Package: sahoo.hybridapp.jaxws1.webservice;version="1.0-SNAPSHOT"
Bundle-Version: 1.0.0.SNAPSHOT
Tool: Bnd-0.0.311
Bundle-Name: Web Service module of our application
Bnd-LastModified: 1270710909852
Bundle-ManifestVersion: 2
Bundle-SymbolicName: sahoo.hybridapp.jaxws1.web-service
Web-ContextPath: /hybridapp.jaxws1.web-service
Import-Package: javax.jws;version="2.0",
org.osgi.framework;version="1.5",
sahoo.hybridapp.jaxws1.service;version="1.0",
org.apache.axis2.client,
org.jboss.spec.javax.servlet.jboss-servlet-api_2.5_spec;version="1.0.1.Final-redhat-1",
org.apache.felix.log;version="1.0.0.redhat-1",
org.apache.felix.configadmin;version="1.2.8.redhat-1",
jboss-osgi-logging;version="1.0.0.redhat-1"
请有人帮我解决我的MANIFEST.MF文件出了什么问题。
感谢。
答案 0 :(得分:0)
从我所看到的,OSGi包具有.war扩展名。尝试将其重命名为web-service.jar