Uploaded image for project: 'HttpComponents HttpCore'
  1. HttpComponents HttpCore
  2. HTTPCORE-741

WARNING: Illegal reflective access by org.apache.hc.core5.util.ReflectionUtils$1

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Invalid
    • 5.2.1
    • None
    • HttpCore
    • None

    Description

      Using the following code:

      SystemDefaultRoutePlanner planner = new SystemDefaultRoutePlanner(ProxySelector.getDefault());
      CloseableHttpAsyncClient httpClient = HttpAsyncClients.custom().setRoutePlanner(planner).build();
      httpClient.start();

       

      I receive the error:

      WARNING: An illegal reflective access operation has occurredWARNING: Illegal reflective access by org.apache.hc.core5.util.ReflectionUtils$1 (jar:file:/Users/jeremy/Projects/vuln-tools/vulnz/build/libs/vulnz-3.0.0.jar!/BOOT-INF/lib/httpcore5-5.1.4.jar!/) to method sun.security.ssl.SSLEngineImpl.getApplicationProtocol()

       

      I've seen HTTPCORE-664 However, the referenced solution appears to be for httpclient5.1.x (see https://github.com/apache/httpcomponents-client/blob/rel/v5.1.4/httpclient5/src/test/java/org/apache/hc/client5/http/examples/AsyncClientTlsAlpn.java#L64). Using 5.2.x the referenced APIs are marked as deprecated. Is there an updated solution that does not use a deprecated API (specifically the call to `setTlsDetailsFactory` is deprecated)?

      Attachments

        Activity

          People

            Unassigned Unassigned
            jeremy.long@gmail.com Jeremy Long
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: