[ 
https://issues.apache.org/jira/browse/SCB-1030?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16695502#comment-16695502
 ] 

ASF GitHub Bot commented on SCB-1030:
-------------------------------------

laijianbin closed pull request #996: 【SCB-1030】NPE when use 
DynamicSchemaLoader.registerSchemas(String, St…
URL: https://github.com/apache/servicecomb-java-chassis/pull/996
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/common/common-rest/src/main/java/org/apache/servicecomb/common/rest/locator/ServicePathManager.java
 
b/common/common-rest/src/main/java/org/apache/servicecomb/common/rest/locator/ServicePathManager.java
index 932a81be8..11b6c3f7c 100644
--- 
a/common/common-rest/src/main/java/org/apache/servicecomb/common/rest/locator/ServicePathManager.java
+++ 
b/common/common-rest/src/main/java/org/apache/servicecomb/common/rest/locator/ServicePathManager.java
@@ -96,6 +96,7 @@ public void addSchema(SchemaMeta schemaMeta) {
 
   public ServicePathManager cloneServicePathManager() {
     ServicePathManager mgr = new ServicePathManager(microserviceMeta);
+    mgr.buildProducerPaths();
     swaggerPaths.cloneTo(mgr.swaggerPaths);
     mgr.schemaIdSet.addAll(schemaIdSet);
     return mgr;


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> NPE when use DynamicSchemaLoader.registerSchemas(String, String)
> ----------------------------------------------------------------
>
>                 Key: SCB-1030
>                 URL: https://issues.apache.org/jira/browse/SCB-1030
>             Project: Apache ServiceComb
>          Issue Type: Task
>            Reporter: laijianbin
>            Assignee: laijianbin
>            Priority: Major
>         Attachments: image-2018-11-19-15-23-58-612.png
>
>
> 2018-11-19 11:46:14,758 [ERROR] http server failed. 
> org.apache.servicecomb.transport.rest.vertx.VertxRestDispatcher.failureHandler(VertxRestDispatcher.java:72)
> java.lang.NullPointerException
>  at 
> org.apache.servicecomb.common.rest.locator.OperationLocator.locate(OperationLocator.java:56)
>  at 
> org.apache.servicecomb.common.rest.locator.ServicePathManager.producerLocateOperation(ServicePathManager.java:116)
>  at 
> org.apache.servicecomb.common.rest.RestProducerInvocation.locateOperation(RestProducerInvocation.java:61)
>  at 
> org.apache.servicecomb.common.rest.AbstractRestInvocation.findRestOperation(AbstractRestInvocation.java:80)
>  at 
> org.apache.servicecomb.common.rest.RestProducerInvocation.findRestOperation(RestProducerInvocation.java:56)
>  at 
> org.apache.servicecomb.common.rest.RestProducerInvocation.invoke(RestProducerInvocation.java:45)
>  at 
> org.apache.servicecomb.transport.rest.vertx.VertxRestDispatcher.onRequest(VertxRestDispatcher.java:194)
>  at io.vertx.ext.web.impl.RouteImpl.handleContext(RouteImpl.java:223)
>  at 
> io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:101)
>  at io.vertx.ext.web.impl.RoutingContextImpl.next(RoutingContextImpl.java:120)
>  at 
> org.apache.servicecomb.transport.rest.vertx.RestBodyHandler$BHandler.doEnd(RestBodyHandler.java:248)
>  at 
> org.apache.servicecomb.transport.rest.vertx.RestBodyHandler$BHandler.end(RestBodyHandler.java:226)
>  at 
> org.apache.servicecomb.transport.rest.vertx.RestBodyHandler.lambda$0(RestBodyHandler.java:86)
>  at 
> io.vertx.core.http.impl.HttpServerRequestImpl.handleEnd(HttpServerRequestImpl.java:418)
>  at 
> io.vertx.core.http.impl.ServerConnection.handleLastHttpContent(ServerConnection.java:475)
>  at 
> io.vertx.core.http.impl.ServerConnection.processMessage(ServerConnection.java:446)
>  at 
> io.vertx.core.http.impl.ServerConnection.handleMessage(ServerConnection.java:156)
>  at 
> io.vertx.core.http.impl.HttpServerImpl$ServerHandlerWithWebSockets.handleMessage(HttpServerImpl.java:705)
>  at 
> io.vertx.core.http.impl.HttpServerImpl$ServerHandlerWithWebSockets.handleMessage(HttpServerImpl.java:614)
>  at 
> io.vertx.core.net.impl.VertxHandler.lambda$channelRead$1(VertxHandler.java:150)
>  at io.vertx.core.impl.ContextImpl.lambda$wrapTask$2(ContextImpl.java:342)
>  at io.vertx.core.impl.ContextImpl.executeFromIO(ContextImpl.java:200)
>  at io.vertx.core.net.impl.VertxHandler.channelRead(VertxHandler.java:148)
>  at 
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
>  at 
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
>  at 
> io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
>  at 
> io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286)
>  at 
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
>  at 
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
>  at 
> io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
>  at 
> io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310)
>  at 
> io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284)
>  at 
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
>  at 
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
>  at 
> io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
>  at io.vertx.core.http.impl.Http1xOrH2CHandler.end(Http1xOrH2CHandler.java:49)
>  at 
> io.vertx.core.http.impl.Http1xOrH2CHandler.channelRead(Http1xOrH2CHandler.java:27)
>  at 
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
>  at 
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
>  at 
> io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
>  at 
> io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286)
>  at 
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
>  at 
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
>  at 
> io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
>  at 
> io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434)
>  at 
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
>  at 
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
>  at 
> io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965)
>  at 
> io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
>  at 
> io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:645)
>  at 
> io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:580)
>  at 
> io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:497)
>  at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:459)
>  at 
> io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
>  at 
> io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
>  at java.lang.Thread.run(Thread.java:745)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to