我有以下pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mkyong</groupId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<name>spring3 mvc maven</name>
<properties>
<jdk.version>1.6</jdk.version>
<spring.version>3.0.0.RELEASE</spring.version>
<jstl.version>1.2</jstl.version>
<jackson.version>1.9.10</jackson.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>${jstl.version}</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source>${jdk.version}</source>
<target>${jdk.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<version>1.1.0.Alpha5</version>
</plugin>
<!-- <plugin> <groupId>org.eclipse.jetty</groupId> <artifactId>jetty-maven-plugin</artifactId>
<version>9.2.11.v20150529</version> <configuration> <scanIntervalSeconds>10</scanIntervalSeconds>
<webApp> <contextPath>/spring3</contextPath> </webApp> </configuration> </plugin> -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.9</version>
<configuration>
<downloadSources>true</downloadSources>
<downloadJavadocs>true</downloadJavadocs>
<wtpversion>2.0</wtpversion>
<wtpContextName>spring3</wtpContextName>
</configuration>
</plugin>
</plugins>
</build>
<artifactId>kuppiWar</artifactId>
成功构建后,当我尝试在wildfly 10.0上部署时,我得到了每个依赖jar的警告错误
22:57:12,211 WARN [org.jboss.as.server.deployment] (MSC service thread 1-4) WFLYSRV0003: Could not index class org/springframework/remoting/jaxws/LocalJaxWsServiceFactoryBean.class at /C:/Users/admin/wildfly-10.0.0.Final/standalone/deployments/kuppiWar.war/WEB-INF/lib/spring-web-3.0.0.RELEASE.jar: java.util.zip.ZipException: invalid LOC header (bad signature)
at java.util.zip.ZipFile.read(Native Method)
at java.util.zip.ZipFile.access$1400(Unknown Source)
at java.util.zip.ZipFile$ZipFileInputStream.read(Unknown Source)
at java.util.zip.ZipFile$ZipFileInflaterInputStream.fill(Unknown Source)
at java.util.zip.InflaterInputStream.read(Unknown Source)
at java.io.BufferedInputStream.fill(Unknown Source)
at java.io.BufferedInputStream.read1(Unknown Source)
at java.io.BufferedInputStream.read(Unknown Source)
at java.io.DataInputStream.readFully(Unknown Source)
at java.io.DataInputStream.readFully(Unknown Source)
at org.jboss.jandex.Indexer.verifyMagic(Indexer.java:1146)
at org.jboss.jandex.Indexer.index(Indexer.java:1433)
at org.jboss.as.server.deployment.annotation.ResourceRootIndexer.indexResourceRoot(ResourceRootIndexer.java:99)
at org.jboss.as.server.deployment.annotation.AnnotationIndexProcessor.deploy(AnnotationIndexProcessor.java:51)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:147)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
最后我得到以下错误消息
22:57:12,315 ERROR [org.jboss.as.controller.management-operation] (DeploymentScanner-threads - 1) WFLYCTL0013: Operation ("full-replace-deployment") failed - address: ([]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"kuppiWar.war\".STRUCTURE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"kuppiWar.war\".STRUCTURE: WFLYSRV0153: Failed to process phase STRUCTURE of deployment \"kuppiWar.war\"
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYSRV0161: Failed to get manifest for deployment \"/C:/Users/admin/wildfly-10.0.0.Final/standalone/deployments/kuppiWar.war/WEB-INF/lib/spring-beans-3.0.0.RELEASE.jar\"
Caused by: java.util.zip.ZipException: invalid LOC header (bad signature)"}}
22:57:12,387 INFO [org.jboss.as.server](DeploymentScanner-threads - 1)WFLYSRV0016:替换了部署&#34; kuppiWar.war&#34;部署&#34; kuppiWar.war&#34; 22:57:12,388 INFO [org.jboss.as.controller](DeploymentScanner-threads - 1)WFLYCTL0183:服务状态报告 WFLYCTL0186:无法启动的服务:service jboss.deployment.unit。&#34; kuppiWar.war&#34; .STRUCTURE 服务jboss.deployment.unit。&#34; kuppiWar.war&#34; .STRUCTURE:服务jboss.deployment.unit中的org.jboss.msc.service.StartException。&#34; kuppiWar.war&#34; .STRUCTURE: WFLYSRV0153:无法处理部署的阶段结构&#34; kuppiWar.war&#34;
答案 0 :(得分:0)
检查部署档案是否存在损坏,并在必要时重新打包。
如果使用&#34;域模式&#34;并且在域控制器和主机控制器之间或两个主机控制器之间存在防火墙或其他安全策略,防火墙可能会阻止文件传输。在这种情况下,将丢失以下错误消息。