Uploaded image for project: 'Undertow'
  1. Undertow
  2. UNDERTOW-1709

NullPointerException when calling the AJP port

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Blocker
    • 2.1.1.Final, 2.0.31.Final
    • None
    • Core
    • None
    • Hide

      1. Enable the AJP listener:

      /subsystem=undertow/server=default-server/ajp-listener=ajp-test:add(socket-binding=ajp)
      

      2. Access the AJP port:

      curl localhost:8009
      

      You should see the ERROR in the server log.
      Note: The request is expected to fail, but there should be no errors, just a BadRequestException at DEBUG level (see JBEAP-10151)

      Show
      1. Enable the AJP listener: /subsystem=undertow/server= default -server/ajp-listener=ajp-test:add(socket-binding=ajp) 2. Access the AJP port: curl localhost:8009 You should see the ERROR in the server log. Note: The request is expected to fail, but there should be no errors, just a BadRequestException at DEBUG level (see JBEAP-10151 )

    Description

      Sending an incorrect AJP request to the AJP listener causes a NPE:

      ERROR [io.undertow.request.io] (default I/O-7) UT005090: Unexpected failure: java.lang.NullPointerException
      	at io.undertow.server.HttpServerExchange.closeAndFlushResponse(HttpServerExchange.java:1716)
      	at io.undertow.server.HttpServerExchange.endExchange(HttpServerExchange.java:1700)
      	at io.undertow.server.protocol.ajp.AjpReadListener.handleEvent(AjpReadListener.java:262)
      	at io.undertow.server.protocol.ajp.AjpOpenListener.handleEvent(AjpOpenListener.java:156)
      	at io.undertow.server.protocol.ajp.AjpOpenListener.handleEvent(AjpOpenListener.java:56)
      	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:134)
      	at org.xnio.nio.WorkerThread.safeRun(WorkerThread.java:612)
      	at org.xnio.nio.WorkerThread.run(WorkerThread.java:479)
      
      

      The getRequestMethod() call in HttpServerExchange returns null .

      This is a regression in Undertow 2.0.30.SP2. Seems to be caused by the fix for JBEAP-19204

      Attachments

        Issue Links

          Activity

            People

              spyrkob Bartosz Spyrko-Smietanko
              flaviarnn Flavia Rainone
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: