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

ⅰ亾dé卋堺 提交于 2019-12-22 08:59:43

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/49167695/jax-rs-resteasy-3-5-0-final-wildfly-12-java-9-maven-404-not-found-but

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!