You are just *slightly* off in your apiman.properties configuration!
And it's understandable, as you'll see shortly. :)
You have modified "apiman-gateway.logger-factory" to have the following
value:
io.apiman.common.logging.log4j2.Log4j2LoggerFactory
But instead it should be this:
io.apiman.common.logging.slf4j.Log4j2LoggerFactory
-Eric
On 6/22/2016 7:40 PM, ejlp ejlp wrote:
Hi,
I was trying to use Log Header policy but no logging message shown in
Gatway's console or server.log.
I am using JBoss EAP 7.0 and Apiman 1.2.6.Final
This is what I've done in Gateway node:
* Use extracted war of apiman-gateway-api.war and apiman-gateway.war
* Put apiman-common-logging-log4j2-1.2.6.Final.jar into
<JBOSS_HOME>/standalone/deployment/apiman-gateway-api.war/WEB-INF/lib/
and <JBOSS_HOME>/standalone/deployment/apiman-gateway.war/WEB-INF/lib/
* Remove following line from apiman.properties
apiman-gateway.logger-factory=io.apiman.common.logging.impl.NoOpLoggerFactory
and put this line:
apiman-gateway.logger-factory=io.apiman.common.logging.log4j2.Log4j2LoggerFactory
* Restart JBoss EAP
I got following stacktrace when EAP started:
05:58:00,693 ERROR [org.jboss.msc.service.fail] (ServerService Thread
Pool -- 64) MSC000001: Failed to start service
jboss.undertow.deployment.default-server.default-host./apiman-gateway-api:
org.jboss.msc.service.StartException in service
jboss.undertow.deployment.default-server.default-host./apiman-gateway-api:
java.lang.RuntimeException: java.lang.RuntimeException:
java.lang.NullPointerException
at
org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:85)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
at org.jboss.threads.JBossThread.run(JBossThread.java:320)
Caused by: java.lang.RuntimeException: java.lang.RuntimeException:
java.lang.NullPointerException
at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:231)
at
org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:100)
at
org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:82)
... 6 more
Caused by: java.lang.RuntimeException: java.lang.NullPointerException
at
io.apiman.gateway.engine.impl.ConfigDrivenEngineFactory.instantiate(ConfigDrivenEngineFactory.java:179)
at
io.apiman.gateway.engine.impl.ConfigDrivenEngineFactory.create(ConfigDrivenEngineFactory.java:163)
at
io.apiman.gateway.engine.impl.ConfigDrivenEngineFactory.createLoggerFactory(ConfigDrivenEngineFactory.java:152)
at
io.apiman.gateway.engine.impl.AbstractEngineFactory.createEngine(AbstractEngineFactory.java:60)
at io.apiman.gateway.platforms.war.WarGateway.init(WarGateway.java:55)
at
io.apiman.gateway.platforms.war.listeners.WarGatewayBootstrapper.contextInitialized(WarGatewayBootstrapper.java:42)
at
io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:187)
at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:198)
... 8 more
Caused by: java.lang.NullPointerException
at
io.apiman.gateway.engine.impl.ConfigDrivenEngineFactory.instantiate(ConfigDrivenEngineFactory.java:175)
... 15 more
05:58:00,695 ERROR [org.jboss.as.controller.management-operation]
(DeploymentScanner-threads - 1) WFLYCTL0013: Operation ("deploy")
failed - address: ([("deployment" => "apiman-gateway-api.war")])
-
failure description: {"WFLYCTL0080: Failed services" =>
{"jboss.undertow.deployment.default-server.default-host./apiman-gateway-api"
=> "org.jboss.msc.service.StartException in service
jboss.undertow.deployment.default-server.default-host./apiman-gateway-api:
java.lang.RuntimeException: java.lang.RuntimeException:
java.lang.NullPointerException
Caused by: java.lang.RuntimeException: java.lang.RuntimeException:
java.lang.NullPointerException
Caused by: java.lang.RuntimeException: java.lang.NullPointerException
Caused by: java.lang.NullPointerException"}}
_______________________________________________
Apiman-user mailing list
Apiman-user(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/apiman-user