Uploaded image for project: 'Qpid'
  1. Qpid
  2. QPID-7944

[Java Broker] [AMQP1.0] Observing a message with a null object property cause 500 error to be sent to the browser

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • None
    • qpid-java-broker-7.0.0
    • Broker-J
    • None

    Description

      1. Start the Broker
      2. Configured HTTPS
      3. Send an JMS message from Qpid JMS Client with setObjectProperty("mynull", null)
      4. Try to observe the message using Management (using HTTPS).

      The browser receives a 500 and the following is logged.

      2017-10-02 08:53:23,844 ERROR [qtp163439984-248] (o.a.q.s.m.p.f.ExceptionHandlingFilter) - Unexpected exception in servlet '/api/latest/queue/default/default/queue/getMessageContent':
      java.lang.NullPointerException: null
      	at java.util.HashMap.merge(HashMap.java:1224)
      	at java.util.stream.Collectors.lambda$toMap$58(Collectors.java:1320)
      	at java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169)
      	at java.util.Iterator.forEachRemaining(Iterator.java:116)
      	at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
      	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
      	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
      	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
      	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      	at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
      	at org.apache.qpid.server.message.internal.InternalMessageHeader.<init>(InternalMessageHeader.java:94)
      	at org.apache.qpid.server.message.internal.InternalMessage.convert(InternalMessage.java:220)
      	at org.apache.qpid.server.protocol.v1_0.MessageConverter_v1_0_to_Internal.convert(MessageConverter_v1_0_to_Internal.java:69)
      	at org.apache.qpid.server.protocol.v1_0.MessageConverter_v1_0_to_Internal.convert(MessageConverter_v1_0_to_Internal.java:39)
      	at org.apache.qpid.server.queue.AbstractQueue.createMessageContent(AbstractQueue.java:3308)
      	at org.apache.qpid.server.queue.AbstractQueue.getMessageContent(AbstractQueue.java:3281)
      	at org.apache.qpid.server.queue.StandardQueueImplWithAccessChecking.getMessageContent(StandardQueueImplWithAccessChecking.java:102)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.apache.qpid.server.model.ConfiguredObjectMethodOperation.perform(ConfiguredObjectMethodOperation.java:125)
      	at org.apache.qpid.server.management.plugin.servlet.rest.RestServlet.doOperation(RestServlet.java:620)
      	at org.apache.qpid.server.management.plugin.servlet.rest.RestServlet.doGet(RestServlet.java:205)
      	at org.apache.qpid.server.management.plugin.servlet.rest.AbstractServlet.doGet(AbstractServlet.java:122)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
      	at org.apache.qpid.server.management.plugin.servlet.rest.RestServlet.service(RestServlet.java:365)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
      	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:841)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1634)
      	at org.apache.qpid.server.management.plugin.filter.AuthenticationCheckFilter$1.run(AuthenticationCheckFilter.java:157)
      	at org.apache.qpid.server.management.plugin.filter.AuthenticationCheckFilter$1.run(AuthenticationCheckFilter.java:153)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at javax.security.auth.Subject.doAs(Subject.java:422)
      	at org.apache.qpid.server.management.plugin.filter.AuthenticationCheckFilter.doFilterChainAs(AuthenticationCheckFilter.java:152)
      	at org.apache.qpid.server.management.plugin.filter.AuthenticationCheckFilter.doFilter(AuthenticationCheckFilter.java:122)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1621)
      	at org.apache.qpid.server.management.plugin.filter.LoggingFilter.doFilter(LoggingFilter.java:63)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1621)
      	at org.apache.qpid.server.management.plugin.filter.ForbiddingTraceFilter.doFilter(ForbiddingTraceFilter.java:65)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1621)
      	at org.eclipse.jetty.servlets.CrossOriginFilter.handle(CrossOriginFilter.java:308)
      	at org.eclipse.jetty.servlets.CrossOriginFilter.doFilter(CrossOriginFilter.java:262)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1621)
      	at org.apache.qpid.server.management.plugin.filter.ExceptionHandlingFilter.doFilter(ExceptionHandlingFilter.java:59)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1621)
      	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:541)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
      	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1593)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
      	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1239)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)
      	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:481)
      	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1562)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)
      	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1141)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
      	at org.eclipse.jetty.server.Server.handle(Server.java:564)
      	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320)
      	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
      	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
      	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110)
      	at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:258)
      	at org.eclipse.jetty.io.ssl.SslConnection$3.succeeded(SslConnection.java:147)
      	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110)
      	at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:672)
      	at org.apache.qpid.server.management.plugin.HttpManagement$QBBTrackingThreadPool.runJob(HttpManagement.java:898)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:590)
      	at org.apache.qpid.server.management.plugin.HttpManagement$QBBTrackingThreadPool.lambda$newThread$0(HttpManagement.java:880)
      	at java.lang.Thread.run(Thread.java:748)
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            kwall Keith Wall
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: