JAX-RS(Resteasy 3.5.0.Final)+ Wildfly 12 + Java 9 + maven = 404未找到,但JAX-RS(Resteasy 3.5.0.Final)+ Wildfly 12 + Java 8 + maven作品 [英] 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

查看:272
本文介绍了JAX-RS(Resteasy 3.5.0.Final)+ Wildfly 12 + Java 9 + maven = 404未找到,但JAX-RS(Resteasy 3.5.0.Final)+ Wildfly 12 + Java 8 + maven作品的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个简单的Hello World示例JAX-RS项目。真的很简单和愚蠢。只是最小的配置,我打算在将来增强,只需想象这样的事情: https://robferguson.org/blog/2016/12/02/getting-started-with-resteasy/

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/ .

好吧,我的问题是,当我将Java版本设置为1.9时,我总是收到404 not found错误。但当我将其更改回1.8,mvn clean install and deploy时,它工作正常。 java版本是唯一的delta,它使其工作或不工作。如何使它与Java 9一起使用?
我使用maven 3.5和jdk 9.0.4。

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.

工作正常:

    <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>

返回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>

每隔一段代码保持不变。 wildfly控制台中没有出现任何错误 - 它的行为就像路径错误一样,但事实并非如此,因为在切换回1.8后,它可以正常工作。

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.

推荐答案

这似乎与Jandex 2.0.4的问题有关,它包含在Wildfly 12中。根据这张票:

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

恢复到jandex 2.0.3将解决问题。
一个固定版本的jandex将包含在Wildfly 13中。

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

这篇关于JAX-RS(Resteasy 3.5.0.Final)+ Wildfly 12 + Java 9 + maven = 404未找到,但JAX-RS(Resteasy 3.5.0.Final)+ Wildfly 12 + Java 8 + maven作品的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆