Uploaded image for project: 'RAML Module Builder'
  1. RAML Module Builder
  2. RMB-656

NPE at startup when an OPTIONS endpoint is defined in RAML

    XMLWordPrintable

Details

    • Standard Bug Write-Up Format
    • CP: sprint 91, CP: sprint 92
    • 1
    • Core: Platform
    • Q3 2020

    Description

      Overview:
      When defining an options endpoint in RAML, everything seems fine at build time, but a NullPointerException is thrown when deploying the verticle.

      Steps to Reproduce:

      1. Use options methed in your RAML
      2. Generate sources
      3. Add implementation and build
      4. Deploy the verticle

      Expected Results:
      The module should start as usual

      Actual Results:
      A NullPointerException is thrown.

      Additional Information:
      RAML snippet:

      ...elided...
        /login:
          options:
            description: "Preflight CORS for /saml/login"
            responses:
              200:
                description: "Return with appropriate CORS headers"
      ...elided...
      

      Stack trace:

      java.lang.NullPointerException
      	at org.folio.rest.MappedClasses.addPath(MappedClasses.java:28)
      	at org.folio.rest.RestVerticle.lambda$15(RestVerticle.java:990)
      	at java.lang.Iterable.forEach(Iterable.java:75)
      	at org.folio.rest.RestVerticle.lambda$14(RestVerticle.java:986)
      	at java.util.LinkedHashMap$LinkedKeySet.forEach(LinkedHashMap.java:559)
      	at org.folio.rest.RestVerticle.lambda$13(RestVerticle.java:983)
      	at java.util.LinkedHashMap$LinkedKeySet.forEach(LinkedHashMap.java:559)
      	at org.folio.rest.RestVerticle.populateConfig(RestVerticle.java:978)
      	at org.folio.rest.RestVerticle.start(RestVerticle.java:219)
      	at io.vertx.core.impl.DeploymentManager.lambda$doDeploy$9(DeploymentManager.java:556)
      	at io.vertx.core.impl.ContextImpl.executeTask(ContextImpl.java:366)
      	at io.vertx.core.impl.EventLoopContext.lambda$executeAsync$0(EventLoopContext.java:38)
      	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)
      	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472)
      	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500)
      	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
      	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
      	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
      	at java.lang.Thread.run(Thread.java:748)
      
      

      TestRail: Results

        Attachments

          Issue Links

            Activity

              People

                julianladisch Julian Ladisch
                cmcnally Craig McNally
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  TestRail: Runs

                    TestRail: Cases