Uploaded image for project: 'netconf'
  1. netconf
  2. NETCONF-1254

OpenAPI: netopeer2 duplicated mapping key

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Medium Medium
    • 7.0.2
    • 7.0.0
    • restconf-openapi

      When loading netopeer2 models in restconf OpenAPI we get exception in karaf.log:

      08:35:25.034 ERROR [qtp148896485-547] An I/O error has occurred while writing a response message entity to the container output stream.
      org.glassfish.jersey.server.internal.process.MappableException: java.lang.NullPointerException: Cannot invoke "org.opendaylight.yangtools.yang.model.util.SchemaInferenceStack.resolveLeafref(org.opendaylight.yangtools.yang.model.api.type.LeafrefTypeDefinition)" because "stack" is null
              at org.glassfish.jersey.server.internal.MappableExceptionWrapperInterceptor.aroundWriteTo(MappableExceptionWrapperInterceptor.java:67) ~[?:?]
              at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:139) ~[?:?]
              at org.glassfish.jersey.message.internal.MessageBodyFactory.writeTo(MessageBodyFactory.java:1116) ~[?:?]
              at org.glassfish.jersey.server.ServerRuntime$Responder.writeResponse(ServerRuntime.java:649) ~[?:?]
              at org.glassfish.jersey.server.ServerRuntime$Responder.processResponse(ServerRuntime.java:380) ~[?:?]
              at org.glassfish.jersey.server.ServerRuntime$Responder.process(ServerRuntime.java:370) ~[?:?]
              at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:259) ~[?:?]
              at org.glassfish.jersey.internal.Errors$1.call(Errors.java:248) ~[?:?]
              at org.glassfish.jersey.internal.Errors$1.call(Errors.java:244) ~[?:?]
              at org.glassfish.jersey.internal.Errors.process(Errors.java:292) ~[?:?]
              at org.glassfish.jersey.internal.Errors.process(Errors.java:274) ~[?:?]
              at org.glassfish.jersey.internal.Errors.process(Errors.java:244) ~[?:?]
              at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:265) ~[?:?]
              at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:235) ~[?:?]
              at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:684) ~[?:?]
              at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:394) ~[?:?]
              at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:346) ~[?:?]
              at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:358) ~[?:?]
              at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:311) ~[?:?]
              at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:205) ~[?:?]
              at org.ops4j.pax.web.service.spi.servlet.OsgiInitializedServlet.service(OsgiInitializedServlet.java:102) ~[bundleFile:?]
              at org.eclipse.jetty.servlet.ServletHolder$NotAsync.service(ServletHolder.java:1459) ~[bundleFile:9.4.52.v20230823]
              at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799) ~[bundleFile:9.4.52.v20230823]
              at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1656) ~[bundleFile:9.4.52.v20230823]
              at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61) ~[?:?]
              at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108) ~[?:?]
              at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137) ~[?:?]
              at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:154) ~[?:?]
              at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66) ~[?:?]
              at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108) ~[?:?]
              at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137) ~[?:?]
              at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:154) ~[?:?]
              at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66) ~[?:?]
              at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:458) ~[?:?]
              at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:373) ~[?:?]
              at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) ~[?:?]
              at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) ~[?:?]
              at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:387) ~[?:?]
              at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:370) ~[?:?]
              at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:154) ~[?:?]
              at org.ops4j.pax.web.service.spi.servlet.OsgiInitializedFilter.doFilter(OsgiInitializedFilter.java:176) ~[bundleFile:?]
              at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:201) ~[bundleFile:9.4.52.v20230823]
              at org.ops4j.pax.web.service.jetty.internal.PaxWebFilterHolder.doFilter(PaxWebFilterHolder.java:208) ~[bundleFile:?]
              at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1626) ~[bundleFile:9.4.52.v20230823]
              at org.ops4j.pax.web.service.spi.servlet.OsgiFilterChain.doFilter(OsgiFilterChain.java:100) ~[bundleFile:?]
              at org.ops4j.pax.web.service.jetty.internal.PaxWebServletHandler.doHandle(PaxWebServletHandler.java:320) ~[bundleFile:?]
              at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) ~[bundleFile:9.4.52.v20230823]
              at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:600) ~[bundleFile:9.4.52.v20230823]
              at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[bundleFile:9.4.52.v20230823]
              at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235) ~[bundleFile:9.4.52.v20230823]
              at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624) ~[bundleFile:9.4.52.v20230823]
              at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) ~[bundleFile:9.4.52.v20230823]
              at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1440) ~[bundleFile:9.4.52.v20230823]
              at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188) ~[bundleFile:9.4.52.v20230823]
              at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:505) ~[bundleFile:9.4.52.v20230823]
              at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594) ~[bundleFile:9.4.52.v20230823]
              at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186) ~[bundleFile:9.4.52.v20230823]
              at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1355) ~[bundleFile:9.4.52.v20230823]
              at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) ~[bundleFile:9.4.52.v20230823]
              at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:234) ~[bundleFile:9.4.52.v20230823]
              at org.ops4j.pax.web.service.jetty.internal.PrioritizedHandlerCollection.handle(PrioritizedHandlerCollection.java:96) ~[bundleFile:?]
              at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[bundleFile:9.4.52.v20230823]
              at org.eclipse.jetty.server.Server.handle(Server.java:516) ~[bundleFile:9.4.52.v20230823]
              at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487) ~[bundleFile:9.4.52.v20230823]
              at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732) [bundleFile:9.4.52.v20230823]
              at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479) [bundleFile:9.4.52.v20230823]
              at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277) [bundleFile:9.4.52.v20230823]
              at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) [bundleFile:9.4.52.v20230823]
              at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105) [bundleFile:9.4.52.v20230823]
              at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104) [bundleFile:9.4.52.v20230823]
              at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338) [bundleFile:9.4.52.v20230823]
              at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315) [bundleFile:9.4.52.v20230823]
              at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173) [bundleFile:9.4.52.v20230823]
              at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131) [bundleFile:9.4.52.v20230823]
              at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:409) [bundleFile:9.4.52.v20230823]
              at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883) [bundleFile:9.4.52.v20230823]
              at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034) [bundleFile:9.4.52.v20230823]
              at java.lang.Thread.run(Thread.java:840) [?:?]
      Caused by: java.lang.NullPointerException: Cannot invoke "org.opendaylight.yangtools.yang.model.util.SchemaInferenceStack.resolveLeafref(org.opendaylight.yangtools.yang.model.api.type.LeafrefTypeDefinition)" because "stack" is null
              at org.opendaylight.restconf.openapi.model.PropertyEntity.processTypeDef(PropertyEntity.java:416) ~[bundleFile:?]
              at org.opendaylight.restconf.openapi.model.PropertyEntity.prepareFirstListExample(PropertyEntity.java:268) ~[bundleFile:?]
              at org.opendaylight.restconf.openapi.model.PropertyEntity.createExamples(PropertyEntity.java:225) ~[bundleFile:?]
              at org.opendaylight.restconf.openapi.model.PropertyEntity.processRef(PropertyEntity.java:207) ~[bundleFile:?]
              at org.opendaylight.restconf.openapi.model.PropertyEntity.processDataNodeContainer(PropertyEntity.java:191) ~[bundleFile:?]
              at org.opendaylight.restconf.openapi.model.PropertyEntity.processChildNode(PropertyEntity.java:156) ~[bundleFile:?]
              at org.opendaylight.restconf.openapi.model.PropertyEntity.generate(PropertyEntity.java:122) ~[bundleFile:?]
              at org.opendaylight.restconf.openapi.model.PropertyEntity.<init>(PropertyEntity.java:111) ~[bundleFile:?]
              at org.opendaylight.restconf.openapi.model.SchemaEntity.generateProperties(SchemaEntity.java:115) ~[bundleFile:?]
              at org.opendaylight.restconf.openapi.model.SchemaEntity.generate(SchemaEntity.java:68) ~[bundleFile:?]
              at org.opendaylight.restconf.openapi.jaxrs.OpenApiBodyWriter.writeTo(OpenApiBodyWriter.java:47) ~[bundleFile:?]
              at org.opendaylight.restconf.openapi.impl.SchemaStream.writeNextEntity(SchemaStream.java:82) ~[bundleFile:?]
              at org.opendaylight.restconf.openapi.impl.SchemaStream.read(SchemaStream.java:74) ~[bundleFile:?]
              at java.nio.channels.Channels$ReadableByteChannelImpl.read(Channels.java:387) ~[?:?]
              at org.opendaylight.restconf.openapi.impl.SchemasStream.read(SchemasStream.java:109) ~[bundleFile:?]
              at java.nio.channels.Channels$ReadableByteChannelImpl.read(Channels.java:387) ~[?:?]
              at org.opendaylight.restconf.openapi.impl.ComponentsStream.read(ComponentsStream.java:98) ~[bundleFile:?]
              at java.nio.channels.Channels$ReadableByteChannelImpl.read(Channels.java:387) ~[?:?]
              at org.opendaylight.restconf.openapi.impl.OpenApiInputStream.read(OpenApiInputStream.java:104) ~[bundleFile:?]
              at java.io.InputStream.read(InputStream.java:218) ~[?:?]
              at org.glassfish.jersey.message.internal.ReaderWriter.writeTo(ReaderWriter.java:98) ~[?:?]
              at org.glassfish.jersey.message.internal.InputStreamProvider.writeTo(InputStreamProvider.java:82) ~[?:?]
              at org.glassfish.jersey.message.internal.InputStreamProvider.writeTo(InputStreamProvider.java:37) ~[?:?]
              at org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.invokeWriteTo(WriterInterceptorExecutor.java:242) ~[?:?]
              at org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.aroundWriteTo(WriterInterceptorExecutor.java:227) ~[?:?]
              at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:139) ~[?:?]
              at org.glassfish.jersey.server.internal.JsonWithPaddingInterceptor.aroundWriteTo(JsonWithPaddingInterceptor.java:85) ~[?:?]
              at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:139) ~[?:?]
              at org.glassfish.jersey.server.internal.MappableExceptionWrapperInterceptor.aroundWriteTo(MappableExceptionWrapperInterceptor.java:61) ~[?:?]
              ... 77 more

      And in the browser we see following error message:

            cicut Ľuboš Čičut
            ivanhrasko Ivan Hrasko
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: