Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor org.apache.http related packages to private packages #54

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nimsara66
Copy link

Purpose

Fixes: wso2/api-manager#3206

Approach

The current implementation imports the org.apache.http.impl.nio.* and org.apache.http.nio.* packages from the OSGi runtime:

<Import-Package>
    !com.google.gson.internal,
    io.opentelemetry.api.common.*,
    org.apache.http.impl.nio.*,
    org.apache.http.nio.*,
</Import-Package>

Additionally, it bundles the httpasyncclient as an embedded dependency.

This approach results in the following error:

java.lang.NoClassDefFoundError: org/apache/http/nio/client/HttpAsyncClient

The error occurs because the HttpAsyncClient class is not exported to the OSGi runtime, leading to missing class definitions at runtime.

This PR refactors the dependency management approach by moving the org.apache.http.impl.nio.* and org.apache.http.nio.* packages to private packages. This change ensures that these packages are no longer imported from the OSGi runtime but are instead encapsulated within the bundle.
As a result, bundling httpasyncclient as an embedded dependency is also removed, since it is no longer required.

@CLAassistant
Copy link

CLAassistant commented Oct 17, 2024

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HttpAsyncClient not available in classpath when publishing ELK analytics data
2 participants