java.lang.IllegalAccessError: tried to access method com.ning.http.client.providers.grizzly.HttpTransactionContext.getAsyncHandler()Lcom/ning/http/client/AsyncHandler; from class org.mule.runtime.module.http.internal.request.grizzly.FlowWorkManagerIOStrategy

MuleSoft JIRA | Lautaro Fernandez | 5 months ago
  1. 0

    When consuming the `http:requester` MP built by the SDK in a test, the override HttpTransactionContext class by mule is not being picked up, provoking the following stack (it tries to access a method that hasn't the necessary visibility): {code:java}SEVERE: doSelect exception java.lang.IllegalAccessError: tried to access method com.ning.http.client.providers.grizzly.HttpTransactionContext.getAsyncHandler()Lcom/ning/http/client/AsyncHandler; from class org.mule.runtime.module.http.internal.request.grizzly.FlowWorkManagerIOStrategy at org.mule.runtime.module.http.internal.request.grizzly.FlowWorkManagerIOStrategy.getWorkManager(FlowWorkManagerIOStrategy.java:119) at org.mule.runtime.module.http.internal.request.grizzly.FlowWorkManagerIOStrategy.getThreadPoolFor(FlowWorkManagerIOStrategy.java:90) at org.mule.runtime.module.http.internal.request.grizzly.FlowWorkManagerIOStrategy.executeIoEvent(FlowWorkManagerIOStrategy.java:69) at org.glassfish.grizzly.strategies.AbstractIOStrategy.executeIoEvent(AbstractIOStrategy.java:89) at org.glassfish.grizzly.nio.SelectorRunner.iterateKeyEvents(SelectorRunner.java:415) at org.glassfish.grizzly.nio.SelectorRunner.iterateKeys(SelectorRunner.java:384) at org.glassfish.grizzly.nio.SelectorRunner.doSelect(SelectorRunner.java:348) at org.glassfish.grizzly.nio.SelectorRunner.run(SelectorRunner.java:279) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:591) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571) at java.lang.Thread.run(Thread.java:745){code} Steps to reproduce: 1) Write an xml that uses the new http requester [1] 2) Write a test that extends `ExtensionFunctionalTestCase` and add `org.mule.extension.http.internal.HttpConnector.class` as a describer [2] 3) Use *ONLY* the dependency of the mule-module-http-ext [3] 4) Run the test Workaround: Add the following dependency to force the proper loading of overriden java classes {code:xml} <dependency> <groupId>org.mule.modules</groupId> <artifactId>mule-module-http</artifactId> <version>${project.version}</version> <scope>test</scope> </dependency>{code} [1] {code:xml}<mule xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:httpn="http://www.mulesoft.org/schema/mule/httpn" xsi:schemaLocation="http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd http://www.mulesoft.org/schema/mule/httpn http://www.mulesoft.org/schema/mule/httpn/current/mule-httpn.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <httpn:request-config basePath="/basic-auth" followRedirects="true" enableCookies="true" name="simple-config" sendBodyMode="AUTO" requestStreamingMode="AUTO" parseResponse="true"> <httpn:request-connection protocol="HTTP" port="80" host="httpbin.org" usePersistentConnections="true" connectionIdleTimeout="30000" maxConnections="-1"/> <httpn:authentication> <httpn:basic-authentication password="#['passLP']" preemptive="true" username="#['userLP']"/> </httpn:authentication> </httpn:request-config> <flow initialState="started" name="testHttpDoLogin"> <processor-chain> <httpn:request path="/{aUser}/{aPass}" method="GET" config-ref="simple-config" key="ANY"> <httpn:request-builder> <httpn:simple-request-builder> <httpn:uri-params> <httpn:uri-param value="userLP" key="aUser"/> <httpn:uri-param value="passLP" key="aPass"/> </httpn:uri-params> </httpn:simple-request-builder> </httpn:request-builder> </httpn:request> </processor-chain> </flow> </mule>{code} [2] {code:java}public class OperationModuleWithConfigGlobalElementTestCase extends ExtensionFunctionalTestCase { @Override protected String getConfigFile() { return "operation-with-config-global-elements-module-flow.xml"; } @Override protected Class<?>[] getAnnotatedExtensionClasses() { return new Class<?>[] {org.mule.extension.http.internal.HttpConnector.class}; } @Override public int getTestTimeoutSecs() { return 10000000; } @Test public void testHttpDoLogin() throws Exception{ MuleEvent muleEvent = flowRunner("testHttpDoLogin").run(); assertThat(muleEvent.getMessage().getPayload(), Is.is("success with basic-authentication for user: userLP")); } }{code} [3] {code:xml} <dependency> <groupId>org.mule.modules</groupId> <artifactId>mule-module-http-ext</artifactId> <version>${project.version}</version> <scope>test</scope> </dependency>{code}

    MuleSoft JIRA | 5 months ago | Lautaro Fernandez
    java.lang.IllegalAccessError: tried to access method com.ning.http.client.providers.grizzly.HttpTransactionContext.getAsyncHandler()Lcom/ning/http/client/AsyncHandler; from class org.mule.runtime.module.http.internal.request.grizzly.FlowWorkManagerIOStrategy
  2. 0

    Mule gives error when making http request from JBoss

    Stack Overflow | 1 year ago | user1431708
    java.lang.IllegalAccessError: tried to access method com.ning.http.client.providers.grizzly.HttpTransactionContext.getAsyncHandler()Lcom/ning/http/client/AsyncHandler; from class org.mule.module.http.internal.request.grizzly.FlowWorkManagerIOStrategy
  3. 0

    Print Page - [0.65.2a] Starsector+ Vanilla Enhancement Mod 2.8.1

    fractalsoftworks.com | 1 year ago
    java.lang.IllegalAccessError: tried to access method data.scripts.world.BaseSpawnPoint.spawnFleet()Lcom/fs/starfarer/api/campaign/CampaignFleetAPI; from class data.scripts.world.vayraOasisGen
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Installing hawtio logs exception in karaf

    GitHub | 2 years ago | davsclaus
    java.lang.IllegalAccessError: tried to access method com.google.common.collect.MapMaker.makeComputingMap(Lcom/google/common/base/Function;)Ljava/util/concurrent/ConcurrentMap; from class com.google.inject.internal.Annotations$AnnotationChecker
  6. 0

    java.lang.IllegalAccessError: tried to access method com.google.common.collect.MapMaker.makeComputingMap

    GitHub | 3 years ago | gionn
    java.lang.IllegalAccessError: tried to access method com.google.common.collect.MapMaker.makeComputingMap(Lcom/google/common/base/Function;)Ljava/util/concurrent/ConcurrentMap; from class nl.javadude.scannit.registry.Registry

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalAccessError

      tried to access method com.ning.http.client.providers.grizzly.HttpTransactionContext.getAsyncHandler()Lcom/ning/http/client/AsyncHandler; from class org.mule.runtime.module.http.internal.request.grizzly.FlowWorkManagerIOStrategy

      at org.mule.runtime.module.http.internal.request.grizzly.FlowWorkManagerIOStrategy.getWorkManager()
    2. org.mule.runtime
      FlowWorkManagerIOStrategy.executeIoEvent
      1. org.mule.runtime.module.http.internal.request.grizzly.FlowWorkManagerIOStrategy.getWorkManager(FlowWorkManagerIOStrategy.java:119)
      2. org.mule.runtime.module.http.internal.request.grizzly.FlowWorkManagerIOStrategy.getThreadPoolFor(FlowWorkManagerIOStrategy.java:90)
      3. org.mule.runtime.module.http.internal.request.grizzly.FlowWorkManagerIOStrategy.executeIoEvent(FlowWorkManagerIOStrategy.java:69)
      3 frames
    3. Grizzly
      AbstractThreadPool$Worker.run
      1. org.glassfish.grizzly.strategies.AbstractIOStrategy.executeIoEvent(AbstractIOStrategy.java:89)
      2. org.glassfish.grizzly.nio.SelectorRunner.iterateKeyEvents(SelectorRunner.java:415)
      3. org.glassfish.grizzly.nio.SelectorRunner.iterateKeys(SelectorRunner.java:384)
      4. org.glassfish.grizzly.nio.SelectorRunner.doSelect(SelectorRunner.java:348)
      5. org.glassfish.grizzly.nio.SelectorRunner.run(SelectorRunner.java:279)
      6. org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:591)
      7. org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571)
      7 frames