Uploaded image for project: 'Quarkus'
  1. Quarkus
  2. QUARKUS-3854

OpenAPIHolderImpl.resolveExternalRef IllegalStateException: Recursive update

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • 3.y-Jumanji.GA
    • 3.2.9.GA
    • team/eng, vertx
    • None
    • False
    • None
    • False
    • Hide

      Given:

      1) main/resources/my.yaml

      2) OpenAPIRouter.java

      public class OpenAPIRouter {

        private static final String SPEC_URL = "my.yaml";

        @Inject
        Logger logger;

        @Inject
        Vertx vertx;

        void init(@Observes final Router router)

      {       logger.info("init(router)");       RouterBuilder.createAndAwait(vertx, SPEC_URL);   }

      }

      3)     <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-resteasy-reactive-jackson</artifactId>
          </dependency>

       

      Show
      Given: 1) main/resources/my.yaml 2) OpenAPIRouter.java public class OpenAPIRouter {   private static final String SPEC_URL = "my.yaml";   @Inject   Logger logger;   @Inject   Vertx vertx;   void init(@Observes final Router router) {       logger.info("init(router)");       RouterBuilder.createAndAwait(vertx, SPEC_URL);   } } 3)     <dependency>       <groupId>io.quarkus</groupId>       <artifactId>quarkus-resteasy-reactive-jackson</artifactId>     </dependency>  
    • ---

      The following exception on RHEL 9.3 with quarkus-resteasy-reactive-jackson. The issue does not happen on RHEL8 or when replacing quarkus-resteasy-reactive-jackson with quarkus-vertx.
       
      ```
      java -jar runner.jar
      __  ____  __  _____   ___  __ ____  ______
       --/ __ \/ / / / _ | / _ \/ //_/ / / / __/
       -/ // / // / __ |/ , / ,< / // /\ \
      --_{}_{}{}// |//|//||{}{}/{}_/
      2023-10-18 17:39:39,516 INFO  [org.acm.OpenAPIRouter] (main) init(router)
      2023-10-18 17:39:42,176 ERROR [io.qua.run.Application] (main) Failed to start application (with profile [prod]): java.lang.RuntimeException: Failed to start quarkus
              at io.quarkus.runner.ApplicationImpl.doStart(Unknown Source)
              at io.quarkus.runtime.Application.start(Application.java:101)
              at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:111)
              at io.quarkus.runtime.Quarkus.run(Quarkus.java:71)
              at io.quarkus.runtime.Quarkus.run(Quarkus.java:44)
              at io.quarkus.runtime.Quarkus.run(Quarkus.java:124)
              at io.quarkus.runner.GeneratedMain.main(Unknown Source)
      Caused by: io.vertx.ext.web.openapi.RouterBuilderException: Cannot load the spec in path my.yaml
              at io.vertx.ext.web.openapi.RouterBuilderException.createInvalidSpecFile(RouterBuilderException.java:50)
              at io.vertx.ext.web.openapi.RouterBuilder.lambda$create$0(RouterBuilder.java:243)
              at io.vertx.core.impl.future.FutureImpl$3.onFailure(FutureImpl.java:153)
              at io.vertx.core.impl.future.FutureBase.emitFailure(FutureBase.java:75)
              at io.vertx.core.impl.future.FutureImpl.tryFail(FutureImpl.java:230)
              at io.vertx.core.impl.future.Composition$1.onFailure(Composition.java:66)
              at io.vertx.core.impl.future.FutureBase.emitFailure(FutureBase.java:75)
              at io.vertx.core.impl.future.FailedFuture.addListener(FailedFuture.java:98)
              at io.vertx.core.impl.future.Composition.onFailure(Composition.java:55)
              at io.vertx.core.impl.future.FutureBase.emitFailure(FutureBase.java:75)
              at io.vertx.core.impl.future.FutureImpl.tryFail(FutureImpl.java:230)
              at io.vertx.core.impl.future.Composition$1.onFailure(Composition.java:66)
              at io.vertx.core.impl.future.FutureBase.emitFailure(FutureBase.java:75)
              at io.vertx.core.impl.future.FutureImpl.addListener(FutureImpl.java:191)
              at io.vertx.core.impl.future.Composition.onSuccess(Composition.java:43)
              at io.vertx.core.impl.future.FutureImpl$ListenerArray.onSuccess(FutureImpl.java:262)
              at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:60)
              at io.vertx.core.impl.future.FutureImpl.tryComplete(FutureImpl.java:211)
              at io.vertx.core.impl.future.Composition$1.onSuccess(Composition.java:62)
              at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:60)
              at io.vertx.core.impl.future.SucceededFuture.addListener(SucceededFuture.java:88)
              at io.vertx.core.impl.future.Composition.onSuccess(Composition.java:43)
              at io.vertx.core.impl.future.FutureBase.lambda$emitSuccess$0(FutureBase.java:54)
              at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:173)
              at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:166)
              at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)
              at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569)
              at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
              at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
              at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
              at java.base/java.lang.Thread.run(Thread.java:833)
      Caused by: java.lang.IllegalStateException: Recursive update
              at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1763)
              at io.vertx.ext.web.openapi.impl.OpenAPIHolderImpl.resolveExternalRef(OpenAPIHolderImpl.java:266)
              at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
              at java.base/java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1707)
              at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
              at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
              at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
              at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
              at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
              at io.vertx.ext.web.openapi.impl.OpenAPIHolderImpl.walkAndSolve(OpenAPIHolderImpl.java:207)
              at io.vertx.ext.web.openapi.impl.OpenAPIHolderImpl.lambda$null$5(OpenAPIHolderImpl.java:271)
              at io.vertx.core.impl.future.Composition.onSuccess(Composition.java:38)
              at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:60)
              at io.vertx.core.impl.future.FutureImpl.addListener(FutureImpl.java:196)
              at io.vertx.core.impl.future.FutureBase.compose(FutureBase.java:84)
              at io.vertx.core.Future.compose(Future.java:360)
              at io.vertx.ext.web.openapi.impl.OpenAPIHolderImpl.lambda$resolveExternalRef$6(OpenAPIHolderImpl.java:269)
              at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1708)
              at io.vertx.ext.web.openapi.impl.OpenAPIHolderImpl.resolveExternalRef(OpenAPIHolderImpl.java:266)
              at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
              at java.base/java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1707)
              at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
              at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
              at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
              at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
              at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
              at io.vertx.ext.web.openapi.impl.OpenAPIHolderImpl.walkAndSolve(OpenAPIHolderImpl.java:207)
              at io.vertx.ext.web.openapi.impl.OpenAPIHolderImpl.lambda$null$5(OpenAPIHolderImpl.java:271)
              at io.vertx.core.impl.future.Composition.onSuccess(Composition.java:38)
              at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:60)
              at io.vertx.core.impl.future.FutureImpl.addListener(FutureImpl.java:196)
              at io.vertx.core.impl.future.FutureBase.compose(FutureBase.java:84)
              at io.vertx.core.Future.compose(Future.java:360)
              at io.vertx.ext.web.openapi.impl.OpenAPIHolderImpl.lambda$resolveExternalRef$6(OpenAPIHolderImpl.java:269)
              at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1708)
              at io.vertx.ext.web.openapi.impl.OpenAPIHolderImpl.resolveExternalRef(OpenAPIHolderImpl.java:266)
              at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
              at java.base/java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1707)
              at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
              at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
              at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
              at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
              at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
              at io.vertx.ext.web.openapi.impl.OpenAPIHolderImpl.walkAndSolve(OpenAPIHolderImpl.java:207)
              at io.vertx.ext.web.openapi.impl.OpenAPIHolderImpl.lambda$null$5(OpenAPIHolderImpl.java:271)
              at io.vertx.core.impl.future.Composition.onSuccess(Composition.java:38)
              at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:60)
              at io.vertx.core.impl.future.FutureImpl.addListener(FutureImpl.java:196)
              at io.vertx.core.impl.future.FutureBase.compose(FutureBase.java:84)
              at io.vertx.core.Future.compose(Future.java:360)
              at io.vertx.ext.web.openapi.impl.OpenAPIHolderImpl.lambda$resolveExternalRef$6(OpenAPIHolderImpl.java:269)
              at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1708)
              at io.vertx.ext.web.openapi.impl.OpenAPIHolderImpl.resolveExternalRef(OpenAPIHolderImpl.java:266)
              at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
              at java.base/java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1707)
              at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
              at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
              at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
              at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
              at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
              at io.vertx.ext.web.openapi.impl.OpenAPIHolderImpl.walkAndSolve(OpenAPIHolderImpl.java:207)
              at io.vertx.ext.web.openapi.impl.OpenAPIHolderImpl.lambda$loadOpenAPI$1(OpenAPIHolderImpl.java:82)
              at io.vertx.core.impl.future.Composition.onSuccess(Composition.java:38)
              ... 16 more

      ```

              cescoffi@redhat.com Clement Escoffier
              rhn-support-mmillson Michael Millson
              Votes:
              1 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated: