org.glassfish.Jersey.interno.NO SE ENCONTRÓ LA PÁGINA


Estoy usando jersey para mi proyecto y tring para analizar un URI de una cadena.

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

El código es simple, pero obtengo un error debajo de

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

Parece que el programa no puede encontrar al delegado. Ya importé javax.ws.rs.core.UriBuilder y tengo jersey-common 2.0 que debería contener el delegado en mi ruta de compilación. Pero todavía tengo este error.

¿Alguien sabe cómo arreglarlo? ¡Gracias!

Author: Nathan, 2013-10-18

4 answers

Si estás usando Maven, usa la siguiente dependencia:

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

Para Gradle, lo siguiente funcionará:

testCompile 'org.glassfish.jersey.core:jersey-common:2.22.2'
 52
Author: Archimedes Trajano,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-03-21 22:55:55

En mi caso, el problema era que se estaba usando otro frasco llamado: javax.ws.rs-api-2.0.jar

La eliminación de ese frasco resolvió mi problema.

El frasco que he usado:

<include name="jersey-client-1.9.jar" />
<include name="jersey-core-1.9.jar" />
<include name="jersey-multipart-1.9.jar" />
 3
Author: Shahadet,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-05-13 07:00:45

Desarrollando contra un tiempo de ejecución Wildfly 10.1 No quería introducir Jersey en mis compilaciones. Con Gradle usé

testRuntime "org.jboss.resteasy:resteasy-jaxrs:$versions.resteasy"

La versión Resteasy es 3.0.19.Final. Este frasco contiene

META-INF/services/javax.ws.rs.ext.RuntimeDelegate

Con una entrada

org.jboss.resteasy.spi.ResteasyProviderFactory
 2
Author: Thomas Newman,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-12-02 01:11:34
<dependency>
    <groupId>org.glassfish.jersey.core</groupId>
    <artifactId>jersey-common</artifactId>
    <version>2.26</version>
    <scope>test</scope>
</dependency>

Me encontré con problemas con Java 8 y jersey-common 2.22.2 pero 2.26 funcionó.

 1
Author: Adrienne Dunham,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-09-18 22:50:35