Uploaded image for project: 'Thorntail'
  1. Thorntail
  2. THORN-1891

NoClassDefFoundError with microprofile-openapi fraction

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 2018.3.3
    • Fix Version/s: 2018.4.1
    • Component/s: microprofile
    • Labels:
      None

      Description

      Running a Swarm fat jar which includes the microprofile-openapi fraction, I see the following exception when an HTTP request is issued before the app has finished deploying:

      2018-03-12 22:30:54,924 ERROR [io.undertow.request] (default I/O-7) UT005071: Undertow request failed HttpServerExchange{ GET /anyoldurl request {Accept=[*/*], User-Agent=[curl/7.47.0], Host=[localhost:8080]} response {}}: java.lang.NoClassDefFoundError: Could not initialize class org.wildfly.swarm.microprofile.openapi.runtime.OpenApiHttpHandler
              at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
              at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
              at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
              at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
              at org.wildfly.extension.undertow.deployment.ConfiguredHandlerWrapper.wrap(ConfiguredHandlerWrapper.java:56)
              at org.wildfly.extension.undertow.filters.CustomFilterDefinition.createHttpHandler(CustomFilterDefinition.java:93)
              at org.wildfly.extension.undertow.filters.FilterService.createHttpHandler(FilterService.java:57)
              at org.wildfly.extension.undertow.filters.FilterRef.wrap(FilterRef.java:86)
              at org.wildfly.extension.undertow.LocationService.configureHandlerChain(LocationService.java:97)
              at org.wildfly.extension.undertow.Host.configureRootHandler(Host.java:138)
              at org.wildfly.extension.undertow.Host.getOrCreateRootHandler(Host.java:204)
              at org.wildfly.extension.undertow.Host$HostRootHandler.handleRequest(Host.java:345)
              at io.undertow.server.handlers.NameVirtualHostHandler.handleRequest(NameVirtualHostHandler.java:64)
              at io.undertow.server.handlers.error.SimpleErrorPageHandler.handleRequest(SimpleErrorPageHandler.java:78)
              at io.undertow.server.handlers.CanonicalPathHandler.handleRequest(CanonicalPathHandler.java:49)
              at org.wildfly.extension.undertow.Server$DefaultHostHandler.handleRequest(Server.java:189)
              at io.undertow.server.handlers.ChannelUpgradeHandler.handleRequest(ChannelUpgradeHandler.java:211)
              at io.undertow.server.handlers.DisallowedMethodsHandler.handleRequest(DisallowedMethodsHandler.java:61)
              at io.undertow.server.Connectors.executeRootHandler(Connectors.java:326)
              at io.undertow.server.protocol.http.HttpReadListener.handleEventWithNoRunningRequest(HttpReadListener.java:254)
              at io.undertow.server.protocol.http.HttpReadListener.handleEvent(HttpReadListener.java:136)
              at io.undertow.server.protocol.http.HttpOpenListener.handleEvent(HttpOpenListener.java:148)
              at io.undertow.server.protocol.http.HttpOpenListener.handleEvent(HttpOpenListener.java:92)
              at io.undertow.server.protocol.http.HttpOpenListener.handleEvent(HttpOpenListener.java:51)
              at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
              at org.xnio.ChannelListeners$10.handleEvent(ChannelListeners.java:291)
              at org.xnio.ChannelListeners$10.handleEvent(ChannelListeners.java:286)
              at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
              at org.xnio.nio.QueuedNioTcpServer$1.run(QueuedNioTcpServer.java:131)
              at org.xnio.nio.WorkerThread.safeRun(WorkerThread.java:612)
              at org.xnio.nio.WorkerThread.run(WorkerThread.java:479)
      

      The app behaves normally when there is no HTTP request in the startup phase, so this looks like a race condition.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                mkouba Martin Kouba
                Reporter:
                hwellmann.de Harald Wellmann
                Tester:
                Juan Gonzalez
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: