Uploaded image for project: 'apiman (API Management)'
  1. apiman (API Management)
  2. APIMAN-1200

Class not found when trying to use the log4j logger

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Critical
    • 1.3.0.Final
    • None
    • None
    • None

    Description

      {"responseCode":500,"message":"org/apache/logging/log4j/LogManager","trace":"java.lang.NoClassDefFoundError:
      org/apache/logging/log4j/LogManager\n\tat
      io.apiman.common.logging.slf4j.Log4j2LoggerFactory.createLogger(Log4j2LoggerFactory.java:35)\n\tat
      io.apiman.gateway.engine.policy.PolicyContextImpl.getLogger(PolicyContextImpl.java:115)\n\tat
      io.apiman.plugins.log_policy.LogHeadersPolicy.doApply(LogHeadersPolicy.java:75)\n\tat
      io.apiman.plugins.log_policy.LogHeadersPolicy.doApply(LogHeadersPolicy.java:36)\n\tat
      io.apiman.gateway.engine.policies.AbstractMappedPolicy.apply(AbstractMappedPolicy.java:70)\n\tat
      io.apiman.gateway.engine.policy.RequestChain.applyPolicy(RequestChain.java:68)\n\tat
      io.apiman.gateway.engine.policy.Chain.doApply(Chain.java:148)\n\tat
      io.apiman.gateway.engine.policies.RateLimitingPolicy$1.handle(RateLimitingPolicy.java:104)\n\tat
      io.apiman.gateway.engine.policies.RateLimitingPolicy$1.handle(RateLimitingPolicy.java:91)\n\tat
      io.apiman.gateway.engine.es.ESRateLimiterComponent.updateBucketAndReturn(ESRateLimiterComponent.java:115)\n\tat
      io.apiman.gateway.engine.es.ESRateLimiterComponent.accept(ESRateLimiterComponent.java:83)\n\tat
      io.apiman.gateway.engine.policies.RateLimitingPolicy.doApply(RateLimitingPolicy.java:91)\n\tat
      io.apiman.gateway.engine.policies.RateLimitingPolicy.doApply(RateLimitingPolicy.java:45)\n\tat
      io.apiman.gateway.engine.policies.AbstractMappedPolicy.apply(AbstractMappedPolicy.java:70)\n\tat
      io.apiman.gateway.engine.policy.RequestChain.applyPolicy(RequestChain.java:68)\n\tat
      io.apiman.gateway.engine.policy.Chain.doApply(Chain.java:148)\n\tat
      io.apiman.gateway.engine.policies.BasicAuthenticationPolicy.doApply(BasicAuthenticationPolicy.java:80)\n\tat
      io.apiman.gateway.engine.policies.BasicAuthenticationPolicy.doApply(BasicAuthenticationPolicy.java:45)\n\tat
      io.apiman.gateway.engine.policies.AbstractMappedPolicy.apply(AbstractMappedPolicy.java:70)\n\tat
      io.apiman.gateway.engine.policy.RequestChain.applyPolicy(RequestChain.java:68)\n\tat
      io.apiman.gateway.engine.policy.Chain.doApply(Chain.java:148)\n\tat
      io.apiman.gateway.engine.impl.ApiRequestExecutorImpl.lambda$execute$4(ApiRequestExecutorImpl.java:271)\n\tat
      io.apiman.gateway.engine.impl.ApiRequestExecutorImpl$$Lambda$110/1594790599.handle(Unknown
      Source)\n\tat io.apiman.gateway.engine.impl.ApiRequestExecutorImpl.lambda$loadPolicies$7(ApiRequestExecutorImpl.java:631)\n\tat
      io.apiman.gateway.engine.impl.ApiRequestExecutorImpl$$Lambda$112/863872294.handle(Unknown
      Source)\n\tat io.apiman.gateway.engine.policy.PolicyFactoryImpl$1.handle(PolicyFactoryImpl.java:192)\n\tat
      io.apiman.gateway.engine.policy.PolicyFactoryImpl$1.handle(PolicyFactoryImpl.java:170)\n\tat
      io.apiman.gateway.engine.impl.DefaultPluginRegistry.lambda$loadPlugin$18(DefaultPluginRegistry.java:185)\n\tat
      io.apiman.gateway.engine.impl.DefaultPluginRegistry$$Lambda$113/366500518.handle(Unknown
      Source)\n\tat io.apiman.gateway.engine.impl.DefaultPluginRegistry.loadPlugin(DefaultPluginRegistry.java:234)\n\tat
      io.apiman.gateway.engine.policy.PolicyFactoryImpl.doLoadFromPlugin(PolicyFactoryImpl.java:170)\n\tat
      io.apiman.gateway.engine.policy.PolicyFactoryImpl.loadPolicy(PolicyFactoryImpl.java:109)\n\tat
      io.apiman.gateway.engine.impl.ApiRequestExecutorImpl.loadPolicies(ApiRequestExecutorImpl.java:603)\n\tat
      io.apiman.gateway.engine.impl.ApiRequestExecutorImpl.lambda$execute$6(ApiRequestExecutorImpl.java:391)\n\tat
      io.apiman.gateway.engine.impl.ApiRequestExecutorImpl$$Lambda$111/1559374006.handle(Unknown
      Source)\n\tat io.apiman.gateway.engine.impl.SecureRegistryWrapper$3.handle(SecureRegistryWrapper.java:172)\n\tat
      io.apiman.gateway.engine.impl.SecureRegistryWrapper$3.handle(SecureRegistryWrapper.java:154)\n\tat
      io.apiman.gateway.engine.es.CachingESRegistry.getContract(CachingESRegistry.java:101)\n\tat
      io.apiman.gateway.engine.impl.SecureRegistryWrapper.getContract(SecureRegistryWrapper.java:154)\n\tat
      io.apiman.gateway.engine.impl.ApiRequestExecutorImpl.execute(ApiRequestExecutorImpl.java:357)\n\tat
      io.apiman.gateway.platforms.servlet.GatewayServlet.doAction(GatewayServlet.java:179)\n\tat
      io.apiman.gateway.platforms.servlet.GatewayServlet.service(GatewayServlet.java:79)\n\tat
      javax.servlet.http.HttpServlet.service(HttpServlet.java:790)\n\tat
      io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)\n\tat
      io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)\n\tat
      io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)\n\tat
      org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)\n\tat
      io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)\n\tat
      io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)\n\tat
      io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)\n\tat
      io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)\n\tat
      io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)\n\tat
      io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)\n\tat
      io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)\n\tat
      io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)\n\tat
      io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)\n\tat
      io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)\n\tat
      io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)\n\tat
      org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)\n\tat
      io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)\n\tat
      io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)\n\tat
      io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:285)\n\tat
      io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:264)\n\tat
      io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)\n\tat
      io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:175)\n\tat
      io.undertow.server.Connectors.executeRootHandler(Connectors.java:202)\n\tat
      io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:792)\n\tat
      java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)\n\tat
      java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)\n\tat
      java.lang.Thread.run(Thread.java:745)\nCaused by:
      java.lang.ClassNotFoundException: org.apache.logging.log4j.LogManager
      from [Module \"deployment.apiman-gateway.war:main\" from Service
      Module Loader]\n\tat
      org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:198)\n\tat
      org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:363)\n\tat
      org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:351)\n\tat
      org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:93)\n\t...
      70 more\n"}
      

      Attachments

        Activity

          People

            msavy_jira Marc Savy (Inactive)
            ewittman@redhat.com Eric Wittmann
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: