Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-9773

Construction/initialization of custom filter instance, configured in undertow subsystem uses incorrect/undefined TCCL

    XMLWordPrintable

Details

    • Hide

      unzip IgniteHandler.zip into $WILDFLY_HOME/modules
      set $IGNITE_HOME and unzip gatekeeper-token-config.xml.zip to that location

      Add a filter and a filter-red in standalone.xml as follows:

      <filter-ref name="igniteHandler" priority="100"/>

      <filter name="igniteHandler" class-name="no.toyota.gatekeeper.handler.IgniteHandler" module="no.toyota.gatekeeper:simplified"/>

      Show
      unzip IgniteHandler.zip into $WILDFLY_HOME/modules set $IGNITE_HOME and unzip gatekeeper-token-config.xml.zip to that location Add a filter and a filter-red in standalone.xml as follows: <filter-ref name="igniteHandler" priority="100"/> <filter name="igniteHandler" class-name="no.toyota.gatekeeper.handler.IgniteHandler" module="no.toyota.gatekeeper:simplified"/>
    • Hide

      A workaround was provided by https://developer.jboss.org/people/jaikiran

      public IgniteHandler() {
      final ClassLoader oldCL = Thread.currentThread().getContextClassLoader();
      try

      { Thread.currentThread().setContextClassLoader(TokenBouncerHandler.class.getClassLoader()); // rest of your existing code goes here .... }

      finally

      { Thread.currentThread().setContextClassLoader(oldCL); }

      Show
      A workaround was provided by https://developer.jboss.org/people/jaikiran public IgniteHandler() { final ClassLoader oldCL = Thread.currentThread().getContextClassLoader(); try { Thread.currentThread().setContextClassLoader(TokenBouncerHandler.class.getClassLoader()); // rest of your existing code goes here .... } finally { Thread.currentThread().setContextClassLoader(oldCL); }

    Description

      Custom module class loading fails with ClassNotFoundException

      I have attached a reproducible example here but it is also available on the forum thread mentioned.

      Attachments

        Activity

          People

            sdouglas1@redhat.com Stuart Douglas
            thomas.isaksen@gmail.com Thomas Isaksen (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: