Skip to content

[BUG] 3.11.0: ApacheHttpClient5Transport fails with NoClassDefFoundError: org/reactivestreams/Publisher #2294

Closed

Description

@rzo1

What is the bug?

Since 3.11.0, building an ApacheHttpClient5Transport fails unless org.reactivestreams:reactive-streams happens to be on the classpath:

java.lang.NoClassDefFoundError: org/reactivestreams/Publisher
	at org.opensearch.client.transport.httpclient5.ApacheHttpClient5TransportBuilder.build(ApacheHttpClient5TransportBuilder.java:304)
Caused by: java.lang.ClassNotFoundException: org.reactivestreams.Publisher

The streaming support added in #2144 made ApacheHttpClient5Transport use org.reactivestreams.Publisher (in the signature of stream(...)), org.apache.hc.core5.reactive.ReactiveResponseConsumer (httpcore5-reactive) and reactor.core.publisher.Mono (reactor-core). None of them is declared in the published POM of opensearch-java 3.11.0. The build only gets them through opensearch-rest-client, which is compileOnly, and reactor-test, which is testImplementation, so the tests don't notice.

How can one reproduce the bug?

  1. Depend on org.opensearch.client:opensearch-java:3.11.0 only (no opensearch-rest-client)
  2. ApacheHttpClient5TransportBuilder.builder(new HttpHost("http", "localhost", 9200)).build()
  3. NoClassDefFoundError: org/reactivestreams/Publisher (works with 3.10.0)

What is the expected behavior?

The dependencies the transport needs are declared in the POM: reactive-streams (it is part of the public API of stream(...)), and httpcore5-reactive and reactor-core for the streaming path.

What is your host/environment?

opensearch-java 3.11.0, JDK 25. Found in Apache StormCrawler when bumping from 3.10.0 (apache/stormcrawler#2334); adding reactive-streams explicitly works around it there.

Activity

  1. added
    v3.11.1
    and removed on Nov 16, 2026
  2. added a commit that references this issue on Nov 16, 2026
    5efc958
  3. added a commit that references this issue on Nov 24, 2026
    18979a4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    v3.11.1

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions