简体   繁体   中英

JAX-RS (Resteasy 3.5.0.Final) + Wildfly 12 + Java 9 + maven = 404 not found, but JAX-RS (Resteasy 3.5.0.Final) + Wildfly 12 + Java 8 + maven works

I have got a simple Hello World example JAX-RS project. Really simple and stupid. Just minimal configuration, which I intend to enhance in future, just imagine something like this with : https://robferguson.org/blog/2016/12/02/getting-started-with-resteasy/ .

Well, my problem is, that when I set the Java version to "1.9", I always receive a "404 not found" error. But when I change it back to 1.8, mvn clean install and deploy, it works fine. The java version is the only delta, which makes it working or not working. How to make it work with java 9? I do use maven 3.5 and jdk 9.0.4.

works fine:

    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.7.0</version>
        <configuration>
            <source>1.8</source>
            <target>1.8</target>
        </configuration>
    </plugin>

returns 404:

    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.7.0</version>
        <configuration>
            <source>1.9</source>
            <target>1.9</target>
        </configuration>
    </plugin>

Every other piece of code remains unchanged. No errors appear in the wildfly console - it acts as if the path was wrong, but it is not, because after switching back to 1.8, it works fine with the same path.

This seems to be related to a problem with Jandex 2.0.4, which was included in Wildfly 12. According to this ticket:

https://issues.jboss.org/projects/WFLY/issues/WFLY-9961?filter=allissues

reverting to jandex 2.0.3 will fix the issue. A fixed version of jandex will be included in Wildfly 13.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM