New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[gateway] NullPointerException when no underlying invoker is available #287

Closed
brasseld opened this Issue Oct 27, 2016 · 0 comments

Comments

Projects
None yet
2 participants
@brasseld
Member

brasseld commented Oct 27, 2016

This issue occurs when the HTTP invoker is not able to select an endpoint according to the target URI or if no endpoint is available (DOWN state because of health-check).

13:34:43.176 [vert.x-eventloop-thread-0] DEBUG i.g.g.handlers.api.ApiReactorHandler - Remote API invocation took 12 ms [request=203516f3-bf90-4bed-b516-f3bf90bbeddd]
13:34:43.178 [vert.x-eventloop-thread-0] ERROR i.g.g.policy.impl.RequestPolicyChain - Unexpected error while running policy io.gravitee.gateway.policy.impl.PolicyImpl@662d64ca
java.lang.reflect.InvocationTargetException: null
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at io.gravitee.gateway.policy.impl.PolicyImpl.invoke(PolicyImpl.java:89)
    at io.gravitee.gateway.policy.impl.PolicyImpl.onRequest(PolicyImpl.java:45)
    at io.gravitee.gateway.policy.impl.RequestPolicyChain.execute(RequestPolicyChain.java:40)
    at io.gravitee.gateway.policy.impl.PolicyChain.doNext(PolicyChain.java:65)
    at io.gravitee.gateway.policy.impl.StreamablePolicyChain.doNext(StreamablePolicyChain.java:51)
    at io.gravitee.gateway.handlers.api.policy.RequestPolicyChainProcessor.execute(RequestPolicyChainProcessor.java:60)
    at io.gravitee.gateway.handlers.api.ApiReactorHandler.doHandle(ApiReactorHandler.java:156)
    at io.gravitee.gateway.reactor.handler.AbstractReactorHandler.handle(AbstractReactorHandler.java:93)
    at io.gravitee.gateway.reactor.impl.DefaultReactor.route(DefaultReactor.java:77)
    at io.gravitee.gateway.standalone.vertx.VertxReactorHandler.handleRequest(VertxReactorHandler.java:39)
    at io.gravitee.gateway.standalone.vertx.VertxReactorHandler.handle(VertxReactorHandler.java:35)
    at io.gravitee.gateway.standalone.vertx.VertxReactorHandler.handle(VertxReactorHandler.java:25)
    at io.vertx.core.http.impl.ServerConnection.handleRequest(ServerConnection.java:286)
    at io.vertx.core.http.impl.ServerConnection.processMessage(ServerConnection.java:412)
    at io.vertx.core.http.impl.ServerConnection.handleMessage(ServerConnection.java:139)
    at io.vertx.core.http.impl.HttpServerImpl$ServerHandler.lambda$createConnAndHandle$1(HttpServerImpl.java:712)
    at io.vertx.core.impl.ContextImpl.lambda$wrapTask$2(ContextImpl.java:314)
    at io.vertx.core.impl.ContextImpl.executeFromIO(ContextImpl.java:190)
    at io.vertx.core.http.impl.HttpServerImpl$ServerHandler.createConnAndHandle(HttpServerImpl.java:706)
    at io.vertx.core.http.impl.HttpServerImpl$ServerHandler.doMessageReceived(HttpServerImpl.java:570)
    at io.vertx.core.http.impl.HttpServerImpl$ServerHandler.doMessageReceived(HttpServerImpl.java:522)
    at io.vertx.core.http.impl.VertxHttpHandler.channelRead(VertxHttpHandler.java:76)
    at io.vertx.core.net.impl.VertxHandler.channelRead(VertxHandler.java:122)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:372)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:358)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:350)
    at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:293)
    at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:267)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:372)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:358)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:350)
    at io.vertx.core.http.impl.HttpServerImpl$Http1xOrHttp2Handler.http1(HttpServerImpl.java:1019)
    at io.vertx.core.http.impl.HttpServerImpl$Http1xOrHttp2Handler.channelRead(HttpServerImpl.java:990)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:372)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:358)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:350)
    at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:372)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:358)
    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926)
    at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:129)
    at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:610)
    at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:551)
    at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:465)
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:437)
    at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:873)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException: null
    at io.gravitee.gateway.handlers.api.ApiReactorHandler.lambda$doHandle$7(ApiReactorHandler.java:140)
    at io.gravitee.gateway.handlers.api.policy.RequestPolicyChainProcessor.execute(RequestPolicyChainProcessor.java:62)
    at io.gravitee.gateway.handlers.api.policy.RequestPolicyChainProcessor.lambda$execute$0(RequestPolicyChainProcessor.java:55)
    at io.gravitee.gateway.handlers.api.policy.NoOpPolicyChain.doNext(NoOpPolicyChain.java:42)
    at io.gravitee.gateway.handlers.api.policy.RequestPolicyChainProcessor.execute(RequestPolicyChainProcessor.java:60)
    at io.gravitee.gateway.handlers.api.policy.RequestPolicyChainProcessor.lambda$execute$0(RequestPolicyChainProcessor.java:55)
    at io.gravitee.gateway.handlers.api.policy.NoOpPolicyChain.doNext(NoOpPolicyChain.java:42)
    at io.gravitee.gateway.handlers.api.policy.RequestPolicyChainProcessor.execute(RequestPolicyChainProcessor.java:60)
    at io.gravitee.gateway.handlers.api.policy.RequestPolicyChainProcessor.lambda$execute$0(RequestPolicyChainProcessor.java:55)
    at io.gravitee.gateway.policy.impl.PolicyChain.doNext(PolicyChain.java:74)
    at io.gravitee.gateway.policy.impl.StreamablePolicyChain.doNext(StreamablePolicyChain.java:51)
    at io.gravitee.gateway.standalone.policy.apikey.DummyApiKeyPolicy.onRequest(DummyApiKeyPolicy.java:31)
    ... 51 common frames omitted

@brasseld brasseld added the type: bug label Oct 27, 2016

brasseld added a commit to gravitee-io/gravitee-gateway that referenced this issue Oct 27, 2016

@brasseld brasseld self-assigned this Oct 27, 2016

@brasseld brasseld added this to the 1.0.1 milestone Oct 27, 2016

NicolasGeraud added a commit to gravitee-io/gravitee-gateway that referenced this issue Oct 27, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment