org.glassfish.jersey.internal.RuntimeDelegateImpl未找到 [英] org.glassfish.jersey.internal.RuntimeDelegateImpl NOT FOUND

查看:2893
本文介绍了org.glassfish.jersey.internal.RuntimeDelegateImpl未找到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  UriBuilder.fromUri(http ://本地主机:8000\" ).build(); 

代码很简单,但在
$ b下面出现错误$ b

  java.lang.ClassNotFoundException:org.glassfish.jersey.internal.RuntimeDelegateImpl 

看起来程序找不到委托。我已经导入了 javax.ws.rs.core.UriBuilder 并且 jersey-common 2.0 应该包含委托我的构建路径。但我仍然得到这个错误。



有人知道如何解决它吗?谢谢!

解决方案

如果您使用的是Maven,请使用以下依赖项:

 < dependency> 
< groupId> org.glassfish.jersey.core< / groupId>
< artifactId> jersey-common< / artifactId>
< version> 2.22.2< / version>
< scope> test< / scope>
< /依赖关系>

对于Gradle,以下内容将起作用:

  testCompile'org.glassfish.jersey.core:jersey-common:2.22.2'


I am using jersey for my project and tring to parse a URI from a string.

UriBuilder.fromUri("http://localhost:8000").build();

The code is simple, but I get a error below

java.lang.ClassNotFoundException: org.glassfish.jersey.internal.RuntimeDelegateImpl

It seems the program can not find the delegate. I already imported javax.ws.rs.core.UriBuilder and have jersey-common 2.0 that should contain the delegate in my build path. But I still get this error.

Does someone know how to fix it? Thanks!

解决方案

If you're using Maven, use the following dependency:

<dependency>
    <groupId>org.glassfish.jersey.core</groupId>
    <artifactId>jersey-common</artifactId>
    <version>2.22.2</version>
    <scope>test</scope>
</dependency>

For Gradle, the following will work:

testCompile 'org.glassfish.jersey.core:jersey-common:2.22.2'

这篇关于org.glassfish.jersey.internal.RuntimeDelegateImpl未找到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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