You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@servicemix.apache.org by "Jean-Baptiste Onofré (Jira)" <ji...@apache.org> on 2022/03/06 07:13:00 UTC

[jira] [Assigned] (SM-5023) Spring-web and Spring-core miss some import packages

     [ https://issues.apache.org/jira/browse/SM-5023?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jean-Baptiste Onofré reassigned SM-5023:
----------------------------------------

    Assignee: Jean-Baptiste Onofré

> Spring-web and Spring-core miss some import packages
> ----------------------------------------------------
>
>                 Key: SM-5023
>                 URL: https://issues.apache.org/jira/browse/SM-5023
>             Project: ServiceMix
>          Issue Type: Bug
>    Affects Versions: bundles-2022.01
>            Reporter: Daniel Stoch
>            Assignee: Jean-Baptiste Onofré
>            Priority: Major
>
> I am trying to use spring-web and spring-webflux 5.3.15 bundle and JettyClientHttpConnector class:
> {code}
>     ClientHttpConnector connector = new JettyClientHttpConnector();
>     WebClient webClient = WebClient.builder().clientConnector(connector).build();
>     final RequestHeadersSpec<?> spec = webClient.get().uri("https://jsonplaceholder.typicode.com/comments");
>     spec.retrieve();
> {code}
> The first call raises an exception:
> {noformat}
> java.lang.NoClassDefFoundError: org/reactivestreams/Publisher
> ...
> Caused by: java.lang.ClassNotFoundException: org.reactivestreams.Publisher cannot be found by org.apache.servicemix.bundles.spring-web_5.3.15.1
> {noformat}
> I think this spring-web bundle misses some (optional?) imports, eg.: org.reactivestreams, org.eclipse.jetty.client. Maybe there are more missing imports like: reactor.core.publisher, ...?
> I have added these two imports to test:
> {noformat}
> org.reactivestreams
> org.eclipse.jetty.client
> {noformat}
> After investigating for a while I managed to get it to work. I have to add additional imports to spring-web and spring-core:
> *spring-core*
> {noformat}
> org.reactivestreams;version="[1.0,2)";resolution:=optional,
> reactor.core;version="[3.4,4)";resolution:=optional,
> reactor.core.publisher;version="[3.4,4)";resolution:=optional,
> reactor.util.concurrent;version="[3.4,4)";resolution:=optional,
> reactor.util.context;version="[3.4,4)";resolution:=optional,
> reactor.util.function;version="[3.4,4)";resolution:=optional
> {noformat}
> *spring-web*
> {noformat}
> org.eclipse.jetty.client;resolution:=optional,
> org.eclipse.jetty.client.api;resolution:=optional,
> org.eclipse.jetty.reactive.client;resolution:=optional,
> org.eclipse.jetty.util;resolution:=optional,
> org.eclipse.jetty.http;resolution:=optional,
> org.reactivestreams;version="[1.0,2)";resolution:=optional,
> reactor.core;version="[3.4,4)";resolution:=optional,
> reactor.core.publisher;version="[3.4,4)";resolution:=optional,
> reactor.util.concurrent;version="[3.4,4)";resolution:=optional,
> reactor.util.context;version="[3.4,4)";resolution:=optional,
> reactor.util.function;version="[3.4,4)";resolution:=optional
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)