'deploy spring boot rest application on wildfly10

I have a spring boot rest api which is developed on Java 1.8 and deployed on Wildfly 15. when I try to deploy it on wildfly 10 errors are reported and deployment fails.

>2019-04-05 21:47:29,228 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-5) WFLYSRV0003: Could not index class META-INF/versions/9/module-info.class at /G:/job/web/wildfly-10.0.0.Final/bin/content/api.war/WEB-INF/lib/byte-buddy-1.9.10.jar: java.lang.IllegalStateException: Unknown tag! pos=3 poolCount = 86
    at org.jboss.jandex.Indexer.processConstantPool(Indexer.java:1409)
    at org.jboss.jandex.Indexer.index(Indexer.java:1443)
    at org.jboss.as.server.deployment.annotation.ResourceRootIndexer.indexResourceRo 
    ot(ResourceRootIndexer.java:99)
    at org.jboss.as.server.deployment.annotation.AnnotationIndexProcessor.deploy(Ann 
    otationIndexProcessor.java:51)
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:147)
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceCon 
    trollerImpl.java:1948)
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerIm 
    pl.java:1881)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:114 
    9)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:62 
   4)
    at java.lang.Thread.run(Thread.java:748)

>2019-04-05 21:47:30,196 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-5) WFLYSRV0003: Could not index class module-info.class at /G:/job/web/wildfly-10.0.0.Final/bin/content/api.war/WEB-INF/lib/jaxb-api-2.3.0.jar: java.lang.IllegalStateException: Unknown tag! pos=4 poolCount = 32
    at org.jboss.jandex.Indexer.processConstantPool(Indexer.java:1409)
    at org.jboss.jandex.Indexer.index(Indexer.java:1443)
    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(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)

>2019-04-05 21:47:31,041 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.module.service."deployment.api.war".main: org.jboss.msc.service.StartException in service jboss.module.service."deployment.api.war".main: WFLYSRV0179: Failed to load module: deployment.api.war:main
    at org.jboss.as.server.moduleservice.ModuleLoadService.start(ModuleLoadService.java:91)
    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(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
Caused by: org.jboss.modules.ModuleNotFoundException: jdk.unsupported:main
    at org.jboss.modules.Module.addPaths(Module.java:1092)
    at org.jboss.modules.Module.link(Module.java:1448)
    at org.jboss.modules.Module.relinkIfNecessary(Module.java:1476)
    at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:225)
    at org.jboss.as.server.moduleservice.ModuleLoadService.start(ModuleLoadService.java:68)
    ... 5 more

>2019-04-05 21:47:31,045 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "api.war")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.module.service.\"deployment.api.war\".main" => "org.jboss.msc.service.StartException in service jboss.module.service.\"deployment.api.war\".main: WFLYSRV0179: Failed to load module: deployment.api.war:main
    Caused by: org.jboss.modules.ModuleNotFoundException: jdk.unsupported:main"}}
2019-04-05 21:47:31,059 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 34) WFLYSRV0010: Deployed "api.war" (runtime-name : "api.war")
2019-04-05 21:47:31,060 INFO  [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report
WFLYCTL0186:   Services which failed to start:      service jboss.module.service."deployment.api.war".main: org.jboss.msc.service.StartException in service jboss.module.service."deployment.api.war".main: WFLYSRV0179: Failed to load module: deployment.api.war:main

Here are the content of the pom.xml all are for spring boot version 2.1.3. I tried to downgrade to Byte Buddy (without Dependencies) » 1.5.13 and jaxb to 2.2.21 the warnings are gone but the errors are still exist.

<properties>
        <java.version>1.8</java.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>javax.xml.bind</groupId>
            <artifactId>jaxb-api</artifactId>
            <version>2.3.0</version>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-entitymanager</artifactId>
            <version>5.0.12.Final</version>
        </dependency>
        <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-devtools</artifactId>
            <scope>runtime</scope>
        </dependency>

        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>8.0.15</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>net.minidev</groupId>
            <artifactId>json-smart</artifactId>
            <version>2.3</version>
            <scope>compile</scope>
        </dependency>
        <!-- https://mvnrepository.com/artifact/com.googlecode.json-simple/json-simple -->
        <dependency>
            <groupId>com.googlecode.json-simple</groupId>
            <artifactId>json-simple</artifactId>
            <version>1.1.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-api</artifactId>
            <version>2.6.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-core</artifactId>
            <version>2.6.1</version>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <version>3.1.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-configuration-processor</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>2.8.5</version>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>23.0</version>
            <type>jar</type>
        </dependency>
    </dependencies>

    <build>
        <finalName>api</finalName>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifestEntries>
                            <Dependencies>jdk.unsupported</Dependencies>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>
        </plugins>
    </build>

Are there any configuration changes to be done prior to deploying a spring boot application on wildfly 10? Are there are any specific code changes to be done to deploy on wildfly 10?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source