弹簧靴在 Wildfly 8 上不起作用

Posted

技术标签:

【中文标题】弹簧靴在 Wildfly 8 上不起作用【英文标题】:spring boot doesn't work on wildfly 8 【发布时间】:2017-11-14 07:40:48 【问题描述】:

当我在wildfly 10中部署我的战争时它工作正常,但我需要将此文件上传到我们使用wildfly 8的服务器,在这种情况下我有以下异常

       17:39:40,655 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC000001: Failed to start service jboss.deployment.unit."G-Moika.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."G-Moika.war".INSTALL: JBAS018733: Failed to process phase INSTALL of deployment "G-Moika.war"
        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166) [wildfly-server-8.2.0.Final.jar:8.2.0.Final]
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_121]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_121]
        at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_121]
      Caused by: 
     org.jboss.as.server.deployment.DeploymentUnitProcessingException: 
      JBAS017327: Deployment error processing SCI for jar: logback-classic-
       1.1.11.jar
        at 

  org.wildfly.extension.undertow.deployment.ServletContainerInitializerDeploymentProcessor.loadSci(ServletContainerInitializerDeploymentProcessor.java:207)
        at org.wildfly.extension.undertow.deployment.ServletContainerInitializerDeploymentProcessor.deploy(ServletContainerInitializerDeploymentProcessor.java:128)
        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159) [wildfly-server-8.2.0.Final.jar:8.2.0.Final]
        ... 5 more
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS017327: Deployment error processing SCI for jar: logback-classic-1.1.11.jar
        at org.wildfly.extension.undertow.deployment.ServletContainerInitializerDeploymentProcessor.loadSci(ServletContainerInitializerDeploymentProcessor.java:199)
        ... 7 more
Caused by: java.lang.ClassNotFoundException: # See javax.servlet.ServletContainerInitializer javadocs from [Module "deployment.G-Moika.war:main" from Service Module Loader]

我的 pom.xml 是

      <?xml version="1.0" encoding="UTF-8"?>
        <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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.gmoika</groupId>
    <artifactId>GmoikaApi</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>war</packaging>

    <name>GmoikaApi</name>
    <description>GMoika project</description>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>1.5.3.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-
      8</project.reporting.outputEncoding>
        <java.version>1.8</java.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>
        <dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
    <exclusions>
        <exclusion>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-tomcat</artifactId>
        </exclusion>
    </exclusions>
     </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-rest</artifactId>
        </dependency>
        <dependency>
            <groupId>com.vividsolutions</groupId>
            <artifactId>jts</artifactId>
            <version>1.13</version>
        </dependency>

          <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>2.5</version>
            <scope>provided</scope>
        </dependency>

        <!--Hibernete -->
        <dependency>
     <groupId>org.hibernate</groupId>
     <artifactId>hibernate-spatial</artifactId>
     <version>5.0.4.Final</version>
   </dependency>
        <!-- Groovy -->
        <dependency>
    <groupId>org.codehaus.groovy</groupId>
    <artifactId>groovy-all</artifactId>
    <version>2.4.11</version>
</dependency>

        <!-- Postgre -->
        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <scope>runtime</scope>
        </dependency>



       <dependency>
    <groupId>org.hibernate</groupId>
    <artifactId>hibernate-core</artifactId>
    <version>5.0.4.Final</version>
</dependency>


        <dependency>
            <groupId>net.spy</groupId>
            <artifactId>spymemcached</artifactId>
            <version>2.12.2</version>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-tomcat</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>18.0</version>
        </dependency>
        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
            <version>1.8</version>
        </dependency>

        <dependency>
            <groupId>org.ini4j</groupId>
            <artifactId>ini4j</artifactId>
            <version>0.5.2</version>
        </dependency>
        <dependency>
            <groupId>javax.mail</groupId>
            <artifactId>mail</artifactId>
            <version>1.4</version>
        </dependency>
        <dependency>
            <groupId>com.rabbitmq</groupId>
            <artifactId>amqp-client</artifactId>
            <version>4.1.0</version>
        </dependency>

        <dependency>
            <groupId>jaxen</groupId>
            <artifactId>jaxen</artifactId>
            <version>1.1.1</version>
        </dependency>

        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>2.3</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.persistence</groupId>
            <artifactId>eclipselink</artifactId>
            <version>2.5.2</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.persistence</groupId>
            <artifactId>org.eclipse.persistence.jpa.modelgen.processor</artifactId>
            <version>2.5.2</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <build>
         <finalName>G-Moika</finalName>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

</project>

由于widlfly版本,我发现了这一点。对吗?

【问题讨论】:

【参考方案1】:

pom.xml 中指定 logback 版本:

<properties>
    <logback.version>1.1.9</logback.version>
</properties>

【讨论】:

您好,感谢回复,但知道我有以下错误,com.sun.faces.config.ConfigureListener 缺少依赖项:service jboss.deployment.unit,G-Moika.war 部署组件错误 我们看上面JBAS017327: Deployment error processing SCI for jar: logback-classic-1.1.11.jar at 【参考方案2】:

我切换到wildfly 10 现在它可以工作了,可能是wildfly 8 的问题

【讨论】:

以上是关于弹簧靴在 Wildfly 8 上不起作用的主要内容,如果未能解决你的问题,请参考以下文章

Wildfly 远程访问管理控制台不起作用

弹簧注释不起作用

delete()在laravel 8控制器上不起作用[重复]

UIScreenEdgePanGestureRecognizer 在 iOS 8 上不起作用

弹簧数据 jpa utf-8 编码不起作用

Slack 通知在 Windows 8 上不起作用