You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Edson Richter <ed...@hotmail.com> on 2022/02/23 15:04:55 UTC

ARTEMIS-3677 mitigate NPE when browsing messages

Hi!

There is a plan to release a 2.20.1 version of Artemis? I鈥檓 plagued by  ARTEMIS-3677 mitigate NPE when browsing message which is already fixed in source code.
If there is a roadmap on planned future releases, I would look there, to not disturb the list 馃槉

Thanks,

Edson Richter


Enviado do Email<https://go.microsoft.com/fwlink/?LinkId=550986> para Windows


RES: ARTEMIS-3677 mitigate NPE when browsing messages

Posted by Edson Richter <ed...@hotmail.com>.
Perfect! Thanks!


Edson

Enviado do Email<https://go.microsoft.com/fwlink/?LinkId=550986> para Windows

De: Justin Bertram<ma...@apache.org>
Enviado:quarta-feira, 23 de fevereiro de 2022 12:15
Para: users@activemq.apache.org<ma...@activemq.apache.org>
Assunto: Re: ARTEMIS-3677 mitigate NPE when browsing messages

The next release of ActiveMQ Artemis will be 2.21.0. There is no 2.20.1
release planned. I expect 2.21.0 to be tagged and sent for a vote before
the end of this quarter (i.e. March 31).

In the mean-time you have a couple ways to mitigate the issue:

  1) Don't send messages with a null property value.
  2) Build the current "main" branch using "mvn clean install -Prelease
-DskipTests" and then replace your broker's existing
lib/artemis-core-client-*.jar with the one put into
artemis-distribution/target/apache-artemis-2.21.0-SNAPSHOT-bin/apache-artemis-2.21.0-SNAPSHOT/lib/.


Justin

On Wed, Feb 23, 2022 at 9:06 AM Edson Richter <ed...@hotmail.com>
wrote:

> Hi!
>
> There is a plan to release a 2.20.1 version of Artemis? I鈥檓 plagued by
> ARTEMIS-3677 mitigate NPE when browsing message which is already fixed in
> source code.
> If there is a roadmap on planned future releases, I would look there, to
> not disturb the list 馃槉
>
> Thanks,
>
> Edson Richter
>
>
> Enviado do Email<https://go.microsoft.com/fwlink/?LinkId=550986> para
> Windows
>
>


Re: ARTEMIS-3677 mitigate NPE when browsing messages

Posted by Justin Bertram <jb...@apache.org>.
Are you looking at the HEAD of the main branch? All the places where
truncateString() is invoked already have null checks so that shouldn't be a
problem at the moment. That said, I don't think the code is very safe.


Justin


On Thu, Feb 24, 2022 at 3:00 PM Edson Richter <ed...@hotmail.com>
wrote:

> I鈥檝e found another potential NPE in JsonUtil Source code:
>
>
> public static String truncateString(final String str, final int
> valueSizeLimit) {
>       if (valueSizeLimit >= 0 && str.length() > valueSizeLimit) {
>          return new StringBuilder(valueSizeLimit +
> 32).append(str.substring(0, valueSizeLimit)).append(", +
> ").append(str.length() - valueSizeLimit).append(" more").toString();
>       } else {
>          return str;
>       }
>    }
>
> Should be rewriten With a null test first...
>
> public static String truncateString(final String str, final int
> valueSizeLimit) {
>       if (str!=null && valueSizeLimit >= 0 && str.length() >
> valueSizeLimit) {
>          return new StringBuilder(valueSizeLimit +
> 32).append(str.substring(0, valueSizeLimit)).append(", +
> ").append(str.length() - valueSizeLimit).append(" more").toString();
>       } else {
>          return str;
>       }
>    }
>
>
> Regards,
>
> ER
>
>
> Enviado do Email<https://go.microsoft.com/fwlink/?LinkId=550986> para
> Windows
>
> De: Edson Richter<ma...@hotmail.com>
> Enviado:quinta-feira, 24 de fevereiro de 2022 17:52
> Para: users@activemq.apache.org<ma...@activemq.apache.org>
> Assunto: RES: ARTEMIS-3677 mitigate NPE when browsing messages
>
> It鈥檚 quite similar to examples found in documentation here: stomp/main.go
> at master 路 go-stomp/stomp (github.com)<
> https://github.com/go-stomp/stomp/blob/master/examples/client_test/main.go
> >.
>
> The difference from the example above is that I鈥檓 using application/json
> and sending a json string instead plain string.
>
>
> Queues in broker.xml are declared as:
>
>       <address name="dtsendrech000049dev"><anycast><queue
> name="dtsendrech000049dev"></queue></anycast></address>
>       <address name="dtrecvrech000049dev"><anycast><queue
> name="dtrecvrech000049dev"></queue></anycast></address>
>
> I鈥檓 connecting to tcp://192.168.0.70:61616 (which, for it鈥檚 turn, detects
> Stomp protocol).
>
>
> The stacktrace helps?
>
> 2022-02-24 17:44:40,710 WARN
> [org.apache.activemq.artemis.core.management.impl.QueueControlImpl] null:
> java.lang.NullPointerException
>         at
> org.apache.activemq.artemis.api.core.JsonUtil.truncate(JsonUtil.java:339)
> [artemis-core-client-2.20.0.jar:2.20.0]
>         at
> org.apache.activemq.artemis.api.core.Message.toPropertyMap(Message.java:768)
> [artemis-core-client-2.20.0.jar:2.20.0]
>         at
> org.apache.activemq.artemis.core.message.openmbean.MessageOpenTypeFactory.expandProperties(MessageOpenTypeFactory.java:168)
> [artemis-core-client-2.20.0.jar:2.20.0]
>         at
> org.apache.activemq.artemis.core.message.openmbean.MessageOpenTypeFactory.getFields(MessageOpenTypeFactory.java:146)
> [artemis-core-client-2.20.0.jar:2.20.0]
>         at
> org.apache.activemq.artemis.core.message.impl.CoreMessage$TextMessageOpenTypeFactory.getFields(CoreMessage.java:1406)
> [artemis-core-client-2.20.0.jar:2.20.0]
>         at
> org.apache.activemq.artemis.core.message.impl.CoreMessage$TextMessageOpenTypeFactory.getFields(CoreMessage.java:1397)
> [artemis-core-client-2.20.0.jar:2.20.0]
>         at
> org.apache.activemq.artemis.core.message.impl.CoreMessage.toCompositeData(CoreMessage.java:1354)
> [artemis-core-client-2.20.0.jar:2.20.0]
>         at
> org.apache.activemq.artemis.core.management.impl.QueueControlImpl.browse(QueueControlImpl.java:1583)
> [artemis-server-2.20.0.jar:2.20.0]
>         at
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method) [java.base:]
>         at
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> [java.base:]
>         at
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> [java.base:]
>         at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> [java.base:]
>         at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71)
> [java.base:]
>         at jdk.internal.reflect.GeneratedMethodAccessor12.invoke(Unknown
> Source)
>         at
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> [java.base:]
>         at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> [java.base:]
>         at
> java.base/sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:260)
> [java.base:]
>         at
> java.management/com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:112)
> [java.management:]
>         at
> java.management/com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:46)
> [java.management:]
>         at
> java.management/com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237)
> [java.management:]
>         at
> java.management/com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138)
> [java.management:]
>         at
> java.management/com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:252)
> [java.management:]
>         at
> java.management/javax.management.StandardMBean.invoke(StandardMBean.java:405)
> [java.management:]
>         at
> java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:809)
> [java.management:]
>         at
> java.management/com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
> [java.management:]
>         at jdk.internal.reflect.GeneratedMethodAccessor13.invoke(Unknown
> Source)
>         at
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> [java.base:]
>         at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> [java.base:]
>         at
> org.apache.activemq.artemis.core.server.management.ArtemisMBeanServerBuilder$MBeanInvocationHandler.invoke(ArtemisMBeanServerBuilder.java:96)
> [artemis-server-2.20.0.jar:2.20.0]
>         at com.sun.proxy.$Proxy17.invoke(Unknown Source)
>         at
> org.jolokia.handler.ExecHandler.doHandleRequest(ExecHandler.java:98)
> [jolokia-core-1.7.0.jar:]
>         at
> org.jolokia.handler.ExecHandler.doHandleRequest(ExecHandler.java:40)
> [jolokia-core-1.7.0.jar:]
>         at
> org.jolokia.handler.JsonRequestHandler.handleRequest(JsonRequestHandler.java:89)
> [jolokia-core-1.7.0.jar:]
>         at
> org.jolokia.backend.MBeanServerExecutorLocal.handleRequest(MBeanServerExecutorLocal.java:109)
> [jolokia-core-1.7.0.jar:]
>         at
> org.jolokia.backend.MBeanServerHandler.dispatchRequest(MBeanServerHandler.java:161)
> [jolokia-core-1.7.0.jar:]
>         at
> org.jolokia.backend.LocalRequestDispatcher.dispatchRequest(LocalRequestDispatcher.java:99)
> [jolokia-core-1.7.0.jar:]
>         at
> org.jolokia.backend.BackendManager.callRequestDispatcher(BackendManager.java:429)
> [jolokia-core-1.7.0.jar:]
>         at
> org.jolokia.backend.BackendManager.handleRequest(BackendManager.java:158)
> [jolokia-core-1.7.0.jar:]
>         at
> org.jolokia.http.HttpRequestHandler.executeRequest(HttpRequestHandler.java:197)
> [jolokia-core-1.7.0.jar:]
>         at
> org.jolokia.http.HttpRequestHandler.handlePostRequest(HttpRequestHandler.java:137)
> [jolokia-core-1.7.0.jar:]
>         at
> org.jolokia.http.AgentServlet$3.handleRequest(AgentServlet.java:493)
> [jolokia-core-1.7.0.jar:]
>         at
> org.jolokia.http.AgentServlet.handleSecurely(AgentServlet.java:383)
> [jolokia-core-1.7.0.jar:]
>         at org.jolokia.http.AgentServlet.handle(AgentServlet.java:354)
> [jolokia-core-1.7.0.jar:]
>         at org.jolokia.http.AgentServlet.doPost(AgentServlet.java:317)
> [jolokia-core-1.7.0.jar:]
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
> [jetty-all-9.4.44.v20210927-uber.jar:9.4.44.v20210927]
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
> [jetty-all-9.4.44.v20210927-uber.jar:9.4.44.v20210927]
>         at
> org.eclipse.jetty.servlet.ServletHolder$NotAsync.service(ServletHolder.java:1459)
>         at
> org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799)
>         at
> org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1631)
>         at
> io.hawt.web.filters.FlightRecordingDownloadFacade.doFilter(FlightRecordingDownloadFacade.java:68)
> [hawtio-system-2.14.0.jar:2.14.0]
>         at
> org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
>         at
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
>         at
> io.hawt.web.auth.LoginRedirectFilter.doFilter(LoginRedirectFilter.java:63)
> [hawtio-system-2.14.0.jar:2.14.0]
>         at
> org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
>         at
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
>         at
> io.hawt.web.auth.AuthenticationFilter.lambda$executeAs$1(AuthenticationFilter.java:105)
> [hawtio-system-2.14.0.jar:2.14.0]
>         at
> io.hawt.web.auth.AuthenticationFilter$$Lambda$363/0x0000000000000000.run(Unknown
> Source)
>         at
> java.base/java.security.AccessController.doPrivileged(AccessController.java:774)
> [java.base:]
>         at java.base/javax.security.auth.Subject.doAs(Subject.java:423)
> [java.base:]
>         at
> io.hawt.web.auth.AuthenticationFilter.executeAs(AuthenticationFilter.java:104)
> [hawtio-system-2.14.0.jar:2.14.0]
>         at
> io.hawt.web.auth.AuthenticationFilter.doFilter(AuthenticationFilter.java:72)
> [hawtio-system-2.14.0.jar:2.14.0]
>         at
> org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
>         at
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
>         at
> io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43)
> [hawtio-system-2.14.0.jar:2.14.0]
>         at
> org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
>         at
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
>         at
> io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43)
> [hawtio-system-2.14.0.jar:2.14.0]
>         at
> org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
>         at
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
>         at
> io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43)
> [hawtio-system-2.14.0.jar:2.14.0]
>         at
> org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
>         at
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
>         at
> io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43)
> [hawtio-system-2.14.0.jar:2.14.0]
>         at
> org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
>         at
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
>         at
> io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43)
> [hawtio-system-2.14.0.jar:2.14.0]
>         at
> org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
>         at
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
>         at
> io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43)
> [hawtio-system-2.14.0.jar:2.14.0]
>         at
> org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
>         at
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
>         at
> io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43)
> [hawtio-system-2.14.0.jar:2.14.0]
>         at
> org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
>         at
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
>         at
> io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43)
> [hawtio-system-2.14.0.jar:2.14.0]
>         at
> org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
>         at
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
>         at
> io.hawt.web.auth.SessionExpiryFilter.process(SessionExpiryFilter.java:166)
> [hawtio-system-2.14.0.jar:2.14.0]
>         at
> io.hawt.web.auth.SessionExpiryFilter.doFilter(SessionExpiryFilter.java:60)
> [hawtio-system-2.14.0.jar:2.14.0]
>         at
> org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:201)
>         at
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
>         at
> org.apache.activemq.artemis.component.JolokiaFilter.doFilter(JolokiaFilter.java:50)
> [artemis-web-2.20.0.jar:2.20.0]
>         at
> org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
>         at
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
>         at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:548)
>         at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
>         at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:600)
>         at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
>         at
> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
>         at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)
>         at
> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
>         at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1434)
>         at
> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
>         at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)
>         at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)
>         at
> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
>         at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1349)
>         at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
>         at
> org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:59)
>         at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
>         at org.eclipse.jetty.server.Server.handle(Server.java:516)
>         at
> org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:400)
>         at <unknown class>.dispatch(Unknown Source)
>         at
> org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:645)
>         at
> org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:392)
>         at
> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)
>         at org.eclipse.jetty.io
> .AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
>         at org.eclipse.jetty.io
> .FillInterest.fillable(FillInterest.java:105)
>         at org.eclipse.jetty.io
> .ChannelEndPoint$1.run(ChannelEndPoint.java:104)
>         at
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338)
>         at
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315)
>         at
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173)
>         at
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
>         at
> org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:409)
>         at
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)
>         at
> org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)
>         at java.base/java.lang.Thread.run(Thread.java:866) [java.base:]
>
>
>
> Enviado do Email<https://go.microsoft.com/fwlink/?LinkId=550986> para
> Windows
>
> ________________________________
> De: Justin Bertram <jb...@apache.org>
> Enviado: Thursday, February 24, 2022 5:26:50 PM
> Para: users@activemq.apache.org <us...@activemq.apache.org>
> Assunto: Re: ARTEMIS-3677 mitigate NPE when browsing messages
>
> I don't see anything problematic. Work up some kind of reproducible test
> and I'll try to carve out some time to take a look.
>
>
> Justin
>
> On Thu, Feb 24, 2022 at 2:23 PM Edson Richter <ed...@hotmail.com>
> wrote:
>
> > Ok, I would need some help identifying Where is my fault. Please advise.
> > I don鈥檛 see anything null in here:
> >
> >
> > 2022-02-24 17:15:34,530 DEBUG
> > [org.apache.activemq.artemis.core.protocol.stomp.StompConnection] STOMP(/
> > 192.168.0.30:60724, f7986f29): IN << StompFrame[command=CONNECT,
> > headers={accept-version=1.0,1.1,1.2, heart-beat=60000,60000,
> > host=192.168.0.250, login=******, passcode=****}]
> > 2022-02-24 17:15:34,532 DEBUG
> > [org.apache.activemq.artemis.core.protocol.stomp.StompConnection] STOMP(/
> > 192.168.0.30:60724, f7986f29):OUT >> StompFrame[command=CONNECTED,
> > headers={version=1.2, session=f7986f29, server=ActiveMQ-Artemis/2.20.0
> > ActiveMQ Artemis Messaging Engine, heart-beat=60000,60000}]
> > 2022-02-24 17:15:34,535 DEBUG
> > [org.apache.activemq.artemis.core.protocol.stomp.StompConnection] STOMP(/
> > 192.168.0.30:60724, f7986f29): IN << StompFrame[command=SEND,
> > headers={destination=dtrecvrech000049dev::dtrecvrech000049dev,
> > content-type=application/json, persistent=true},
> > body={"status":-5,"message":"O sistema Rech retornou um c贸digo de
> resposta
> > 401. A chave do CT-e 茅 .\nA mensagem do sistema 茅
> > {\"status\":{\"code\":-1,\"message\":\"N茫o
> autorizado\"}}","ctcChave":""},
> > body-bytes=[123, 34, 115, 116, 97, 116, 117, 115, 34, 58, 45, 53, 44, 34,
> > 109, 101, 115, 115, 97, 103, 101, 34, 58, 34, 79, 32, 115, 105, 115, 116,
> > 101, 109, 97, 32, 82, 101, 99, 104, 32, 114, 101, 116, 111, 114, 110,
> 111,
> > 117, 32, 117, 109, 32, 99, -61, -77, 100, 105, 103, 111, 32, 100, 101,
> 32,
> > 114, 101, 115, 112, 111, 115, 116, 97, 32, 52, 48, 49, 46, 32, 65, 32,
> 99,
> > 104, 97, 118, 101, 32, 100, 111, 32, 67, 84, 45, 101, 32, -61, -87, 32,
> 46,
> > 92, 110, 65, 32, 109, 101, 110, 115, 97, 103, 101, 109, 32, 100, 111, 32,
> > 115, 105, 115, 116, 101, 109, 97, 32, -61, -87, 32, 123, 92, 34, 115,
> 116,
> > 97, 116, 117, 115, 92, 34, 58, 123, 92, 34, 99, 111, 100, 101, 92, 34,
> 58,
> > 45, 49, 44, 92, 34, 109, 101, 115, 115, 97, 103, 101, 92, 34, 58, 92, 34,
> > 78, -61, -93, 111, 32, 97, 117, 116, 111, 114, 105, 122, 97, 100, 111,
> 92,
> > 34, 125, 125, 34, 44, 34, 99, 116, 99, 67, 104, 97, 118, 101, 34, 58, 34,
> > 34, 125], size=0]
> > 2022-02-24 17:15:34,537 DEBUG
> > [org.apache.activemq.artemis.core.protocol.stomp.StompConnection] STOMP(/
> > 192.168.0.30:60724, f7986f29): IN << StompFrame[command=DISCONNECT,
> > headers={receipt=5}]
> > 2022-02-24 17:15:34,537 DEBUG
> > [org.apache.activemq.artemis.core.protocol.stomp.StompConnection] STOMP(/
> > 192.168.0.30:60724, f7986f29):OUT >> StompFrame[command=RECEIPT,
> > headers={receipt-id=5}]
> >
> >
> > Thanks once again 馃槉
> >
> > ER
> >
> >
> > Enviado do Email<https://go.microsoft.com/fwlink/?LinkId=550986> para
> > Windows
> >
> > De: Justin Bertram<ma...@apache.org>
> > Enviado:quinta-feira, 24 de fevereiro de 2022 14:22
> > Para: users@activemq.apache.org<ma...@activemq.apache.org>
> > Assunto: Re: ARTEMIS-3677 mitigate NPE when browsing messages
> >
> > > Is there a way to log what ActiveMQ is receiving from my STOMP client?
> >
> > See this documentation [1].
> >
> >
> > Justin
> >
> > [1]
> >
> >
> https://activemq.apache.org/components/artemis/documentation/latest/stomp.html#logging
> >
> > On Thu, Feb 24, 2022 at 11:18 AM Edson Richter <edsonrichter@hotmail.com
> >
> > wrote:
> >
> > > Just one point... I鈥檓 not sending any null atributes; except the cause
> is
> > > that I鈥檓 not sending a unique identifier.
> > > Is there a way to log what ActiveMQ is receiving from my STOMP client?
> > >
> > > Thanks,
> > >
> > > ER
> > >
> > > Enviado do Email<https://go.microsoft.com/fwlink/?LinkId=550986> para
> > > Windows
> > >
> > > De: Justin Bertram<ma...@apache.org>
> > > Enviado:quarta-feira, 23 de fevereiro de 2022 12:15
> > > Para: users@activemq.apache.org<ma...@activemq.apache.org>
> > > Assunto: Re: ARTEMIS-3677 mitigate NPE when browsing messages
> > >
> > > The next release of ActiveMQ Artemis will be 2.21.0. There is no 2.20.1
> > > release planned. I expect 2.21.0 to be tagged and sent for a vote
> before
> > > the end of this quarter (i.e. March 31).
> > >
> > > In the mean-time you have a couple ways to mitigate the issue:
> > >
> > >   1) Don't send messages with a null property value.
> > >   2) Build the current "main" branch using "mvn clean install -Prelease
> > > -DskipTests" and then replace your broker's existing
> > > lib/artemis-core-client-*.jar with the one put into
> > >
> > >
> >
> artemis-distribution/target/apache-artemis-2.21.0-SNAPSHOT-bin/apache-artemis-2.21.0-SNAPSHOT/lib/.
> > >
> > >
> > > Justin
> > >
> > > On Wed, Feb 23, 2022 at 9:06 AM Edson Richter <
> edsonrichter@hotmail.com>
> > > wrote:
> > >
> > > > Hi!
> > > >
> > > > There is a plan to release a 2.20.1 version of Artemis? I鈥檓 plagued
> by
> > > > ARTEMIS-3677 mitigate NPE when browsing message which is already
> fixed
> > in
> > > > source code.
> > > > If there is a roadmap on planned future releases, I would look there,
> > to
> > > > not disturb the list 馃槉
> > > >
> > > > Thanks,
> > > >
> > > > Edson Richter
> > > >
> > > >
> > > > Enviado do Email<https://go.microsoft.com/fwlink/?LinkId=550986>
> para
> > > > Windows
> > > >
> > > >
> > >
> > >
> >
> >
>
>

RES: ARTEMIS-3677 mitigate NPE when browsing messages

Posted by Edson Richter <ed...@hotmail.com>.
I鈥檝e found another potential NPE in JsonUtil Source code:


public static String truncateString(final String str, final int valueSizeLimit) {
      if (valueSizeLimit >= 0 && str.length() > valueSizeLimit) {
         return new StringBuilder(valueSizeLimit + 32).append(str.substring(0, valueSizeLimit)).append(", + ").append(str.length() - valueSizeLimit).append(" more").toString();
      } else {
         return str;
      }
   }

Should be rewriten With a null test first...

public static String truncateString(final String str, final int valueSizeLimit) {
      if (str!=null && valueSizeLimit >= 0 && str.length() > valueSizeLimit) {
         return new StringBuilder(valueSizeLimit + 32).append(str.substring(0, valueSizeLimit)).append(", + ").append(str.length() - valueSizeLimit).append(" more").toString();
      } else {
         return str;
      }
   }


Regards,

ER


Enviado do Email<https://go.microsoft.com/fwlink/?LinkId=550986> para Windows

De: Edson Richter<ma...@hotmail.com>
Enviado:quinta-feira, 24 de fevereiro de 2022 17:52
Para: users@activemq.apache.org<ma...@activemq.apache.org>
Assunto: RES: ARTEMIS-3677 mitigate NPE when browsing messages

It鈥檚 quite similar to examples found in documentation here: stomp/main.go at master 路 go-stomp/stomp (github.com)<https://github.com/go-stomp/stomp/blob/master/examples/client_test/main.go>.

The difference from the example above is that I鈥檓 using application/json and sending a json string instead plain string.


Queues in broker.xml are declared as:

      <address name="dtsendrech000049dev"><anycast><queue name="dtsendrech000049dev"></queue></anycast></address>
      <address name="dtrecvrech000049dev"><anycast><queue name="dtrecvrech000049dev"></queue></anycast></address>

I鈥檓 connecting to tcp://192.168.0.70:61616 (which, for it鈥檚 turn, detects Stomp protocol).


The stacktrace helps?

2022-02-24 17:44:40,710 WARN  [org.apache.activemq.artemis.core.management.impl.QueueControlImpl] null: java.lang.NullPointerException
        at org.apache.activemq.artemis.api.core.JsonUtil.truncate(JsonUtil.java:339) [artemis-core-client-2.20.0.jar:2.20.0]
        at org.apache.activemq.artemis.api.core.Message.toPropertyMap(Message.java:768) [artemis-core-client-2.20.0.jar:2.20.0]
        at org.apache.activemq.artemis.core.message.openmbean.MessageOpenTypeFactory.expandProperties(MessageOpenTypeFactory.java:168) [artemis-core-client-2.20.0.jar:2.20.0]
        at org.apache.activemq.artemis.core.message.openmbean.MessageOpenTypeFactory.getFields(MessageOpenTypeFactory.java:146) [artemis-core-client-2.20.0.jar:2.20.0]
        at org.apache.activemq.artemis.core.message.impl.CoreMessage$TextMessageOpenTypeFactory.getFields(CoreMessage.java:1406) [artemis-core-client-2.20.0.jar:2.20.0]
        at org.apache.activemq.artemis.core.message.impl.CoreMessage$TextMessageOpenTypeFactory.getFields(CoreMessage.java:1397) [artemis-core-client-2.20.0.jar:2.20.0]
        at org.apache.activemq.artemis.core.message.impl.CoreMessage.toCompositeData(CoreMessage.java:1354) [artemis-core-client-2.20.0.jar:2.20.0]
        at org.apache.activemq.artemis.core.management.impl.QueueControlImpl.browse(QueueControlImpl.java:1583) [artemis-server-2.20.0.jar:2.20.0]
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java.base:]
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [java.base:]
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [java.base:]
        at java.base/java.lang.reflect.Method.invoke(Method.java:566) [java.base:]
        at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71) [java.base:]
        at jdk.internal.reflect.GeneratedMethodAccessor12.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [java.base:]
        at java.base/java.lang.reflect.Method.invoke(Method.java:566) [java.base:]
        at java.base/sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:260) [java.base:]
        at java.management/com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:112) [java.management:]
        at java.management/com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:46) [java.management:]
        at java.management/com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237) [java.management:]
        at java.management/com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138) [java.management:]
        at java.management/com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:252) [java.management:]
        at java.management/javax.management.StandardMBean.invoke(StandardMBean.java:405) [java.management:]
        at java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:809) [java.management:]
        at java.management/com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) [java.management:]
        at jdk.internal.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [java.base:]
        at java.base/java.lang.reflect.Method.invoke(Method.java:566) [java.base:]
        at org.apache.activemq.artemis.core.server.management.ArtemisMBeanServerBuilder$MBeanInvocationHandler.invoke(ArtemisMBeanServerBuilder.java:96) [artemis-server-2.20.0.jar:2.20.0]
        at com.sun.proxy.$Proxy17.invoke(Unknown Source)
        at org.jolokia.handler.ExecHandler.doHandleRequest(ExecHandler.java:98) [jolokia-core-1.7.0.jar:]
        at org.jolokia.handler.ExecHandler.doHandleRequest(ExecHandler.java:40) [jolokia-core-1.7.0.jar:]
        at org.jolokia.handler.JsonRequestHandler.handleRequest(JsonRequestHandler.java:89) [jolokia-core-1.7.0.jar:]
        at org.jolokia.backend.MBeanServerExecutorLocal.handleRequest(MBeanServerExecutorLocal.java:109) [jolokia-core-1.7.0.jar:]
        at org.jolokia.backend.MBeanServerHandler.dispatchRequest(MBeanServerHandler.java:161) [jolokia-core-1.7.0.jar:]
        at org.jolokia.backend.LocalRequestDispatcher.dispatchRequest(LocalRequestDispatcher.java:99) [jolokia-core-1.7.0.jar:]
        at org.jolokia.backend.BackendManager.callRequestDispatcher(BackendManager.java:429) [jolokia-core-1.7.0.jar:]
        at org.jolokia.backend.BackendManager.handleRequest(BackendManager.java:158) [jolokia-core-1.7.0.jar:]
        at org.jolokia.http.HttpRequestHandler.executeRequest(HttpRequestHandler.java:197) [jolokia-core-1.7.0.jar:]
        at org.jolokia.http.HttpRequestHandler.handlePostRequest(HttpRequestHandler.java:137) [jolokia-core-1.7.0.jar:]
        at org.jolokia.http.AgentServlet$3.handleRequest(AgentServlet.java:493) [jolokia-core-1.7.0.jar:]
        at org.jolokia.http.AgentServlet.handleSecurely(AgentServlet.java:383) [jolokia-core-1.7.0.jar:]
        at org.jolokia.http.AgentServlet.handle(AgentServlet.java:354) [jolokia-core-1.7.0.jar:]
        at org.jolokia.http.AgentServlet.doPost(AgentServlet.java:317) [jolokia-core-1.7.0.jar:]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) [jetty-all-9.4.44.v20210927-uber.jar:9.4.44.v20210927]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [jetty-all-9.4.44.v20210927-uber.jar:9.4.44.v20210927]
        at org.eclipse.jetty.servlet.ServletHolder$NotAsync.service(ServletHolder.java:1459)
        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799)
        at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1631)
        at io.hawt.web.filters.FlightRecordingDownloadFacade.doFilter(FlightRecordingDownloadFacade.java:68) [hawtio-system-2.14.0.jar:2.14.0]
        at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
        at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
        at io.hawt.web.auth.LoginRedirectFilter.doFilter(LoginRedirectFilter.java:63) [hawtio-system-2.14.0.jar:2.14.0]
        at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
        at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
        at io.hawt.web.auth.AuthenticationFilter.lambda$executeAs$1(AuthenticationFilter.java:105) [hawtio-system-2.14.0.jar:2.14.0]
        at io.hawt.web.auth.AuthenticationFilter$$Lambda$363/0x0000000000000000.run(Unknown Source)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:774) [java.base:]
        at java.base/javax.security.auth.Subject.doAs(Subject.java:423) [java.base:]
        at io.hawt.web.auth.AuthenticationFilter.executeAs(AuthenticationFilter.java:104) [hawtio-system-2.14.0.jar:2.14.0]
        at io.hawt.web.auth.AuthenticationFilter.doFilter(AuthenticationFilter.java:72) [hawtio-system-2.14.0.jar:2.14.0]
        at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
        at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
        at io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43) [hawtio-system-2.14.0.jar:2.14.0]
        at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
        at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
        at io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43) [hawtio-system-2.14.0.jar:2.14.0]
        at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
        at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
        at io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43) [hawtio-system-2.14.0.jar:2.14.0]
        at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
        at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
        at io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43) [hawtio-system-2.14.0.jar:2.14.0]
        at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
        at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
        at io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43) [hawtio-system-2.14.0.jar:2.14.0]
        at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
        at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
        at io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43) [hawtio-system-2.14.0.jar:2.14.0]
        at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
        at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
        at io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43) [hawtio-system-2.14.0.jar:2.14.0]
        at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
        at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
        at io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43) [hawtio-system-2.14.0.jar:2.14.0]
        at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
        at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
        at io.hawt.web.auth.SessionExpiryFilter.process(SessionExpiryFilter.java:166) [hawtio-system-2.14.0.jar:2.14.0]
        at io.hawt.web.auth.SessionExpiryFilter.doFilter(SessionExpiryFilter.java:60) [hawtio-system-2.14.0.jar:2.14.0]
        at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:201)
        at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
        at org.apache.activemq.artemis.component.JolokiaFilter.doFilter(JolokiaFilter.java:50) [artemis-web-2.20.0.jar:2.20.0]
        at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
        at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:548)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:600)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
        at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)
        at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1434)
        at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)
        at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1349)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
        at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:59)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
        at org.eclipse.jetty.server.Server.handle(Server.java:516)
        at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:400)
        at <unknown class>.dispatch(Unknown Source)
        at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:645)
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:392)
        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)
        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
        at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338)
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315)
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173)
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
        at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:409)
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)
        at java.base/java.lang.Thread.run(Thread.java:866) [java.base:]



Enviado do Email<https://go.microsoft.com/fwlink/?LinkId=550986> para Windows

________________________________
De: Justin Bertram <jb...@apache.org>
Enviado: Thursday, February 24, 2022 5:26:50 PM
Para: users@activemq.apache.org <us...@activemq.apache.org>
Assunto: Re: ARTEMIS-3677 mitigate NPE when browsing messages

I don't see anything problematic. Work up some kind of reproducible test
and I'll try to carve out some time to take a look.


Justin

On Thu, Feb 24, 2022 at 2:23 PM Edson Richter <ed...@hotmail.com>
wrote:

> Ok, I would need some help identifying Where is my fault. Please advise.
> I don鈥檛 see anything null in here:
>
>
> 2022-02-24 17:15:34,530 DEBUG
> [org.apache.activemq.artemis.core.protocol.stomp.StompConnection] STOMP(/
> 192.168.0.30:60724, f7986f29): IN << StompFrame[command=CONNECT,
> headers={accept-version=1.0,1.1,1.2, heart-beat=60000,60000,
> host=192.168.0.250, login=******, passcode=****}]
> 2022-02-24 17:15:34,532 DEBUG
> [org.apache.activemq.artemis.core.protocol.stomp.StompConnection] STOMP(/
> 192.168.0.30:60724, f7986f29):OUT >> StompFrame[command=CONNECTED,
> headers={version=1.2, session=f7986f29, server=ActiveMQ-Artemis/2.20.0
> ActiveMQ Artemis Messaging Engine, heart-beat=60000,60000}]
> 2022-02-24 17:15:34,535 DEBUG
> [org.apache.activemq.artemis.core.protocol.stomp.StompConnection] STOMP(/
> 192.168.0.30:60724, f7986f29): IN << StompFrame[command=SEND,
> headers={destination=dtrecvrech000049dev::dtrecvrech000049dev,
> content-type=application/json, persistent=true},
> body={"status":-5,"message":"O sistema Rech retornou um c贸digo de resposta
> 401. A chave do CT-e 茅 .\nA mensagem do sistema 茅
> {\"status\":{\"code\":-1,\"message\":\"N茫o autorizado\"}}","ctcChave":""},
> body-bytes=[123, 34, 115, 116, 97, 116, 117, 115, 34, 58, 45, 53, 44, 34,
> 109, 101, 115, 115, 97, 103, 101, 34, 58, 34, 79, 32, 115, 105, 115, 116,
> 101, 109, 97, 32, 82, 101, 99, 104, 32, 114, 101, 116, 111, 114, 110, 111,
> 117, 32, 117, 109, 32, 99, -61, -77, 100, 105, 103, 111, 32, 100, 101, 32,
> 114, 101, 115, 112, 111, 115, 116, 97, 32, 52, 48, 49, 46, 32, 65, 32, 99,
> 104, 97, 118, 101, 32, 100, 111, 32, 67, 84, 45, 101, 32, -61, -87, 32, 46,
> 92, 110, 65, 32, 109, 101, 110, 115, 97, 103, 101, 109, 32, 100, 111, 32,
> 115, 105, 115, 116, 101, 109, 97, 32, -61, -87, 32, 123, 92, 34, 115, 116,
> 97, 116, 117, 115, 92, 34, 58, 123, 92, 34, 99, 111, 100, 101, 92, 34, 58,
> 45, 49, 44, 92, 34, 109, 101, 115, 115, 97, 103, 101, 92, 34, 58, 92, 34,
> 78, -61, -93, 111, 32, 97, 117, 116, 111, 114, 105, 122, 97, 100, 111, 92,
> 34, 125, 125, 34, 44, 34, 99, 116, 99, 67, 104, 97, 118, 101, 34, 58, 34,
> 34, 125], size=0]
> 2022-02-24 17:15:34,537 DEBUG
> [org.apache.activemq.artemis.core.protocol.stomp.StompConnection] STOMP(/
> 192.168.0.30:60724, f7986f29): IN << StompFrame[command=DISCONNECT,
> headers={receipt=5}]
> 2022-02-24 17:15:34,537 DEBUG
> [org.apache.activemq.artemis.core.protocol.stomp.StompConnection] STOMP(/
> 192.168.0.30:60724, f7986f29):OUT >> StompFrame[command=RECEIPT,
> headers={receipt-id=5}]
>
>
> Thanks once again 馃槉
>
> ER
>
>
> Enviado do Email<https://go.microsoft.com/fwlink/?LinkId=550986> para
> Windows
>
> De: Justin Bertram<ma...@apache.org>
> Enviado:quinta-feira, 24 de fevereiro de 2022 14:22
> Para: users@activemq.apache.org<ma...@activemq.apache.org>
> Assunto: Re: ARTEMIS-3677 mitigate NPE when browsing messages
>
> > Is there a way to log what ActiveMQ is receiving from my STOMP client?
>
> See this documentation [1].
>
>
> Justin
>
> [1]
>
> https://activemq.apache.org/components/artemis/documentation/latest/stomp.html#logging
>
> On Thu, Feb 24, 2022 at 11:18 AM Edson Richter <ed...@hotmail.com>
> wrote:
>
> > Just one point... I鈥檓 not sending any null atributes; except the cause is
> > that I鈥檓 not sending a unique identifier.
> > Is there a way to log what ActiveMQ is receiving from my STOMP client?
> >
> > Thanks,
> >
> > ER
> >
> > Enviado do Email<https://go.microsoft.com/fwlink/?LinkId=550986> para
> > Windows
> >
> > De: Justin Bertram<ma...@apache.org>
> > Enviado:quarta-feira, 23 de fevereiro de 2022 12:15
> > Para: users@activemq.apache.org<ma...@activemq.apache.org>
> > Assunto: Re: ARTEMIS-3677 mitigate NPE when browsing messages
> >
> > The next release of ActiveMQ Artemis will be 2.21.0. There is no 2.20.1
> > release planned. I expect 2.21.0 to be tagged and sent for a vote before
> > the end of this quarter (i.e. March 31).
> >
> > In the mean-time you have a couple ways to mitigate the issue:
> >
> >   1) Don't send messages with a null property value.
> >   2) Build the current "main" branch using "mvn clean install -Prelease
> > -DskipTests" and then replace your broker's existing
> > lib/artemis-core-client-*.jar with the one put into
> >
> >
> artemis-distribution/target/apache-artemis-2.21.0-SNAPSHOT-bin/apache-artemis-2.21.0-SNAPSHOT/lib/.
> >
> >
> > Justin
> >
> > On Wed, Feb 23, 2022 at 9:06 AM Edson Richter <ed...@hotmail.com>
> > wrote:
> >
> > > Hi!
> > >
> > > There is a plan to release a 2.20.1 version of Artemis? I鈥檓 plagued by
> > > ARTEMIS-3677 mitigate NPE when browsing message which is already fixed
> in
> > > source code.
> > > If there is a roadmap on planned future releases, I would look there,
> to
> > > not disturb the list 馃槉
> > >
> > > Thanks,
> > >
> > > Edson Richter
> > >
> > >
> > > Enviado do Email<https://go.microsoft.com/fwlink/?LinkId=550986> para
> > > Windows
> > >
> > >
> >
> >
>
>


RES: ARTEMIS-3677 mitigate NPE when browsing messages

Posted by Edson Richter <ed...@hotmail.com>.
Ok, I had success. I鈥檝e downloaded 2.20.0 source code, edited JsonUtil with two method changes:


   public static String truncateString(final String str, final int valueSizeLimit) {
      String result = str == null ? "" : str;
      if (valueSizeLimit >= 0 && result.length() > valueSizeLimit) {
         return new StringBuilder(valueSizeLimit + 32).append(result.substring(0, valueSizeLimit)).append(", + ").append(result.length() - valueSizeLimit).append(" more").toString();
      }
      return result;
   }

   public static Object truncate(final Object value, final int valueSizeLimit) {
      Object result = value == null ? "" : value;
      if (valueSizeLimit >= 0) {
         if (String.class.equals(result.getClass())) {
            result = truncateString((String)result, valueSizeLimit);
         } else if (result.getClass().isArray()) {
            if (byte[].class.equals(result.getClass())) {
               if (((byte[]) result).length > valueSizeLimit) {
                  result = Arrays.copyOfRange((byte[]) result, 0, valueSizeLimit);
               }
            } else if (char[].class.equals(result.getClass())) {
               if (((char[]) result).length > valueSizeLimit) {
                  result = Arrays.copyOfRange((char[]) result, 0, valueSizeLimit);
               }
            }
         }
      }
      return result;
   }


In this way, both methods are protected agains NPE.

Regards,


Enviado do Email<https://go.microsoft.com/fwlink/?LinkId=550986> para Windows

________________________________
De: Justin Bertram <jb...@apache.org>
Enviado: Friday, February 25, 2022 1:00:29 AM
Para: users@activemq.apache.org <us...@activemq.apache.org>
Assunto: Re: ARTEMIS-3677 mitigate NPE when browsing messages

I opened ARTEMIS-3696 [1] to deal with the null property values being set
on the STOMP messages by the broker.


Justin

[1] https://issues.apache.org/jira/browse/ARTEMIS-3696

On Thu, Feb 24, 2022 at 8:43 PM Edson Richter <ed...@hotmail.com>
wrote:

> Thanks for all your patience.
> I鈥檒l follow your recomendation, download the sources of 2.20.0 and patch
> it.
> I do believe it鈥檚 only necessary to replace the jar file that contains the
> offending class.
>
> Regards,
>
> ER.
>
>
> Enviado do Email<https://go.microsoft.com/fwlink/?LinkId=550986> para
> Windows
>
> ________________________________
> De: Justin Bertram <jb...@apache.org>
> Enviado: Thursday, February 24, 2022 11:25:23 PM
> Para: users@activemq.apache.org <us...@activemq.apache.org>
> Assunto: Re: ARTEMIS-3677 mitigate NPE when browsing messages
>
> The stack-trace indicates that the NPE is, in fact, being triggered by a
> property with a null value. However, it's almost certainly a property that
> the broker itself is adding. Therefore the only mitigation until 2.21.0 is
> released is to patch the broker yourself.
>
>
> Justin
>
> On Thu, Feb 24, 2022 at 2:52 PM Edson Richter <ed...@hotmail.com>
> wrote:
>
> > It鈥檚 quite similar to examples found in documentation here: stomp/main.go
> > at master 路 go-stomp/stomp (github.com)<
> >
> https://github.com/go-stomp/stomp/blob/master/examples/client_test/main.go
> > >.
> >
> > The difference from the example above is that I鈥檓 using application/json
> > and sending a json string instead plain string.
> >
> >
> > Queues in broker.xml are declared as:
> >
> >       <address name="dtsendrech000049dev"><anycast><queue
> > name="dtsendrech000049dev"></queue></anycast></address>
> >       <address name="dtrecvrech000049dev"><anycast><queue
> > name="dtrecvrech000049dev"></queue></anycast></address>
> >
> > I鈥檓 connecting to tcp://192.168.0.70:61616 (which, for it鈥檚 turn,
> detects
> > Stomp protocol).
> >
> >
> > The stacktrace helps?
> >
> > 2022-02-24 17:44:40,710 WARN
> > [org.apache.activemq.artemis.core.management.impl.QueueControlImpl] null:
> > java.lang.NullPointerException
> >         at
> > org.apache.activemq.artemis.api.core.JsonUtil.truncate(JsonUtil.java:339)
> > [artemis-core-client-2.20.0.jar:2.20.0]
> >         at
> >
> org.apache.activemq.artemis.api.core.Message.toPropertyMap(Message.java:768)
> > [artemis-core-client-2.20.0.jar:2.20.0]
> >         at
> >
> org.apache.activemq.artemis.core.message.openmbean.MessageOpenTypeFactory.expandProperties(MessageOpenTypeFactory.java:168)
> > [artemis-core-client-2.20.0.jar:2.20.0]
> >         at
> >
> org.apache.activemq.artemis.core.message.openmbean.MessageOpenTypeFactory.getFields(MessageOpenTypeFactory.java:146)
> > [artemis-core-client-2.20.0.jar:2.20.0]
> >         at
> >
> org.apache.activemq.artemis.core.message.impl.CoreMessage$TextMessageOpenTypeFactory.getFields(CoreMessage.java:1406)
> > [artemis-core-client-2.20.0.jar:2.20.0]
> >         at
> >
> org.apache.activemq.artemis.core.message.impl.CoreMessage$TextMessageOpenTypeFactory.getFields(CoreMessage.java:1397)
> > [artemis-core-client-2.20.0.jar:2.20.0]
> >         at
> >
> org.apache.activemq.artemis.core.message.impl.CoreMessage.toCompositeData(CoreMessage.java:1354)
> > [artemis-core-client-2.20.0.jar:2.20.0]
> >         at
> >
> org.apache.activemq.artemis.core.management.impl.QueueControlImpl.browse(QueueControlImpl.java:1583)
> > [artemis-server-2.20.0.jar:2.20.0]
> >         at
> > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
> > Method) [java.base:]
> >         at
> >
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> > [java.base:]
> >         at
> >
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> > [java.base:]
> >         at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> > [java.base:]
> >         at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71)
> > [java.base:]
> >         at jdk.internal.reflect.GeneratedMethodAccessor12.invoke(Unknown
> > Source)
> >         at
> >
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> > [java.base:]
> >         at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> > [java.base:]
> >         at
> > java.base/sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:260)
> > [java.base:]
> >         at
> >
> java.management/com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:112)
> > [java.management:]
> >         at
> >
> java.management/com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:46)
> > [java.management:]
> >         at
> >
> java.management/com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237)
> > [java.management:]
> >         at
> >
> java.management/com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138)
> > [java.management:]
> >         at
> >
> java.management/com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:252)
> > [java.management:]
> >         at
> >
> java.management/javax.management.StandardMBean.invoke(StandardMBean.java:405)
> > [java.management:]
> >         at
> >
> java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:809)
> > [java.management:]
> >         at
> >
> java.management/com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
> > [java.management:]
> >         at jdk.internal.reflect.GeneratedMethodAccessor13.invoke(Unknown
> > Source)
> >         at
> >
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> > [java.base:]
> >         at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> > [java.base:]
> >         at
> >
> org.apache.activemq.artemis.core.server.management.ArtemisMBeanServerBuilder$MBeanInvocationHandler.invoke(ArtemisMBeanServerBuilder.java:96)
> > [artemis-server-2.20.0.jar:2.20.0]
> >         at com.sun.proxy.$Proxy17.invoke(Unknown Source)
> >         at
> > org.jolokia.handler.ExecHandler.doHandleRequest(ExecHandler.java:98)
> > [jolokia-core-1.7.0.jar:]
> >         at
> > org.jolokia.handler.ExecHandler.doHandleRequest(ExecHandler.java:40)
> > [jolokia-core-1.7.0.jar:]
> >         at
> >
> org.jolokia.handler.JsonRequestHandler.handleRequest(JsonRequestHandler.java:89)
> > [jolokia-core-1.7.0.jar:]
> >         at
> >
> org.jolokia.backend.MBeanServerExecutorLocal.handleRequest(MBeanServerExecutorLocal.java:109)
> > [jolokia-core-1.7.0.jar:]
> >         at
> >
> org.jolokia.backend.MBeanServerHandler.dispatchRequest(MBeanServerHandler.java:161)
> > [jolokia-core-1.7.0.jar:]
> >         at
> >
> org.jolokia.backend.LocalRequestDispatcher.dispatchRequest(LocalRequestDispatcher.java:99)
> > [jolokia-core-1.7.0.jar:]
> >         at
> >
> org.jolokia.backend.BackendManager.callRequestDispatcher(BackendManager.java:429)
> > [jolokia-core-1.7.0.jar:]
> >         at
> > org.jolokia.backend.BackendManager.handleRequest(BackendManager.java:158)
> > [jolokia-core-1.7.0.jar:]
> >         at
> >
> org.jolokia.http.HttpRequestHandler.executeRequest(HttpRequestHandler.java:197)
> > [jolokia-core-1.7.0.jar:]
> >         at
> >
> org.jolokia.http.HttpRequestHandler.handlePostRequest(HttpRequestHandler.java:137)
> > [jolokia-core-1.7.0.jar:]
> >         at
> > org.jolokia.http.AgentServlet$3.handleRequest(AgentServlet.java:493)
> > [jolokia-core-1.7.0.jar:]
> >         at
> > org.jolokia.http.AgentServlet.handleSecurely(AgentServlet.java:383)
> > [jolokia-core-1.7.0.jar:]
> >         at org.jolokia.http.AgentServlet.handle(AgentServlet.java:354)
> > [jolokia-core-1.7.0.jar:]
> >         at org.jolokia.http.AgentServlet.doPost(AgentServlet.java:317)
> > [jolokia-core-1.7.0.jar:]
> >         at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
> > [jetty-all-9.4.44.v20210927-uber.jar:9.4.44.v20210927]
> >         at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
> > [jetty-all-9.4.44.v20210927-uber.jar:9.4.44.v20210927]
> >         at
> >
> org.eclipse.jetty.servlet.ServletHolder$NotAsync.service(ServletHolder.java:1459)
> >         at
> > org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799)
> >         at
> >
> org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1631)
> >         at
> >
> io.hawt.web.filters.FlightRecordingDownloadFacade.doFilter(FlightRecordingDownloadFacade.java:68)
> > [hawtio-system-2.14.0.jar:2.14.0]
> >         at
> > org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
> >         at
> >
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
> >         at
> >
> io.hawt.web.auth.LoginRedirectFilter.doFilter(LoginRedirectFilter.java:63)
> > [hawtio-system-2.14.0.jar:2.14.0]
> >         at
> > org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
> >         at
> >
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
> >         at
> >
> io.hawt.web.auth.AuthenticationFilter.lambda$executeAs$1(AuthenticationFilter.java:105)
> > [hawtio-system-2.14.0.jar:2.14.0]
> >         at
> >
> io.hawt.web.auth.AuthenticationFilter$$Lambda$363/0x0000000000000000.run(Unknown
> > Source)
> >         at
> >
> java.base/java.security.AccessController.doPrivileged(AccessController.java:774)
> > [java.base:]
> >         at java.base/javax.security.auth.Subject.doAs(Subject.java:423)
> > [java.base:]
> >         at
> >
> io.hawt.web.auth.AuthenticationFilter.executeAs(AuthenticationFilter.java:104)
> > [hawtio-system-2.14.0.jar:2.14.0]
> >         at
> >
> io.hawt.web.auth.AuthenticationFilter.doFilter(AuthenticationFilter.java:72)
> > [hawtio-system-2.14.0.jar:2.14.0]
> >         at
> > org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
> >         at
> >
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
> >         at
> > io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43)
> > [hawtio-system-2.14.0.jar:2.14.0]
> >         at
> > org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
> >         at
> >
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
> >         at
> > io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43)
> > [hawtio-system-2.14.0.jar:2.14.0]
> >         at
> > org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
> >         at
> >
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
> >         at
> > io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43)
> > [hawtio-system-2.14.0.jar:2.14.0]
> >         at
> > org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
> >         at
> >
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
> >         at
> > io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43)
> > [hawtio-system-2.14.0.jar:2.14.0]
> >         at
> > org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
> >         at
> >
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
> >         at
> > io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43)
> > [hawtio-system-2.14.0.jar:2.14.0]
> >         at
> > org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
> >         at
> >
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
> >         at
> > io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43)
> > [hawtio-system-2.14.0.jar:2.14.0]
> >         at
> > org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
> >         at
> >
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
> >         at
> > io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43)
> > [hawtio-system-2.14.0.jar:2.14.0]
> >         at
> > org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
> >         at
> >
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
> >         at
> > io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43)
> > [hawtio-system-2.14.0.jar:2.14.0]
> >         at
> > org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
> >         at
> >
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
> >         at
> >
> io.hawt.web.auth.SessionExpiryFilter.process(SessionExpiryFilter.java:166)
> > [hawtio-system-2.14.0.jar:2.14.0]
> >         at
> >
> io.hawt.web.auth.SessionExpiryFilter.doFilter(SessionExpiryFilter.java:60)
> > [hawtio-system-2.14.0.jar:2.14.0]
> >         at
> > org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:201)
> >         at
> >
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
> >         at
> >
> org.apache.activemq.artemis.component.JolokiaFilter.doFilter(JolokiaFilter.java:50)
> > [artemis-web-2.20.0.jar:2.20.0]
> >         at
> > org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
> >         at
> >
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
> >         at
> >
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:548)
> >         at
> >
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
> >         at
> >
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:600)
> >         at
> >
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
> >         at
> >
> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
> >         at
> >
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)
> >         at
> >
> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
> >         at
> >
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1434)
> >         at
> >
> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
> >         at
> > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)
> >         at
> >
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)
> >         at
> >
> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
> >         at
> >
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1349)
> >         at
> >
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
> >         at
> > org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:59)
> >         at
> >
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
> >         at org.eclipse.jetty.server.Server.handle(Server.java:516)
> >         at
> >
> org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:400)
> >         at <unknown class>.dispatch(Unknown Source)
> >         at
> > org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:645)
> >         at
> > org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:392)
> >         at
> >
> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)
> >         at org.eclipse.jetty.io
> > .AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
> >         at org.eclipse.jetty.io
> > .FillInterest.fillable(FillInterest.java:105)
> >         at org.eclipse.jetty.io
> > .ChannelEndPoint$1.run(ChannelEndPoint.java:104)
> >         at
> >
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338)
> >         at
> >
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315)
> >         at
> >
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173)
> >         at
> >
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
> >         at
> >
> org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:409)
> >         at
> >
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)
> >         at
> >
> org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)
> >         at java.base/java.lang.Thread.run(Thread.java:866) [java.base:]
> >
> >
> >
> > Enviado do Email<https://go.microsoft.com/fwlink/?LinkId=550986> para
> > Windows
> >
> > ________________________________
> > De: Justin Bertram <jb...@apache.org>
> > Enviado: Thursday, February 24, 2022 5:26:50 PM
> > Para: users@activemq.apache.org <us...@activemq.apache.org>
> > Assunto: Re: ARTEMIS-3677 mitigate NPE when browsing messages
> >
> > I don't see anything problematic. Work up some kind of reproducible test
> > and I'll try to carve out some time to take a look.
> >
> >
> > Justin
> >
> > On Thu, Feb 24, 2022 at 2:23 PM Edson Richter <ed...@hotmail.com>
> > wrote:
> >
> > > Ok, I would need some help identifying Where is my fault. Please
> advise.
> > > I don鈥檛 see anything null in here:
> > >
> > >
> > > 2022-02-24 17:15:34,530 DEBUG
> > > [org.apache.activemq.artemis.core.protocol.stomp.StompConnection]
> STOMP(/
> > > 192.168.0.30:60724, f7986f29): IN << StompFrame[command=CONNECT,
> > > headers={accept-version=1.0,1.1,1.2, heart-beat=60000,60000,
> > > host=192.168.0.250, login=******, passcode=****}]
> > > 2022-02-24 17:15:34,532 DEBUG
> > > [org.apache.activemq.artemis.core.protocol.stomp.StompConnection]
> STOMP(/
> > > 192.168.0.30:60724, f7986f29):OUT >> StompFrame[command=CONNECTED,
> > > headers={version=1.2, session=f7986f29, server=ActiveMQ-Artemis/2.20.0
> > > ActiveMQ Artemis Messaging Engine, heart-beat=60000,60000}]
> > > 2022-02-24 17:15:34,535 DEBUG
> > > [org.apache.activemq.artemis.core.protocol.stomp.StompConnection]
> STOMP(/
> > > 192.168.0.30:60724, f7986f29): IN << StompFrame[command=SEND,
> > > headers={destination=dtrecvrech000049dev::dtrecvrech000049dev,
> > > content-type=application/json, persistent=true},
> > > body={"status":-5,"message":"O sistema Rech retornou um c贸digo de
> > resposta
> > > 401. A chave do CT-e 茅 .\nA mensagem do sistema 茅
> > > {\"status\":{\"code\":-1,\"message\":\"N茫o
> > autorizado\"}}","ctcChave":""},
> > > body-bytes=[123, 34, 115, 116, 97, 116, 117, 115, 34, 58, 45, 53, 44,
> 34,
> > > 109, 101, 115, 115, 97, 103, 101, 34, 58, 34, 79, 32, 115, 105, 115,
> 116,
> > > 101, 109, 97, 32, 82, 101, 99, 104, 32, 114, 101, 116, 111, 114, 110,
> > 111,
> > > 117, 32, 117, 109, 32, 99, -61, -77, 100, 105, 103, 111, 32, 100, 101,
> > 32,
> > > 114, 101, 115, 112, 111, 115, 116, 97, 32, 52, 48, 49, 46, 32, 65, 32,
> > 99,
> > > 104, 97, 118, 101, 32, 100, 111, 32, 67, 84, 45, 101, 32, -61, -87, 32,
> > 46,
> > > 92, 110, 65, 32, 109, 101, 110, 115, 97, 103, 101, 109, 32, 100, 111,
> 32,
> > > 115, 105, 115, 116, 101, 109, 97, 32, -61, -87, 32, 123, 92, 34, 115,
> > 116,
> > > 97, 116, 117, 115, 92, 34, 58, 123, 92, 34, 99, 111, 100, 101, 92, 34,
> > 58,
> > > 45, 49, 44, 92, 34, 109, 101, 115, 115, 97, 103, 101, 92, 34, 58, 92,
> 34,
> > > 78, -61, -93, 111, 32, 97, 117, 116, 111, 114, 105, 122, 97, 100, 111,
> > 92,
> > > 34, 125, 125, 34, 44, 34, 99, 116, 99, 67, 104, 97, 118, 101, 34, 58,
> 34,
> > > 34, 125], size=0]
> > > 2022-02-24 17:15:34,537 DEBUG
> > > [org.apache.activemq.artemis.core.protocol.stomp.StompConnection]
> STOMP(/
> > > 192.168.0.30:60724, f7986f29): IN << StompFrame[command=DISCONNECT,
> > > headers={receipt=5}]
> > > 2022-02-24 17:15:34,537 DEBUG
> > > [org.apache.activemq.artemis.core.protocol.stomp.StompConnection]
> STOMP(/
> > > 192.168.0.30:60724, f7986f29):OUT >> StompFrame[command=RECEIPT,
> > > headers={receipt-id=5}]
> > >
> > >
> > > Thanks once again 馃槉
> > >
> > > ER
> > >
> > >
> > > Enviado do Email<https://go.microsoft.com/fwlink/?LinkId=550986> para
> > > Windows
> > >
> > > De: Justin Bertram<ma...@apache.org>
> > > Enviado:quinta-feira, 24 de fevereiro de 2022 14:22
> > > Para: users@activemq.apache.org<ma...@activemq.apache.org>
> > > Assunto: Re: ARTEMIS-3677 mitigate NPE when browsing messages
> > >
> > > > Is there a way to log what ActiveMQ is receiving from my STOMP
> client?
> > >
> > > See this documentation [1].
> > >
> > >
> > > Justin
> > >
> > > [1]
> > >
> > >
> >
> https://activemq.apache.org/components/artemis/documentation/latest/stomp.html#logging
> > >
> > > On Thu, Feb 24, 2022 at 11:18 AM Edson Richter <
> edsonrichter@hotmail.com
> > >
> > > wrote:
> > >
> > > > Just one point... I鈥檓 not sending any null atributes; except the
> cause
> > is
> > > > that I鈥檓 not sending a unique identifier.
> > > > Is there a way to log what ActiveMQ is receiving from my STOMP
> client?
> > > >
> > > > Thanks,
> > > >
> > > > ER
> > > >
> > > > Enviado do Email<https://go.microsoft.com/fwlink/?LinkId=550986>
> para
> > > > Windows
> > > >
> > > > De: Justin Bertram<ma...@apache.org>
> > > > Enviado:quarta-feira, 23 de fevereiro de 2022 12:15
> > > > Para: users@activemq.apache.org<ma...@activemq.apache.org>
> > > > Assunto: Re: ARTEMIS-3677 mitigate NPE when browsing messages
> > > >
> > > > The next release of ActiveMQ Artemis will be 2.21.0. There is no
> 2.20.1
> > > > release planned. I expect 2.21.0 to be tagged and sent for a vote
> > before
> > > > the end of this quarter (i.e. March 31).
> > > >
> > > > In the mean-time you have a couple ways to mitigate the issue:
> > > >
> > > >   1) Don't send messages with a null property value.
> > > >   2) Build the current "main" branch using "mvn clean install
> -Prelease
> > > > -DskipTests" and then replace your broker's existing
> > > > lib/artemis-core-client-*.jar with the one put into
> > > >
> > > >
> > >
> >
> artemis-distribution/target/apache-artemis-2.21.0-SNAPSHOT-bin/apache-artemis-2.21.0-SNAPSHOT/lib/.
> > > >
> > > >
> > > > Justin
> > > >
> > > > On Wed, Feb 23, 2022 at 9:06 AM Edson Richter <
> > edsonrichter@hotmail.com>
> > > > wrote:
> > > >
> > > > > Hi!
> > > > >
> > > > > There is a plan to release a 2.20.1 version of Artemis? I鈥檓 plagued
> > by
> > > > > ARTEMIS-3677 mitigate NPE when browsing message which is already
> > fixed
> > > in
> > > > > source code.
> > > > > If there is a roadmap on planned future releases, I would look
> there,
> > > to
> > > > > not disturb the list 馃槉
> > > > >
> > > > > Thanks,
> > > > >
> > > > > Edson Richter
> > > > >
> > > > >
> > > > > Enviado do Email<https://go.microsoft.com/fwlink/?LinkId=550986>
> > para
> > > > > Windows
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
>

Re: ARTEMIS-3677 mitigate NPE when browsing messages

Posted by Justin Bertram <jb...@apache.org>.
I opened ARTEMIS-3696 [1] to deal with the null property values being set
on the STOMP messages by the broker.


Justin

[1] https://issues.apache.org/jira/browse/ARTEMIS-3696

On Thu, Feb 24, 2022 at 8:43 PM Edson Richter <ed...@hotmail.com>
wrote:

> Thanks for all your patience.
> I鈥檒l follow your recomendation, download the sources of 2.20.0 and patch
> it.
> I do believe it鈥檚 only necessary to replace the jar file that contains the
> offending class.
>
> Regards,
>
> ER.
>
>
> Enviado do Email<https://go.microsoft.com/fwlink/?LinkId=550986> para
> Windows
>
> ________________________________
> De: Justin Bertram <jb...@apache.org>
> Enviado: Thursday, February 24, 2022 11:25:23 PM
> Para: users@activemq.apache.org <us...@activemq.apache.org>
> Assunto: Re: ARTEMIS-3677 mitigate NPE when browsing messages
>
> The stack-trace indicates that the NPE is, in fact, being triggered by a
> property with a null value. However, it's almost certainly a property that
> the broker itself is adding. Therefore the only mitigation until 2.21.0 is
> released is to patch the broker yourself.
>
>
> Justin
>
> On Thu, Feb 24, 2022 at 2:52 PM Edson Richter <ed...@hotmail.com>
> wrote:
>
> > It鈥檚 quite similar to examples found in documentation here: stomp/main.go
> > at master 路 go-stomp/stomp (github.com)<
> >
> https://github.com/go-stomp/stomp/blob/master/examples/client_test/main.go
> > >.
> >
> > The difference from the example above is that I鈥檓 using application/json
> > and sending a json string instead plain string.
> >
> >
> > Queues in broker.xml are declared as:
> >
> >       <address name="dtsendrech000049dev"><anycast><queue
> > name="dtsendrech000049dev"></queue></anycast></address>
> >       <address name="dtrecvrech000049dev"><anycast><queue
> > name="dtrecvrech000049dev"></queue></anycast></address>
> >
> > I鈥檓 connecting to tcp://192.168.0.70:61616 (which, for it鈥檚 turn,
> detects
> > Stomp protocol).
> >
> >
> > The stacktrace helps?
> >
> > 2022-02-24 17:44:40,710 WARN
> > [org.apache.activemq.artemis.core.management.impl.QueueControlImpl] null:
> > java.lang.NullPointerException
> >         at
> > org.apache.activemq.artemis.api.core.JsonUtil.truncate(JsonUtil.java:339)
> > [artemis-core-client-2.20.0.jar:2.20.0]
> >         at
> >
> org.apache.activemq.artemis.api.core.Message.toPropertyMap(Message.java:768)
> > [artemis-core-client-2.20.0.jar:2.20.0]
> >         at
> >
> org.apache.activemq.artemis.core.message.openmbean.MessageOpenTypeFactory.expandProperties(MessageOpenTypeFactory.java:168)
> > [artemis-core-client-2.20.0.jar:2.20.0]
> >         at
> >
> org.apache.activemq.artemis.core.message.openmbean.MessageOpenTypeFactory.getFields(MessageOpenTypeFactory.java:146)
> > [artemis-core-client-2.20.0.jar:2.20.0]
> >         at
> >
> org.apache.activemq.artemis.core.message.impl.CoreMessage$TextMessageOpenTypeFactory.getFields(CoreMessage.java:1406)
> > [artemis-core-client-2.20.0.jar:2.20.0]
> >         at
> >
> org.apache.activemq.artemis.core.message.impl.CoreMessage$TextMessageOpenTypeFactory.getFields(CoreMessage.java:1397)
> > [artemis-core-client-2.20.0.jar:2.20.0]
> >         at
> >
> org.apache.activemq.artemis.core.message.impl.CoreMessage.toCompositeData(CoreMessage.java:1354)
> > [artemis-core-client-2.20.0.jar:2.20.0]
> >         at
> >
> org.apache.activemq.artemis.core.management.impl.QueueControlImpl.browse(QueueControlImpl.java:1583)
> > [artemis-server-2.20.0.jar:2.20.0]
> >         at
> > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
> > Method) [java.base:]
> >         at
> >
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> > [java.base:]
> >         at
> >
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> > [java.base:]
> >         at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> > [java.base:]
> >         at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71)
> > [java.base:]
> >         at jdk.internal.reflect.GeneratedMethodAccessor12.invoke(Unknown
> > Source)
> >         at
> >
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> > [java.base:]
> >         at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> > [java.base:]
> >         at
> > java.base/sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:260)
> > [java.base:]
> >         at
> >
> java.management/com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:112)
> > [java.management:]
> >         at
> >
> java.management/com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:46)
> > [java.management:]
> >         at
> >
> java.management/com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237)
> > [java.management:]
> >         at
> >
> java.management/com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138)
> > [java.management:]
> >         at
> >
> java.management/com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:252)
> > [java.management:]
> >         at
> >
> java.management/javax.management.StandardMBean.invoke(StandardMBean.java:405)
> > [java.management:]
> >         at
> >
> java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:809)
> > [java.management:]
> >         at
> >
> java.management/com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
> > [java.management:]
> >         at jdk.internal.reflect.GeneratedMethodAccessor13.invoke(Unknown
> > Source)
> >         at
> >
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> > [java.base:]
> >         at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> > [java.base:]
> >         at
> >
> org.apache.activemq.artemis.core.server.management.ArtemisMBeanServerBuilder$MBeanInvocationHandler.invoke(ArtemisMBeanServerBuilder.java:96)
> > [artemis-server-2.20.0.jar:2.20.0]
> >         at com.sun.proxy.$Proxy17.invoke(Unknown Source)
> >         at
> > org.jolokia.handler.ExecHandler.doHandleRequest(ExecHandler.java:98)
> > [jolokia-core-1.7.0.jar:]
> >         at
> > org.jolokia.handler.ExecHandler.doHandleRequest(ExecHandler.java:40)
> > [jolokia-core-1.7.0.jar:]
> >         at
> >
> org.jolokia.handler.JsonRequestHandler.handleRequest(JsonRequestHandler.java:89)
> > [jolokia-core-1.7.0.jar:]
> >         at
> >
> org.jolokia.backend.MBeanServerExecutorLocal.handleRequest(MBeanServerExecutorLocal.java:109)
> > [jolokia-core-1.7.0.jar:]
> >         at
> >
> org.jolokia.backend.MBeanServerHandler.dispatchRequest(MBeanServerHandler.java:161)
> > [jolokia-core-1.7.0.jar:]
> >         at
> >
> org.jolokia.backend.LocalRequestDispatcher.dispatchRequest(LocalRequestDispatcher.java:99)
> > [jolokia-core-1.7.0.jar:]
> >         at
> >
> org.jolokia.backend.BackendManager.callRequestDispatcher(BackendManager.java:429)
> > [jolokia-core-1.7.0.jar:]
> >         at
> > org.jolokia.backend.BackendManager.handleRequest(BackendManager.java:158)
> > [jolokia-core-1.7.0.jar:]
> >         at
> >
> org.jolokia.http.HttpRequestHandler.executeRequest(HttpRequestHandler.java:197)
> > [jolokia-core-1.7.0.jar:]
> >         at
> >
> org.jolokia.http.HttpRequestHandler.handlePostRequest(HttpRequestHandler.java:137)
> > [jolokia-core-1.7.0.jar:]
> >         at
> > org.jolokia.http.AgentServlet$3.handleRequest(AgentServlet.java:493)
> > [jolokia-core-1.7.0.jar:]
> >         at
> > org.jolokia.http.AgentServlet.handleSecurely(AgentServlet.java:383)
> > [jolokia-core-1.7.0.jar:]
> >         at org.jolokia.http.AgentServlet.handle(AgentServlet.java:354)
> > [jolokia-core-1.7.0.jar:]
> >         at org.jolokia.http.AgentServlet.doPost(AgentServlet.java:317)
> > [jolokia-core-1.7.0.jar:]
> >         at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
> > [jetty-all-9.4.44.v20210927-uber.jar:9.4.44.v20210927]
> >         at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
> > [jetty-all-9.4.44.v20210927-uber.jar:9.4.44.v20210927]
> >         at
> >
> org.eclipse.jetty.servlet.ServletHolder$NotAsync.service(ServletHolder.java:1459)
> >         at
> > org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799)
> >         at
> >
> org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1631)
> >         at
> >
> io.hawt.web.filters.FlightRecordingDownloadFacade.doFilter(FlightRecordingDownloadFacade.java:68)
> > [hawtio-system-2.14.0.jar:2.14.0]
> >         at
> > org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
> >         at
> >
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
> >         at
> >
> io.hawt.web.auth.LoginRedirectFilter.doFilter(LoginRedirectFilter.java:63)
> > [hawtio-system-2.14.0.jar:2.14.0]
> >         at
> > org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
> >         at
> >
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
> >         at
> >
> io.hawt.web.auth.AuthenticationFilter.lambda$executeAs$1(AuthenticationFilter.java:105)
> > [hawtio-system-2.14.0.jar:2.14.0]
> >         at
> >
> io.hawt.web.auth.AuthenticationFilter$$Lambda$363/0x0000000000000000.run(Unknown
> > Source)
> >         at
> >
> java.base/java.security.AccessController.doPrivileged(AccessController.java:774)
> > [java.base:]
> >         at java.base/javax.security.auth.Subject.doAs(Subject.java:423)
> > [java.base:]
> >         at
> >
> io.hawt.web.auth.AuthenticationFilter.executeAs(AuthenticationFilter.java:104)
> > [hawtio-system-2.14.0.jar:2.14.0]
> >         at
> >
> io.hawt.web.auth.AuthenticationFilter.doFilter(AuthenticationFilter.java:72)
> > [hawtio-system-2.14.0.jar:2.14.0]
> >         at
> > org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
> >         at
> >
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
> >         at
> > io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43)
> > [hawtio-system-2.14.0.jar:2.14.0]
> >         at
> > org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
> >         at
> >
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
> >         at
> > io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43)
> > [hawtio-system-2.14.0.jar:2.14.0]
> >         at
> > org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
> >         at
> >
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
> >         at
> > io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43)
> > [hawtio-system-2.14.0.jar:2.14.0]
> >         at
> > org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
> >         at
> >
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
> >         at
> > io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43)
> > [hawtio-system-2.14.0.jar:2.14.0]
> >         at
> > org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
> >         at
> >
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
> >         at
> > io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43)
> > [hawtio-system-2.14.0.jar:2.14.0]
> >         at
> > org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
> >         at
> >
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
> >         at
> > io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43)
> > [hawtio-system-2.14.0.jar:2.14.0]
> >         at
> > org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
> >         at
> >
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
> >         at
> > io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43)
> > [hawtio-system-2.14.0.jar:2.14.0]
> >         at
> > org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
> >         at
> >
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
> >         at
> > io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43)
> > [hawtio-system-2.14.0.jar:2.14.0]
> >         at
> > org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
> >         at
> >
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
> >         at
> >
> io.hawt.web.auth.SessionExpiryFilter.process(SessionExpiryFilter.java:166)
> > [hawtio-system-2.14.0.jar:2.14.0]
> >         at
> >
> io.hawt.web.auth.SessionExpiryFilter.doFilter(SessionExpiryFilter.java:60)
> > [hawtio-system-2.14.0.jar:2.14.0]
> >         at
> > org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:201)
> >         at
> >
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
> >         at
> >
> org.apache.activemq.artemis.component.JolokiaFilter.doFilter(JolokiaFilter.java:50)
> > [artemis-web-2.20.0.jar:2.20.0]
> >         at
> > org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
> >         at
> >
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
> >         at
> >
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:548)
> >         at
> >
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
> >         at
> >
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:600)
> >         at
> >
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
> >         at
> >
> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
> >         at
> >
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)
> >         at
> >
> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
> >         at
> >
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1434)
> >         at
> >
> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
> >         at
> > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)
> >         at
> >
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)
> >         at
> >
> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
> >         at
> >
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1349)
> >         at
> >
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
> >         at
> > org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:59)
> >         at
> >
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
> >         at org.eclipse.jetty.server.Server.handle(Server.java:516)
> >         at
> >
> org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:400)
> >         at <unknown class>.dispatch(Unknown Source)
> >         at
> > org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:645)
> >         at
> > org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:392)
> >         at
> >
> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)
> >         at org.eclipse.jetty.io
> > .AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
> >         at org.eclipse.jetty.io
> > .FillInterest.fillable(FillInterest.java:105)
> >         at org.eclipse.jetty.io
> > .ChannelEndPoint$1.run(ChannelEndPoint.java:104)
> >         at
> >
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338)
> >         at
> >
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315)
> >         at
> >
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173)
> >         at
> >
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
> >         at
> >
> org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:409)
> >         at
> >
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)
> >         at
> >
> org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)
> >         at java.base/java.lang.Thread.run(Thread.java:866) [java.base:]
> >
> >
> >
> > Enviado do Email<https://go.microsoft.com/fwlink/?LinkId=550986> para
> > Windows
> >
> > ________________________________
> > De: Justin Bertram <jb...@apache.org>
> > Enviado: Thursday, February 24, 2022 5:26:50 PM
> > Para: users@activemq.apache.org <us...@activemq.apache.org>
> > Assunto: Re: ARTEMIS-3677 mitigate NPE when browsing messages
> >
> > I don't see anything problematic. Work up some kind of reproducible test
> > and I'll try to carve out some time to take a look.
> >
> >
> > Justin
> >
> > On Thu, Feb 24, 2022 at 2:23 PM Edson Richter <ed...@hotmail.com>
> > wrote:
> >
> > > Ok, I would need some help identifying Where is my fault. Please
> advise.
> > > I don鈥檛 see anything null in here:
> > >
> > >
> > > 2022-02-24 17:15:34,530 DEBUG
> > > [org.apache.activemq.artemis.core.protocol.stomp.StompConnection]
> STOMP(/
> > > 192.168.0.30:60724, f7986f29): IN << StompFrame[command=CONNECT,
> > > headers={accept-version=1.0,1.1,1.2, heart-beat=60000,60000,
> > > host=192.168.0.250, login=******, passcode=****}]
> > > 2022-02-24 17:15:34,532 DEBUG
> > > [org.apache.activemq.artemis.core.protocol.stomp.StompConnection]
> STOMP(/
> > > 192.168.0.30:60724, f7986f29):OUT >> StompFrame[command=CONNECTED,
> > > headers={version=1.2, session=f7986f29, server=ActiveMQ-Artemis/2.20.0
> > > ActiveMQ Artemis Messaging Engine, heart-beat=60000,60000}]
> > > 2022-02-24 17:15:34,535 DEBUG
> > > [org.apache.activemq.artemis.core.protocol.stomp.StompConnection]
> STOMP(/
> > > 192.168.0.30:60724, f7986f29): IN << StompFrame[command=SEND,
> > > headers={destination=dtrecvrech000049dev::dtrecvrech000049dev,
> > > content-type=application/json, persistent=true},
> > > body={"status":-5,"message":"O sistema Rech retornou um c贸digo de
> > resposta
> > > 401. A chave do CT-e 茅 .\nA mensagem do sistema 茅
> > > {\"status\":{\"code\":-1,\"message\":\"N茫o
> > autorizado\"}}","ctcChave":""},
> > > body-bytes=[123, 34, 115, 116, 97, 116, 117, 115, 34, 58, 45, 53, 44,
> 34,
> > > 109, 101, 115, 115, 97, 103, 101, 34, 58, 34, 79, 32, 115, 105, 115,
> 116,
> > > 101, 109, 97, 32, 82, 101, 99, 104, 32, 114, 101, 116, 111, 114, 110,
> > 111,
> > > 117, 32, 117, 109, 32, 99, -61, -77, 100, 105, 103, 111, 32, 100, 101,
> > 32,
> > > 114, 101, 115, 112, 111, 115, 116, 97, 32, 52, 48, 49, 46, 32, 65, 32,
> > 99,
> > > 104, 97, 118, 101, 32, 100, 111, 32, 67, 84, 45, 101, 32, -61, -87, 32,
> > 46,
> > > 92, 110, 65, 32, 109, 101, 110, 115, 97, 103, 101, 109, 32, 100, 111,
> 32,
> > > 115, 105, 115, 116, 101, 109, 97, 32, -61, -87, 32, 123, 92, 34, 115,
> > 116,
> > > 97, 116, 117, 115, 92, 34, 58, 123, 92, 34, 99, 111, 100, 101, 92, 34,
> > 58,
> > > 45, 49, 44, 92, 34, 109, 101, 115, 115, 97, 103, 101, 92, 34, 58, 92,
> 34,
> > > 78, -61, -93, 111, 32, 97, 117, 116, 111, 114, 105, 122, 97, 100, 111,
> > 92,
> > > 34, 125, 125, 34, 44, 34, 99, 116, 99, 67, 104, 97, 118, 101, 34, 58,
> 34,
> > > 34, 125], size=0]
> > > 2022-02-24 17:15:34,537 DEBUG
> > > [org.apache.activemq.artemis.core.protocol.stomp.StompConnection]
> STOMP(/
> > > 192.168.0.30:60724, f7986f29): IN << StompFrame[command=DISCONNECT,
> > > headers={receipt=5}]
> > > 2022-02-24 17:15:34,537 DEBUG
> > > [org.apache.activemq.artemis.core.protocol.stomp.StompConnection]
> STOMP(/
> > > 192.168.0.30:60724, f7986f29):OUT >> StompFrame[command=RECEIPT,
> > > headers={receipt-id=5}]
> > >
> > >
> > > Thanks once again 馃槉
> > >
> > > ER
> > >
> > >
> > > Enviado do Email<https://go.microsoft.com/fwlink/?LinkId=550986> para
> > > Windows
> > >
> > > De: Justin Bertram<ma...@apache.org>
> > > Enviado:quinta-feira, 24 de fevereiro de 2022 14:22
> > > Para: users@activemq.apache.org<ma...@activemq.apache.org>
> > > Assunto: Re: ARTEMIS-3677 mitigate NPE when browsing messages
> > >
> > > > Is there a way to log what ActiveMQ is receiving from my STOMP
> client?
> > >
> > > See this documentation [1].
> > >
> > >
> > > Justin
> > >
> > > [1]
> > >
> > >
> >
> https://activemq.apache.org/components/artemis/documentation/latest/stomp.html#logging
> > >
> > > On Thu, Feb 24, 2022 at 11:18 AM Edson Richter <
> edsonrichter@hotmail.com
> > >
> > > wrote:
> > >
> > > > Just one point... I鈥檓 not sending any null atributes; except the
> cause
> > is
> > > > that I鈥檓 not sending a unique identifier.
> > > > Is there a way to log what ActiveMQ is receiving from my STOMP
> client?
> > > >
> > > > Thanks,
> > > >
> > > > ER
> > > >
> > > > Enviado do Email<https://go.microsoft.com/fwlink/?LinkId=550986>
> para
> > > > Windows
> > > >
> > > > De: Justin Bertram<ma...@apache.org>
> > > > Enviado:quarta-feira, 23 de fevereiro de 2022 12:15
> > > > Para: users@activemq.apache.org<ma...@activemq.apache.org>
> > > > Assunto: Re: ARTEMIS-3677 mitigate NPE when browsing messages
> > > >
> > > > The next release of ActiveMQ Artemis will be 2.21.0. There is no
> 2.20.1
> > > > release planned. I expect 2.21.0 to be tagged and sent for a vote
> > before
> > > > the end of this quarter (i.e. March 31).
> > > >
> > > > In the mean-time you have a couple ways to mitigate the issue:
> > > >
> > > >   1) Don't send messages with a null property value.
> > > >   2) Build the current "main" branch using "mvn clean install
> -Prelease
> > > > -DskipTests" and then replace your broker's existing
> > > > lib/artemis-core-client-*.jar with the one put into
> > > >
> > > >
> > >
> >
> artemis-distribution/target/apache-artemis-2.21.0-SNAPSHOT-bin/apache-artemis-2.21.0-SNAPSHOT/lib/.
> > > >
> > > >
> > > > Justin
> > > >
> > > > On Wed, Feb 23, 2022 at 9:06 AM Edson Richter <
> > edsonrichter@hotmail.com>
> > > > wrote:
> > > >
> > > > > Hi!
> > > > >
> > > > > There is a plan to release a 2.20.1 version of Artemis? I鈥檓 plagued
> > by
> > > > > ARTEMIS-3677 mitigate NPE when browsing message which is already
> > fixed
> > > in
> > > > > source code.
> > > > > If there is a roadmap on planned future releases, I would look
> there,
> > > to
> > > > > not disturb the list 馃槉
> > > > >
> > > > > Thanks,
> > > > >
> > > > > Edson Richter
> > > > >
> > > > >
> > > > > Enviado do Email<https://go.microsoft.com/fwlink/?LinkId=550986>
> > para
> > > > > Windows
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
>

RES: ARTEMIS-3677 mitigate NPE when browsing messages

Posted by Edson Richter <ed...@hotmail.com>.
Thanks for all your patience.
I鈥檒l follow your recomendation, download the sources of 2.20.0 and patch it.
I do believe it鈥檚 only necessary to replace the jar file that contains the offending class.

Regards,

ER.


Enviado do Email<https://go.microsoft.com/fwlink/?LinkId=550986> para Windows

________________________________
De: Justin Bertram <jb...@apache.org>
Enviado: Thursday, February 24, 2022 11:25:23 PM
Para: users@activemq.apache.org <us...@activemq.apache.org>
Assunto: Re: ARTEMIS-3677 mitigate NPE when browsing messages

The stack-trace indicates that the NPE is, in fact, being triggered by a
property with a null value. However, it's almost certainly a property that
the broker itself is adding. Therefore the only mitigation until 2.21.0 is
released is to patch the broker yourself.


Justin

On Thu, Feb 24, 2022 at 2:52 PM Edson Richter <ed...@hotmail.com>
wrote:

> It鈥檚 quite similar to examples found in documentation here: stomp/main.go
> at master 路 go-stomp/stomp (github.com)<
> https://github.com/go-stomp/stomp/blob/master/examples/client_test/main.go
> >.
>
> The difference from the example above is that I鈥檓 using application/json
> and sending a json string instead plain string.
>
>
> Queues in broker.xml are declared as:
>
>       <address name="dtsendrech000049dev"><anycast><queue
> name="dtsendrech000049dev"></queue></anycast></address>
>       <address name="dtrecvrech000049dev"><anycast><queue
> name="dtrecvrech000049dev"></queue></anycast></address>
>
> I鈥檓 connecting to tcp://192.168.0.70:61616 (which, for it鈥檚 turn, detects
> Stomp protocol).
>
>
> The stacktrace helps?
>
> 2022-02-24 17:44:40,710 WARN
> [org.apache.activemq.artemis.core.management.impl.QueueControlImpl] null:
> java.lang.NullPointerException
>         at
> org.apache.activemq.artemis.api.core.JsonUtil.truncate(JsonUtil.java:339)
> [artemis-core-client-2.20.0.jar:2.20.0]
>         at
> org.apache.activemq.artemis.api.core.Message.toPropertyMap(Message.java:768)
> [artemis-core-client-2.20.0.jar:2.20.0]
>         at
> org.apache.activemq.artemis.core.message.openmbean.MessageOpenTypeFactory.expandProperties(MessageOpenTypeFactory.java:168)
> [artemis-core-client-2.20.0.jar:2.20.0]
>         at
> org.apache.activemq.artemis.core.message.openmbean.MessageOpenTypeFactory.getFields(MessageOpenTypeFactory.java:146)
> [artemis-core-client-2.20.0.jar:2.20.0]
>         at
> org.apache.activemq.artemis.core.message.impl.CoreMessage$TextMessageOpenTypeFactory.getFields(CoreMessage.java:1406)
> [artemis-core-client-2.20.0.jar:2.20.0]
>         at
> org.apache.activemq.artemis.core.message.impl.CoreMessage$TextMessageOpenTypeFactory.getFields(CoreMessage.java:1397)
> [artemis-core-client-2.20.0.jar:2.20.0]
>         at
> org.apache.activemq.artemis.core.message.impl.CoreMessage.toCompositeData(CoreMessage.java:1354)
> [artemis-core-client-2.20.0.jar:2.20.0]
>         at
> org.apache.activemq.artemis.core.management.impl.QueueControlImpl.browse(QueueControlImpl.java:1583)
> [artemis-server-2.20.0.jar:2.20.0]
>         at
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method) [java.base:]
>         at
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> [java.base:]
>         at
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> [java.base:]
>         at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> [java.base:]
>         at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71)
> [java.base:]
>         at jdk.internal.reflect.GeneratedMethodAccessor12.invoke(Unknown
> Source)
>         at
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> [java.base:]
>         at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> [java.base:]
>         at
> java.base/sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:260)
> [java.base:]
>         at
> java.management/com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:112)
> [java.management:]
>         at
> java.management/com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:46)
> [java.management:]
>         at
> java.management/com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237)
> [java.management:]
>         at
> java.management/com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138)
> [java.management:]
>         at
> java.management/com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:252)
> [java.management:]
>         at
> java.management/javax.management.StandardMBean.invoke(StandardMBean.java:405)
> [java.management:]
>         at
> java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:809)
> [java.management:]
>         at
> java.management/com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
> [java.management:]
>         at jdk.internal.reflect.GeneratedMethodAccessor13.invoke(Unknown
> Source)
>         at
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> [java.base:]
>         at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> [java.base:]
>         at
> org.apache.activemq.artemis.core.server.management.ArtemisMBeanServerBuilder$MBeanInvocationHandler.invoke(ArtemisMBeanServerBuilder.java:96)
> [artemis-server-2.20.0.jar:2.20.0]
>         at com.sun.proxy.$Proxy17.invoke(Unknown Source)
>         at
> org.jolokia.handler.ExecHandler.doHandleRequest(ExecHandler.java:98)
> [jolokia-core-1.7.0.jar:]
>         at
> org.jolokia.handler.ExecHandler.doHandleRequest(ExecHandler.java:40)
> [jolokia-core-1.7.0.jar:]
>         at
> org.jolokia.handler.JsonRequestHandler.handleRequest(JsonRequestHandler.java:89)
> [jolokia-core-1.7.0.jar:]
>         at
> org.jolokia.backend.MBeanServerExecutorLocal.handleRequest(MBeanServerExecutorLocal.java:109)
> [jolokia-core-1.7.0.jar:]
>         at
> org.jolokia.backend.MBeanServerHandler.dispatchRequest(MBeanServerHandler.java:161)
> [jolokia-core-1.7.0.jar:]
>         at
> org.jolokia.backend.LocalRequestDispatcher.dispatchRequest(LocalRequestDispatcher.java:99)
> [jolokia-core-1.7.0.jar:]
>         at
> org.jolokia.backend.BackendManager.callRequestDispatcher(BackendManager.java:429)
> [jolokia-core-1.7.0.jar:]
>         at
> org.jolokia.backend.BackendManager.handleRequest(BackendManager.java:158)
> [jolokia-core-1.7.0.jar:]
>         at
> org.jolokia.http.HttpRequestHandler.executeRequest(HttpRequestHandler.java:197)
> [jolokia-core-1.7.0.jar:]
>         at
> org.jolokia.http.HttpRequestHandler.handlePostRequest(HttpRequestHandler.java:137)
> [jolokia-core-1.7.0.jar:]
>         at
> org.jolokia.http.AgentServlet$3.handleRequest(AgentServlet.java:493)
> [jolokia-core-1.7.0.jar:]
>         at
> org.jolokia.http.AgentServlet.handleSecurely(AgentServlet.java:383)
> [jolokia-core-1.7.0.jar:]
>         at org.jolokia.http.AgentServlet.handle(AgentServlet.java:354)
> [jolokia-core-1.7.0.jar:]
>         at org.jolokia.http.AgentServlet.doPost(AgentServlet.java:317)
> [jolokia-core-1.7.0.jar:]
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
> [jetty-all-9.4.44.v20210927-uber.jar:9.4.44.v20210927]
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
> [jetty-all-9.4.44.v20210927-uber.jar:9.4.44.v20210927]
>         at
> org.eclipse.jetty.servlet.ServletHolder$NotAsync.service(ServletHolder.java:1459)
>         at
> org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799)
>         at
> org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1631)
>         at
> io.hawt.web.filters.FlightRecordingDownloadFacade.doFilter(FlightRecordingDownloadFacade.java:68)
> [hawtio-system-2.14.0.jar:2.14.0]
>         at
> org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
>         at
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
>         at
> io.hawt.web.auth.LoginRedirectFilter.doFilter(LoginRedirectFilter.java:63)
> [hawtio-system-2.14.0.jar:2.14.0]
>         at
> org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
>         at
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
>         at
> io.hawt.web.auth.AuthenticationFilter.lambda$executeAs$1(AuthenticationFilter.java:105)
> [hawtio-system-2.14.0.jar:2.14.0]
>         at
> io.hawt.web.auth.AuthenticationFilter$$Lambda$363/0x0000000000000000.run(Unknown
> Source)
>         at
> java.base/java.security.AccessController.doPrivileged(AccessController.java:774)
> [java.base:]
>         at java.base/javax.security.auth.Subject.doAs(Subject.java:423)
> [java.base:]
>         at
> io.hawt.web.auth.AuthenticationFilter.executeAs(AuthenticationFilter.java:104)
> [hawtio-system-2.14.0.jar:2.14.0]
>         at
> io.hawt.web.auth.AuthenticationFilter.doFilter(AuthenticationFilter.java:72)
> [hawtio-system-2.14.0.jar:2.14.0]
>         at
> org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
>         at
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
>         at
> io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43)
> [hawtio-system-2.14.0.jar:2.14.0]
>         at
> org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
>         at
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
>         at
> io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43)
> [hawtio-system-2.14.0.jar:2.14.0]
>         at
> org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
>         at
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
>         at
> io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43)
> [hawtio-system-2.14.0.jar:2.14.0]
>         at
> org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
>         at
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
>         at
> io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43)
> [hawtio-system-2.14.0.jar:2.14.0]
>         at
> org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
>         at
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
>         at
> io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43)
> [hawtio-system-2.14.0.jar:2.14.0]
>         at
> org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
>         at
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
>         at
> io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43)
> [hawtio-system-2.14.0.jar:2.14.0]
>         at
> org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
>         at
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
>         at
> io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43)
> [hawtio-system-2.14.0.jar:2.14.0]
>         at
> org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
>         at
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
>         at
> io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43)
> [hawtio-system-2.14.0.jar:2.14.0]
>         at
> org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
>         at
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
>         at
> io.hawt.web.auth.SessionExpiryFilter.process(SessionExpiryFilter.java:166)
> [hawtio-system-2.14.0.jar:2.14.0]
>         at
> io.hawt.web.auth.SessionExpiryFilter.doFilter(SessionExpiryFilter.java:60)
> [hawtio-system-2.14.0.jar:2.14.0]
>         at
> org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:201)
>         at
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
>         at
> org.apache.activemq.artemis.component.JolokiaFilter.doFilter(JolokiaFilter.java:50)
> [artemis-web-2.20.0.jar:2.20.0]
>         at
> org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
>         at
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
>         at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:548)
>         at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
>         at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:600)
>         at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
>         at
> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
>         at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)
>         at
> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
>         at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1434)
>         at
> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
>         at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)
>         at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)
>         at
> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
>         at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1349)
>         at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
>         at
> org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:59)
>         at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
>         at org.eclipse.jetty.server.Server.handle(Server.java:516)
>         at
> org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:400)
>         at <unknown class>.dispatch(Unknown Source)
>         at
> org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:645)
>         at
> org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:392)
>         at
> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)
>         at org.eclipse.jetty.io
> .AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
>         at org.eclipse.jetty.io
> .FillInterest.fillable(FillInterest.java:105)
>         at org.eclipse.jetty.io
> .ChannelEndPoint$1.run(ChannelEndPoint.java:104)
>         at
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338)
>         at
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315)
>         at
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173)
>         at
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
>         at
> org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:409)
>         at
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)
>         at
> org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)
>         at java.base/java.lang.Thread.run(Thread.java:866) [java.base:]
>
>
>
> Enviado do Email<https://go.microsoft.com/fwlink/?LinkId=550986> para
> Windows
>
> ________________________________
> De: Justin Bertram <jb...@apache.org>
> Enviado: Thursday, February 24, 2022 5:26:50 PM
> Para: users@activemq.apache.org <us...@activemq.apache.org>
> Assunto: Re: ARTEMIS-3677 mitigate NPE when browsing messages
>
> I don't see anything problematic. Work up some kind of reproducible test
> and I'll try to carve out some time to take a look.
>
>
> Justin
>
> On Thu, Feb 24, 2022 at 2:23 PM Edson Richter <ed...@hotmail.com>
> wrote:
>
> > Ok, I would need some help identifying Where is my fault. Please advise.
> > I don鈥檛 see anything null in here:
> >
> >
> > 2022-02-24 17:15:34,530 DEBUG
> > [org.apache.activemq.artemis.core.protocol.stomp.StompConnection] STOMP(/
> > 192.168.0.30:60724, f7986f29): IN << StompFrame[command=CONNECT,
> > headers={accept-version=1.0,1.1,1.2, heart-beat=60000,60000,
> > host=192.168.0.250, login=******, passcode=****}]
> > 2022-02-24 17:15:34,532 DEBUG
> > [org.apache.activemq.artemis.core.protocol.stomp.StompConnection] STOMP(/
> > 192.168.0.30:60724, f7986f29):OUT >> StompFrame[command=CONNECTED,
> > headers={version=1.2, session=f7986f29, server=ActiveMQ-Artemis/2.20.0
> > ActiveMQ Artemis Messaging Engine, heart-beat=60000,60000}]
> > 2022-02-24 17:15:34,535 DEBUG
> > [org.apache.activemq.artemis.core.protocol.stomp.StompConnection] STOMP(/
> > 192.168.0.30:60724, f7986f29): IN << StompFrame[command=SEND,
> > headers={destination=dtrecvrech000049dev::dtrecvrech000049dev,
> > content-type=application/json, persistent=true},
> > body={"status":-5,"message":"O sistema Rech retornou um c贸digo de
> resposta
> > 401. A chave do CT-e 茅 .\nA mensagem do sistema 茅
> > {\"status\":{\"code\":-1,\"message\":\"N茫o
> autorizado\"}}","ctcChave":""},
> > body-bytes=[123, 34, 115, 116, 97, 116, 117, 115, 34, 58, 45, 53, 44, 34,
> > 109, 101, 115, 115, 97, 103, 101, 34, 58, 34, 79, 32, 115, 105, 115, 116,
> > 101, 109, 97, 32, 82, 101, 99, 104, 32, 114, 101, 116, 111, 114, 110,
> 111,
> > 117, 32, 117, 109, 32, 99, -61, -77, 100, 105, 103, 111, 32, 100, 101,
> 32,
> > 114, 101, 115, 112, 111, 115, 116, 97, 32, 52, 48, 49, 46, 32, 65, 32,
> 99,
> > 104, 97, 118, 101, 32, 100, 111, 32, 67, 84, 45, 101, 32, -61, -87, 32,
> 46,
> > 92, 110, 65, 32, 109, 101, 110, 115, 97, 103, 101, 109, 32, 100, 111, 32,
> > 115, 105, 115, 116, 101, 109, 97, 32, -61, -87, 32, 123, 92, 34, 115,
> 116,
> > 97, 116, 117, 115, 92, 34, 58, 123, 92, 34, 99, 111, 100, 101, 92, 34,
> 58,
> > 45, 49, 44, 92, 34, 109, 101, 115, 115, 97, 103, 101, 92, 34, 58, 92, 34,
> > 78, -61, -93, 111, 32, 97, 117, 116, 111, 114, 105, 122, 97, 100, 111,
> 92,
> > 34, 125, 125, 34, 44, 34, 99, 116, 99, 67, 104, 97, 118, 101, 34, 58, 34,
> > 34, 125], size=0]
> > 2022-02-24 17:15:34,537 DEBUG
> > [org.apache.activemq.artemis.core.protocol.stomp.StompConnection] STOMP(/
> > 192.168.0.30:60724, f7986f29): IN << StompFrame[command=DISCONNECT,
> > headers={receipt=5}]
> > 2022-02-24 17:15:34,537 DEBUG
> > [org.apache.activemq.artemis.core.protocol.stomp.StompConnection] STOMP(/
> > 192.168.0.30:60724, f7986f29):OUT >> StompFrame[command=RECEIPT,
> > headers={receipt-id=5}]
> >
> >
> > Thanks once again 馃槉
> >
> > ER
> >
> >
> > Enviado do Email<https://go.microsoft.com/fwlink/?LinkId=550986> para
> > Windows
> >
> > De: Justin Bertram<ma...@apache.org>
> > Enviado:quinta-feira, 24 de fevereiro de 2022 14:22
> > Para: users@activemq.apache.org<ma...@activemq.apache.org>
> > Assunto: Re: ARTEMIS-3677 mitigate NPE when browsing messages
> >
> > > Is there a way to log what ActiveMQ is receiving from my STOMP client?
> >
> > See this documentation [1].
> >
> >
> > Justin
> >
> > [1]
> >
> >
> https://activemq.apache.org/components/artemis/documentation/latest/stomp.html#logging
> >
> > On Thu, Feb 24, 2022 at 11:18 AM Edson Richter <edsonrichter@hotmail.com
> >
> > wrote:
> >
> > > Just one point... I鈥檓 not sending any null atributes; except the cause
> is
> > > that I鈥檓 not sending a unique identifier.
> > > Is there a way to log what ActiveMQ is receiving from my STOMP client?
> > >
> > > Thanks,
> > >
> > > ER
> > >
> > > Enviado do Email<https://go.microsoft.com/fwlink/?LinkId=550986> para
> > > Windows
> > >
> > > De: Justin Bertram<ma...@apache.org>
> > > Enviado:quarta-feira, 23 de fevereiro de 2022 12:15
> > > Para: users@activemq.apache.org<ma...@activemq.apache.org>
> > > Assunto: Re: ARTEMIS-3677 mitigate NPE when browsing messages
> > >
> > > The next release of ActiveMQ Artemis will be 2.21.0. There is no 2.20.1
> > > release planned. I expect 2.21.0 to be tagged and sent for a vote
> before
> > > the end of this quarter (i.e. March 31).
> > >
> > > In the mean-time you have a couple ways to mitigate the issue:
> > >
> > >   1) Don't send messages with a null property value.
> > >   2) Build the current "main" branch using "mvn clean install -Prelease
> > > -DskipTests" and then replace your broker's existing
> > > lib/artemis-core-client-*.jar with the one put into
> > >
> > >
> >
> artemis-distribution/target/apache-artemis-2.21.0-SNAPSHOT-bin/apache-artemis-2.21.0-SNAPSHOT/lib/.
> > >
> > >
> > > Justin
> > >
> > > On Wed, Feb 23, 2022 at 9:06 AM Edson Richter <
> edsonrichter@hotmail.com>
> > > wrote:
> > >
> > > > Hi!
> > > >
> > > > There is a plan to release a 2.20.1 version of Artemis? I鈥檓 plagued
> by
> > > > ARTEMIS-3677 mitigate NPE when browsing message which is already
> fixed
> > in
> > > > source code.
> > > > If there is a roadmap on planned future releases, I would look there,
> > to
> > > > not disturb the list 馃槉
> > > >
> > > > Thanks,
> > > >
> > > > Edson Richter
> > > >
> > > >
> > > > Enviado do Email<https://go.microsoft.com/fwlink/?LinkId=550986>
> para
> > > > Windows
> > > >
> > > >
> > >
> > >
> >
> >
>

Re: ARTEMIS-3677 mitigate NPE when browsing messages

Posted by Justin Bertram <jb...@apache.org>.
The stack-trace indicates that the NPE is, in fact, being triggered by a
property with a null value. However, it's almost certainly a property that
the broker itself is adding. Therefore the only mitigation until 2.21.0 is
released is to patch the broker yourself.


Justin

On Thu, Feb 24, 2022 at 2:52 PM Edson Richter <ed...@hotmail.com>
wrote:

> It鈥檚 quite similar to examples found in documentation here: stomp/main.go
> at master 路 go-stomp/stomp (github.com)<
> https://github.com/go-stomp/stomp/blob/master/examples/client_test/main.go
> >.
>
> The difference from the example above is that I鈥檓 using application/json
> and sending a json string instead plain string.
>
>
> Queues in broker.xml are declared as:
>
>       <address name="dtsendrech000049dev"><anycast><queue
> name="dtsendrech000049dev"></queue></anycast></address>
>       <address name="dtrecvrech000049dev"><anycast><queue
> name="dtrecvrech000049dev"></queue></anycast></address>
>
> I鈥檓 connecting to tcp://192.168.0.70:61616 (which, for it鈥檚 turn, detects
> Stomp protocol).
>
>
> The stacktrace helps?
>
> 2022-02-24 17:44:40,710 WARN
> [org.apache.activemq.artemis.core.management.impl.QueueControlImpl] null:
> java.lang.NullPointerException
>         at
> org.apache.activemq.artemis.api.core.JsonUtil.truncate(JsonUtil.java:339)
> [artemis-core-client-2.20.0.jar:2.20.0]
>         at
> org.apache.activemq.artemis.api.core.Message.toPropertyMap(Message.java:768)
> [artemis-core-client-2.20.0.jar:2.20.0]
>         at
> org.apache.activemq.artemis.core.message.openmbean.MessageOpenTypeFactory.expandProperties(MessageOpenTypeFactory.java:168)
> [artemis-core-client-2.20.0.jar:2.20.0]
>         at
> org.apache.activemq.artemis.core.message.openmbean.MessageOpenTypeFactory.getFields(MessageOpenTypeFactory.java:146)
> [artemis-core-client-2.20.0.jar:2.20.0]
>         at
> org.apache.activemq.artemis.core.message.impl.CoreMessage$TextMessageOpenTypeFactory.getFields(CoreMessage.java:1406)
> [artemis-core-client-2.20.0.jar:2.20.0]
>         at
> org.apache.activemq.artemis.core.message.impl.CoreMessage$TextMessageOpenTypeFactory.getFields(CoreMessage.java:1397)
> [artemis-core-client-2.20.0.jar:2.20.0]
>         at
> org.apache.activemq.artemis.core.message.impl.CoreMessage.toCompositeData(CoreMessage.java:1354)
> [artemis-core-client-2.20.0.jar:2.20.0]
>         at
> org.apache.activemq.artemis.core.management.impl.QueueControlImpl.browse(QueueControlImpl.java:1583)
> [artemis-server-2.20.0.jar:2.20.0]
>         at
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method) [java.base:]
>         at
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> [java.base:]
>         at
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> [java.base:]
>         at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> [java.base:]
>         at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71)
> [java.base:]
>         at jdk.internal.reflect.GeneratedMethodAccessor12.invoke(Unknown
> Source)
>         at
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> [java.base:]
>         at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> [java.base:]
>         at
> java.base/sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:260)
> [java.base:]
>         at
> java.management/com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:112)
> [java.management:]
>         at
> java.management/com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:46)
> [java.management:]
>         at
> java.management/com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237)
> [java.management:]
>         at
> java.management/com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138)
> [java.management:]
>         at
> java.management/com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:252)
> [java.management:]
>         at
> java.management/javax.management.StandardMBean.invoke(StandardMBean.java:405)
> [java.management:]
>         at
> java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:809)
> [java.management:]
>         at
> java.management/com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
> [java.management:]
>         at jdk.internal.reflect.GeneratedMethodAccessor13.invoke(Unknown
> Source)
>         at
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> [java.base:]
>         at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> [java.base:]
>         at
> org.apache.activemq.artemis.core.server.management.ArtemisMBeanServerBuilder$MBeanInvocationHandler.invoke(ArtemisMBeanServerBuilder.java:96)
> [artemis-server-2.20.0.jar:2.20.0]
>         at com.sun.proxy.$Proxy17.invoke(Unknown Source)
>         at
> org.jolokia.handler.ExecHandler.doHandleRequest(ExecHandler.java:98)
> [jolokia-core-1.7.0.jar:]
>         at
> org.jolokia.handler.ExecHandler.doHandleRequest(ExecHandler.java:40)
> [jolokia-core-1.7.0.jar:]
>         at
> org.jolokia.handler.JsonRequestHandler.handleRequest(JsonRequestHandler.java:89)
> [jolokia-core-1.7.0.jar:]
>         at
> org.jolokia.backend.MBeanServerExecutorLocal.handleRequest(MBeanServerExecutorLocal.java:109)
> [jolokia-core-1.7.0.jar:]
>         at
> org.jolokia.backend.MBeanServerHandler.dispatchRequest(MBeanServerHandler.java:161)
> [jolokia-core-1.7.0.jar:]
>         at
> org.jolokia.backend.LocalRequestDispatcher.dispatchRequest(LocalRequestDispatcher.java:99)
> [jolokia-core-1.7.0.jar:]
>         at
> org.jolokia.backend.BackendManager.callRequestDispatcher(BackendManager.java:429)
> [jolokia-core-1.7.0.jar:]
>         at
> org.jolokia.backend.BackendManager.handleRequest(BackendManager.java:158)
> [jolokia-core-1.7.0.jar:]
>         at
> org.jolokia.http.HttpRequestHandler.executeRequest(HttpRequestHandler.java:197)
> [jolokia-core-1.7.0.jar:]
>         at
> org.jolokia.http.HttpRequestHandler.handlePostRequest(HttpRequestHandler.java:137)
> [jolokia-core-1.7.0.jar:]
>         at
> org.jolokia.http.AgentServlet$3.handleRequest(AgentServlet.java:493)
> [jolokia-core-1.7.0.jar:]
>         at
> org.jolokia.http.AgentServlet.handleSecurely(AgentServlet.java:383)
> [jolokia-core-1.7.0.jar:]
>         at org.jolokia.http.AgentServlet.handle(AgentServlet.java:354)
> [jolokia-core-1.7.0.jar:]
>         at org.jolokia.http.AgentServlet.doPost(AgentServlet.java:317)
> [jolokia-core-1.7.0.jar:]
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
> [jetty-all-9.4.44.v20210927-uber.jar:9.4.44.v20210927]
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
> [jetty-all-9.4.44.v20210927-uber.jar:9.4.44.v20210927]
>         at
> org.eclipse.jetty.servlet.ServletHolder$NotAsync.service(ServletHolder.java:1459)
>         at
> org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799)
>         at
> org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1631)
>         at
> io.hawt.web.filters.FlightRecordingDownloadFacade.doFilter(FlightRecordingDownloadFacade.java:68)
> [hawtio-system-2.14.0.jar:2.14.0]
>         at
> org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
>         at
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
>         at
> io.hawt.web.auth.LoginRedirectFilter.doFilter(LoginRedirectFilter.java:63)
> [hawtio-system-2.14.0.jar:2.14.0]
>         at
> org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
>         at
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
>         at
> io.hawt.web.auth.AuthenticationFilter.lambda$executeAs$1(AuthenticationFilter.java:105)
> [hawtio-system-2.14.0.jar:2.14.0]
>         at
> io.hawt.web.auth.AuthenticationFilter$$Lambda$363/0x0000000000000000.run(Unknown
> Source)
>         at
> java.base/java.security.AccessController.doPrivileged(AccessController.java:774)
> [java.base:]
>         at java.base/javax.security.auth.Subject.doAs(Subject.java:423)
> [java.base:]
>         at
> io.hawt.web.auth.AuthenticationFilter.executeAs(AuthenticationFilter.java:104)
> [hawtio-system-2.14.0.jar:2.14.0]
>         at
> io.hawt.web.auth.AuthenticationFilter.doFilter(AuthenticationFilter.java:72)
> [hawtio-system-2.14.0.jar:2.14.0]
>         at
> org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
>         at
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
>         at
> io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43)
> [hawtio-system-2.14.0.jar:2.14.0]
>         at
> org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
>         at
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
>         at
> io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43)
> [hawtio-system-2.14.0.jar:2.14.0]
>         at
> org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
>         at
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
>         at
> io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43)
> [hawtio-system-2.14.0.jar:2.14.0]
>         at
> org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
>         at
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
>         at
> io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43)
> [hawtio-system-2.14.0.jar:2.14.0]
>         at
> org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
>         at
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
>         at
> io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43)
> [hawtio-system-2.14.0.jar:2.14.0]
>         at
> org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
>         at
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
>         at
> io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43)
> [hawtio-system-2.14.0.jar:2.14.0]
>         at
> org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
>         at
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
>         at
> io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43)
> [hawtio-system-2.14.0.jar:2.14.0]
>         at
> org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
>         at
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
>         at
> io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43)
> [hawtio-system-2.14.0.jar:2.14.0]
>         at
> org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
>         at
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
>         at
> io.hawt.web.auth.SessionExpiryFilter.process(SessionExpiryFilter.java:166)
> [hawtio-system-2.14.0.jar:2.14.0]
>         at
> io.hawt.web.auth.SessionExpiryFilter.doFilter(SessionExpiryFilter.java:60)
> [hawtio-system-2.14.0.jar:2.14.0]
>         at
> org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:201)
>         at
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
>         at
> org.apache.activemq.artemis.component.JolokiaFilter.doFilter(JolokiaFilter.java:50)
> [artemis-web-2.20.0.jar:2.20.0]
>         at
> org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
>         at
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
>         at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:548)
>         at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
>         at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:600)
>         at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
>         at
> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
>         at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)
>         at
> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
>         at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1434)
>         at
> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
>         at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)
>         at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)
>         at
> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
>         at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1349)
>         at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
>         at
> org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:59)
>         at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
>         at org.eclipse.jetty.server.Server.handle(Server.java:516)
>         at
> org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:400)
>         at <unknown class>.dispatch(Unknown Source)
>         at
> org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:645)
>         at
> org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:392)
>         at
> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)
>         at org.eclipse.jetty.io
> .AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
>         at org.eclipse.jetty.io
> .FillInterest.fillable(FillInterest.java:105)
>         at org.eclipse.jetty.io
> .ChannelEndPoint$1.run(ChannelEndPoint.java:104)
>         at
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338)
>         at
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315)
>         at
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173)
>         at
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
>         at
> org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:409)
>         at
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)
>         at
> org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)
>         at java.base/java.lang.Thread.run(Thread.java:866) [java.base:]
>
>
>
> Enviado do Email<https://go.microsoft.com/fwlink/?LinkId=550986> para
> Windows
>
> ________________________________
> De: Justin Bertram <jb...@apache.org>
> Enviado: Thursday, February 24, 2022 5:26:50 PM
> Para: users@activemq.apache.org <us...@activemq.apache.org>
> Assunto: Re: ARTEMIS-3677 mitigate NPE when browsing messages
>
> I don't see anything problematic. Work up some kind of reproducible test
> and I'll try to carve out some time to take a look.
>
>
> Justin
>
> On Thu, Feb 24, 2022 at 2:23 PM Edson Richter <ed...@hotmail.com>
> wrote:
>
> > Ok, I would need some help identifying Where is my fault. Please advise.
> > I don鈥檛 see anything null in here:
> >
> >
> > 2022-02-24 17:15:34,530 DEBUG
> > [org.apache.activemq.artemis.core.protocol.stomp.StompConnection] STOMP(/
> > 192.168.0.30:60724, f7986f29): IN << StompFrame[command=CONNECT,
> > headers={accept-version=1.0,1.1,1.2, heart-beat=60000,60000,
> > host=192.168.0.250, login=******, passcode=****}]
> > 2022-02-24 17:15:34,532 DEBUG
> > [org.apache.activemq.artemis.core.protocol.stomp.StompConnection] STOMP(/
> > 192.168.0.30:60724, f7986f29):OUT >> StompFrame[command=CONNECTED,
> > headers={version=1.2, session=f7986f29, server=ActiveMQ-Artemis/2.20.0
> > ActiveMQ Artemis Messaging Engine, heart-beat=60000,60000}]
> > 2022-02-24 17:15:34,535 DEBUG
> > [org.apache.activemq.artemis.core.protocol.stomp.StompConnection] STOMP(/
> > 192.168.0.30:60724, f7986f29): IN << StompFrame[command=SEND,
> > headers={destination=dtrecvrech000049dev::dtrecvrech000049dev,
> > content-type=application/json, persistent=true},
> > body={"status":-5,"message":"O sistema Rech retornou um c贸digo de
> resposta
> > 401. A chave do CT-e 茅 .\nA mensagem do sistema 茅
> > {\"status\":{\"code\":-1,\"message\":\"N茫o
> autorizado\"}}","ctcChave":""},
> > body-bytes=[123, 34, 115, 116, 97, 116, 117, 115, 34, 58, 45, 53, 44, 34,
> > 109, 101, 115, 115, 97, 103, 101, 34, 58, 34, 79, 32, 115, 105, 115, 116,
> > 101, 109, 97, 32, 82, 101, 99, 104, 32, 114, 101, 116, 111, 114, 110,
> 111,
> > 117, 32, 117, 109, 32, 99, -61, -77, 100, 105, 103, 111, 32, 100, 101,
> 32,
> > 114, 101, 115, 112, 111, 115, 116, 97, 32, 52, 48, 49, 46, 32, 65, 32,
> 99,
> > 104, 97, 118, 101, 32, 100, 111, 32, 67, 84, 45, 101, 32, -61, -87, 32,
> 46,
> > 92, 110, 65, 32, 109, 101, 110, 115, 97, 103, 101, 109, 32, 100, 111, 32,
> > 115, 105, 115, 116, 101, 109, 97, 32, -61, -87, 32, 123, 92, 34, 115,
> 116,
> > 97, 116, 117, 115, 92, 34, 58, 123, 92, 34, 99, 111, 100, 101, 92, 34,
> 58,
> > 45, 49, 44, 92, 34, 109, 101, 115, 115, 97, 103, 101, 92, 34, 58, 92, 34,
> > 78, -61, -93, 111, 32, 97, 117, 116, 111, 114, 105, 122, 97, 100, 111,
> 92,
> > 34, 125, 125, 34, 44, 34, 99, 116, 99, 67, 104, 97, 118, 101, 34, 58, 34,
> > 34, 125], size=0]
> > 2022-02-24 17:15:34,537 DEBUG
> > [org.apache.activemq.artemis.core.protocol.stomp.StompConnection] STOMP(/
> > 192.168.0.30:60724, f7986f29): IN << StompFrame[command=DISCONNECT,
> > headers={receipt=5}]
> > 2022-02-24 17:15:34,537 DEBUG
> > [org.apache.activemq.artemis.core.protocol.stomp.StompConnection] STOMP(/
> > 192.168.0.30:60724, f7986f29):OUT >> StompFrame[command=RECEIPT,
> > headers={receipt-id=5}]
> >
> >
> > Thanks once again 馃槉
> >
> > ER
> >
> >
> > Enviado do Email<https://go.microsoft.com/fwlink/?LinkId=550986> para
> > Windows
> >
> > De: Justin Bertram<ma...@apache.org>
> > Enviado:quinta-feira, 24 de fevereiro de 2022 14:22
> > Para: users@activemq.apache.org<ma...@activemq.apache.org>
> > Assunto: Re: ARTEMIS-3677 mitigate NPE when browsing messages
> >
> > > Is there a way to log what ActiveMQ is receiving from my STOMP client?
> >
> > See this documentation [1].
> >
> >
> > Justin
> >
> > [1]
> >
> >
> https://activemq.apache.org/components/artemis/documentation/latest/stomp.html#logging
> >
> > On Thu, Feb 24, 2022 at 11:18 AM Edson Richter <edsonrichter@hotmail.com
> >
> > wrote:
> >
> > > Just one point... I鈥檓 not sending any null atributes; except the cause
> is
> > > that I鈥檓 not sending a unique identifier.
> > > Is there a way to log what ActiveMQ is receiving from my STOMP client?
> > >
> > > Thanks,
> > >
> > > ER
> > >
> > > Enviado do Email<https://go.microsoft.com/fwlink/?LinkId=550986> para
> > > Windows
> > >
> > > De: Justin Bertram<ma...@apache.org>
> > > Enviado:quarta-feira, 23 de fevereiro de 2022 12:15
> > > Para: users@activemq.apache.org<ma...@activemq.apache.org>
> > > Assunto: Re: ARTEMIS-3677 mitigate NPE when browsing messages
> > >
> > > The next release of ActiveMQ Artemis will be 2.21.0. There is no 2.20.1
> > > release planned. I expect 2.21.0 to be tagged and sent for a vote
> before
> > > the end of this quarter (i.e. March 31).
> > >
> > > In the mean-time you have a couple ways to mitigate the issue:
> > >
> > >   1) Don't send messages with a null property value.
> > >   2) Build the current "main" branch using "mvn clean install -Prelease
> > > -DskipTests" and then replace your broker's existing
> > > lib/artemis-core-client-*.jar with the one put into
> > >
> > >
> >
> artemis-distribution/target/apache-artemis-2.21.0-SNAPSHOT-bin/apache-artemis-2.21.0-SNAPSHOT/lib/.
> > >
> > >
> > > Justin
> > >
> > > On Wed, Feb 23, 2022 at 9:06 AM Edson Richter <
> edsonrichter@hotmail.com>
> > > wrote:
> > >
> > > > Hi!
> > > >
> > > > There is a plan to release a 2.20.1 version of Artemis? I鈥檓 plagued
> by
> > > > ARTEMIS-3677 mitigate NPE when browsing message which is already
> fixed
> > in
> > > > source code.
> > > > If there is a roadmap on planned future releases, I would look there,
> > to
> > > > not disturb the list 馃槉
> > > >
> > > > Thanks,
> > > >
> > > > Edson Richter
> > > >
> > > >
> > > > Enviado do Email<https://go.microsoft.com/fwlink/?LinkId=550986>
> para
> > > > Windows
> > > >
> > > >
> > >
> > >
> >
> >
>

RES: ARTEMIS-3677 mitigate NPE when browsing messages

Posted by Edson Richter <ed...@hotmail.com>.
It鈥檚 quite similar to examples found in documentation here: stomp/main.go at master 路 go-stomp/stomp (github.com)<https://github.com/go-stomp/stomp/blob/master/examples/client_test/main.go>.

The difference from the example above is that I鈥檓 using application/json and sending a json string instead plain string.


Queues in broker.xml are declared as:

      <address name="dtsendrech000049dev"><anycast><queue name="dtsendrech000049dev"></queue></anycast></address>
      <address name="dtrecvrech000049dev"><anycast><queue name="dtrecvrech000049dev"></queue></anycast></address>

I鈥檓 connecting to tcp://192.168.0.70:61616 (which, for it鈥檚 turn, detects Stomp protocol).


The stacktrace helps?

2022-02-24 17:44:40,710 WARN  [org.apache.activemq.artemis.core.management.impl.QueueControlImpl] null: java.lang.NullPointerException
        at org.apache.activemq.artemis.api.core.JsonUtil.truncate(JsonUtil.java:339) [artemis-core-client-2.20.0.jar:2.20.0]
        at org.apache.activemq.artemis.api.core.Message.toPropertyMap(Message.java:768) [artemis-core-client-2.20.0.jar:2.20.0]
        at org.apache.activemq.artemis.core.message.openmbean.MessageOpenTypeFactory.expandProperties(MessageOpenTypeFactory.java:168) [artemis-core-client-2.20.0.jar:2.20.0]
        at org.apache.activemq.artemis.core.message.openmbean.MessageOpenTypeFactory.getFields(MessageOpenTypeFactory.java:146) [artemis-core-client-2.20.0.jar:2.20.0]
        at org.apache.activemq.artemis.core.message.impl.CoreMessage$TextMessageOpenTypeFactory.getFields(CoreMessage.java:1406) [artemis-core-client-2.20.0.jar:2.20.0]
        at org.apache.activemq.artemis.core.message.impl.CoreMessage$TextMessageOpenTypeFactory.getFields(CoreMessage.java:1397) [artemis-core-client-2.20.0.jar:2.20.0]
        at org.apache.activemq.artemis.core.message.impl.CoreMessage.toCompositeData(CoreMessage.java:1354) [artemis-core-client-2.20.0.jar:2.20.0]
        at org.apache.activemq.artemis.core.management.impl.QueueControlImpl.browse(QueueControlImpl.java:1583) [artemis-server-2.20.0.jar:2.20.0]
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java.base:]
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [java.base:]
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [java.base:]
        at java.base/java.lang.reflect.Method.invoke(Method.java:566) [java.base:]
        at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71) [java.base:]
        at jdk.internal.reflect.GeneratedMethodAccessor12.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [java.base:]
        at java.base/java.lang.reflect.Method.invoke(Method.java:566) [java.base:]
        at java.base/sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:260) [java.base:]
        at java.management/com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:112) [java.management:]
        at java.management/com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:46) [java.management:]
        at java.management/com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237) [java.management:]
        at java.management/com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138) [java.management:]
        at java.management/com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:252) [java.management:]
        at java.management/javax.management.StandardMBean.invoke(StandardMBean.java:405) [java.management:]
        at java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:809) [java.management:]
        at java.management/com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) [java.management:]
        at jdk.internal.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [java.base:]
        at java.base/java.lang.reflect.Method.invoke(Method.java:566) [java.base:]
        at org.apache.activemq.artemis.core.server.management.ArtemisMBeanServerBuilder$MBeanInvocationHandler.invoke(ArtemisMBeanServerBuilder.java:96) [artemis-server-2.20.0.jar:2.20.0]
        at com.sun.proxy.$Proxy17.invoke(Unknown Source)
        at org.jolokia.handler.ExecHandler.doHandleRequest(ExecHandler.java:98) [jolokia-core-1.7.0.jar:]
        at org.jolokia.handler.ExecHandler.doHandleRequest(ExecHandler.java:40) [jolokia-core-1.7.0.jar:]
        at org.jolokia.handler.JsonRequestHandler.handleRequest(JsonRequestHandler.java:89) [jolokia-core-1.7.0.jar:]
        at org.jolokia.backend.MBeanServerExecutorLocal.handleRequest(MBeanServerExecutorLocal.java:109) [jolokia-core-1.7.0.jar:]
        at org.jolokia.backend.MBeanServerHandler.dispatchRequest(MBeanServerHandler.java:161) [jolokia-core-1.7.0.jar:]
        at org.jolokia.backend.LocalRequestDispatcher.dispatchRequest(LocalRequestDispatcher.java:99) [jolokia-core-1.7.0.jar:]
        at org.jolokia.backend.BackendManager.callRequestDispatcher(BackendManager.java:429) [jolokia-core-1.7.0.jar:]
        at org.jolokia.backend.BackendManager.handleRequest(BackendManager.java:158) [jolokia-core-1.7.0.jar:]
        at org.jolokia.http.HttpRequestHandler.executeRequest(HttpRequestHandler.java:197) [jolokia-core-1.7.0.jar:]
        at org.jolokia.http.HttpRequestHandler.handlePostRequest(HttpRequestHandler.java:137) [jolokia-core-1.7.0.jar:]
        at org.jolokia.http.AgentServlet$3.handleRequest(AgentServlet.java:493) [jolokia-core-1.7.0.jar:]
        at org.jolokia.http.AgentServlet.handleSecurely(AgentServlet.java:383) [jolokia-core-1.7.0.jar:]
        at org.jolokia.http.AgentServlet.handle(AgentServlet.java:354) [jolokia-core-1.7.0.jar:]
        at org.jolokia.http.AgentServlet.doPost(AgentServlet.java:317) [jolokia-core-1.7.0.jar:]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) [jetty-all-9.4.44.v20210927-uber.jar:9.4.44.v20210927]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [jetty-all-9.4.44.v20210927-uber.jar:9.4.44.v20210927]
        at org.eclipse.jetty.servlet.ServletHolder$NotAsync.service(ServletHolder.java:1459)
        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799)
        at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1631)
        at io.hawt.web.filters.FlightRecordingDownloadFacade.doFilter(FlightRecordingDownloadFacade.java:68) [hawtio-system-2.14.0.jar:2.14.0]
        at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
        at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
        at io.hawt.web.auth.LoginRedirectFilter.doFilter(LoginRedirectFilter.java:63) [hawtio-system-2.14.0.jar:2.14.0]
        at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
        at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
        at io.hawt.web.auth.AuthenticationFilter.lambda$executeAs$1(AuthenticationFilter.java:105) [hawtio-system-2.14.0.jar:2.14.0]
        at io.hawt.web.auth.AuthenticationFilter$$Lambda$363/0x0000000000000000.run(Unknown Source)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:774) [java.base:]
        at java.base/javax.security.auth.Subject.doAs(Subject.java:423) [java.base:]
        at io.hawt.web.auth.AuthenticationFilter.executeAs(AuthenticationFilter.java:104) [hawtio-system-2.14.0.jar:2.14.0]
        at io.hawt.web.auth.AuthenticationFilter.doFilter(AuthenticationFilter.java:72) [hawtio-system-2.14.0.jar:2.14.0]
        at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
        at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
        at io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43) [hawtio-system-2.14.0.jar:2.14.0]
        at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
        at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
        at io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43) [hawtio-system-2.14.0.jar:2.14.0]
        at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
        at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
        at io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43) [hawtio-system-2.14.0.jar:2.14.0]
        at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
        at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
        at io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43) [hawtio-system-2.14.0.jar:2.14.0]
        at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
        at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
        at io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43) [hawtio-system-2.14.0.jar:2.14.0]
        at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
        at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
        at io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43) [hawtio-system-2.14.0.jar:2.14.0]
        at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
        at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
        at io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43) [hawtio-system-2.14.0.jar:2.14.0]
        at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
        at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
        at io.hawt.web.filters.HttpHeaderFilter.doFilter(HttpHeaderFilter.java:43) [hawtio-system-2.14.0.jar:2.14.0]
        at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
        at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
        at io.hawt.web.auth.SessionExpiryFilter.process(SessionExpiryFilter.java:166) [hawtio-system-2.14.0.jar:2.14.0]
        at io.hawt.web.auth.SessionExpiryFilter.doFilter(SessionExpiryFilter.java:60) [hawtio-system-2.14.0.jar:2.14.0]
        at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:201)
        at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
        at org.apache.activemq.artemis.component.JolokiaFilter.doFilter(JolokiaFilter.java:50) [artemis-web-2.20.0.jar:2.20.0]
        at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
        at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:548)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:600)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
        at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)
        at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1434)
        at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)
        at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1349)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
        at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:59)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
        at org.eclipse.jetty.server.Server.handle(Server.java:516)
        at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:400)
        at <unknown class>.dispatch(Unknown Source)
        at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:645)
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:392)
        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)
        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
        at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338)
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315)
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173)
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
        at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:409)
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)
        at java.base/java.lang.Thread.run(Thread.java:866) [java.base:]



Enviado do Email<https://go.microsoft.com/fwlink/?LinkId=550986> para Windows

________________________________
De: Justin Bertram <jb...@apache.org>
Enviado: Thursday, February 24, 2022 5:26:50 PM
Para: users@activemq.apache.org <us...@activemq.apache.org>
Assunto: Re: ARTEMIS-3677 mitigate NPE when browsing messages

I don't see anything problematic. Work up some kind of reproducible test
and I'll try to carve out some time to take a look.


Justin

On Thu, Feb 24, 2022 at 2:23 PM Edson Richter <ed...@hotmail.com>
wrote:

> Ok, I would need some help identifying Where is my fault. Please advise.
> I don鈥檛 see anything null in here:
>
>
> 2022-02-24 17:15:34,530 DEBUG
> [org.apache.activemq.artemis.core.protocol.stomp.StompConnection] STOMP(/
> 192.168.0.30:60724, f7986f29): IN << StompFrame[command=CONNECT,
> headers={accept-version=1.0,1.1,1.2, heart-beat=60000,60000,
> host=192.168.0.250, login=******, passcode=****}]
> 2022-02-24 17:15:34,532 DEBUG
> [org.apache.activemq.artemis.core.protocol.stomp.StompConnection] STOMP(/
> 192.168.0.30:60724, f7986f29):OUT >> StompFrame[command=CONNECTED,
> headers={version=1.2, session=f7986f29, server=ActiveMQ-Artemis/2.20.0
> ActiveMQ Artemis Messaging Engine, heart-beat=60000,60000}]
> 2022-02-24 17:15:34,535 DEBUG
> [org.apache.activemq.artemis.core.protocol.stomp.StompConnection] STOMP(/
> 192.168.0.30:60724, f7986f29): IN << StompFrame[command=SEND,
> headers={destination=dtrecvrech000049dev::dtrecvrech000049dev,
> content-type=application/json, persistent=true},
> body={"status":-5,"message":"O sistema Rech retornou um c贸digo de resposta
> 401. A chave do CT-e 茅 .\nA mensagem do sistema 茅
> {\"status\":{\"code\":-1,\"message\":\"N茫o autorizado\"}}","ctcChave":""},
> body-bytes=[123, 34, 115, 116, 97, 116, 117, 115, 34, 58, 45, 53, 44, 34,
> 109, 101, 115, 115, 97, 103, 101, 34, 58, 34, 79, 32, 115, 105, 115, 116,
> 101, 109, 97, 32, 82, 101, 99, 104, 32, 114, 101, 116, 111, 114, 110, 111,
> 117, 32, 117, 109, 32, 99, -61, -77, 100, 105, 103, 111, 32, 100, 101, 32,
> 114, 101, 115, 112, 111, 115, 116, 97, 32, 52, 48, 49, 46, 32, 65, 32, 99,
> 104, 97, 118, 101, 32, 100, 111, 32, 67, 84, 45, 101, 32, -61, -87, 32, 46,
> 92, 110, 65, 32, 109, 101, 110, 115, 97, 103, 101, 109, 32, 100, 111, 32,
> 115, 105, 115, 116, 101, 109, 97, 32, -61, -87, 32, 123, 92, 34, 115, 116,
> 97, 116, 117, 115, 92, 34, 58, 123, 92, 34, 99, 111, 100, 101, 92, 34, 58,
> 45, 49, 44, 92, 34, 109, 101, 115, 115, 97, 103, 101, 92, 34, 58, 92, 34,
> 78, -61, -93, 111, 32, 97, 117, 116, 111, 114, 105, 122, 97, 100, 111, 92,
> 34, 125, 125, 34, 44, 34, 99, 116, 99, 67, 104, 97, 118, 101, 34, 58, 34,
> 34, 125], size=0]
> 2022-02-24 17:15:34,537 DEBUG
> [org.apache.activemq.artemis.core.protocol.stomp.StompConnection] STOMP(/
> 192.168.0.30:60724, f7986f29): IN << StompFrame[command=DISCONNECT,
> headers={receipt=5}]
> 2022-02-24 17:15:34,537 DEBUG
> [org.apache.activemq.artemis.core.protocol.stomp.StompConnection] STOMP(/
> 192.168.0.30:60724, f7986f29):OUT >> StompFrame[command=RECEIPT,
> headers={receipt-id=5}]
>
>
> Thanks once again 馃槉
>
> ER
>
>
> Enviado do Email<https://go.microsoft.com/fwlink/?LinkId=550986> para
> Windows
>
> De: Justin Bertram<ma...@apache.org>
> Enviado:quinta-feira, 24 de fevereiro de 2022 14:22
> Para: users@activemq.apache.org<ma...@activemq.apache.org>
> Assunto: Re: ARTEMIS-3677 mitigate NPE when browsing messages
>
> > Is there a way to log what ActiveMQ is receiving from my STOMP client?
>
> See this documentation [1].
>
>
> Justin
>
> [1]
>
> https://activemq.apache.org/components/artemis/documentation/latest/stomp.html#logging
>
> On Thu, Feb 24, 2022 at 11:18 AM Edson Richter <ed...@hotmail.com>
> wrote:
>
> > Just one point... I鈥檓 not sending any null atributes; except the cause is
> > that I鈥檓 not sending a unique identifier.
> > Is there a way to log what ActiveMQ is receiving from my STOMP client?
> >
> > Thanks,
> >
> > ER
> >
> > Enviado do Email<https://go.microsoft.com/fwlink/?LinkId=550986> para
> > Windows
> >
> > De: Justin Bertram<ma...@apache.org>
> > Enviado:quarta-feira, 23 de fevereiro de 2022 12:15
> > Para: users@activemq.apache.org<ma...@activemq.apache.org>
> > Assunto: Re: ARTEMIS-3677 mitigate NPE when browsing messages
> >
> > The next release of ActiveMQ Artemis will be 2.21.0. There is no 2.20.1
> > release planned. I expect 2.21.0 to be tagged and sent for a vote before
> > the end of this quarter (i.e. March 31).
> >
> > In the mean-time you have a couple ways to mitigate the issue:
> >
> >   1) Don't send messages with a null property value.
> >   2) Build the current "main" branch using "mvn clean install -Prelease
> > -DskipTests" and then replace your broker's existing
> > lib/artemis-core-client-*.jar with the one put into
> >
> >
> artemis-distribution/target/apache-artemis-2.21.0-SNAPSHOT-bin/apache-artemis-2.21.0-SNAPSHOT/lib/.
> >
> >
> > Justin
> >
> > On Wed, Feb 23, 2022 at 9:06 AM Edson Richter <ed...@hotmail.com>
> > wrote:
> >
> > > Hi!
> > >
> > > There is a plan to release a 2.20.1 version of Artemis? I鈥檓 plagued by
> > > ARTEMIS-3677 mitigate NPE when browsing message which is already fixed
> in
> > > source code.
> > > If there is a roadmap on planned future releases, I would look there,
> to
> > > not disturb the list 馃槉
> > >
> > > Thanks,
> > >
> > > Edson Richter
> > >
> > >
> > > Enviado do Email<https://go.microsoft.com/fwlink/?LinkId=550986> para
> > > Windows
> > >
> > >
> >
> >
>
>

Re: ARTEMIS-3677 mitigate NPE when browsing messages

Posted by Justin Bertram <jb...@apache.org>.
I don't see anything problematic. Work up some kind of reproducible test
and I'll try to carve out some time to take a look.


Justin

On Thu, Feb 24, 2022 at 2:23 PM Edson Richter <ed...@hotmail.com>
wrote:

> Ok, I would need some help identifying Where is my fault. Please advise.
> I don鈥檛 see anything null in here:
>
>
> 2022-02-24 17:15:34,530 DEBUG
> [org.apache.activemq.artemis.core.protocol.stomp.StompConnection] STOMP(/
> 192.168.0.30:60724, f7986f29): IN << StompFrame[command=CONNECT,
> headers={accept-version=1.0,1.1,1.2, heart-beat=60000,60000,
> host=192.168.0.250, login=******, passcode=****}]
> 2022-02-24 17:15:34,532 DEBUG
> [org.apache.activemq.artemis.core.protocol.stomp.StompConnection] STOMP(/
> 192.168.0.30:60724, f7986f29):OUT >> StompFrame[command=CONNECTED,
> headers={version=1.2, session=f7986f29, server=ActiveMQ-Artemis/2.20.0
> ActiveMQ Artemis Messaging Engine, heart-beat=60000,60000}]
> 2022-02-24 17:15:34,535 DEBUG
> [org.apache.activemq.artemis.core.protocol.stomp.StompConnection] STOMP(/
> 192.168.0.30:60724, f7986f29): IN << StompFrame[command=SEND,
> headers={destination=dtrecvrech000049dev::dtrecvrech000049dev,
> content-type=application/json, persistent=true},
> body={"status":-5,"message":"O sistema Rech retornou um c贸digo de resposta
> 401. A chave do CT-e 茅 .\nA mensagem do sistema 茅
> {\"status\":{\"code\":-1,\"message\":\"N茫o autorizado\"}}","ctcChave":""},
> body-bytes=[123, 34, 115, 116, 97, 116, 117, 115, 34, 58, 45, 53, 44, 34,
> 109, 101, 115, 115, 97, 103, 101, 34, 58, 34, 79, 32, 115, 105, 115, 116,
> 101, 109, 97, 32, 82, 101, 99, 104, 32, 114, 101, 116, 111, 114, 110, 111,
> 117, 32, 117, 109, 32, 99, -61, -77, 100, 105, 103, 111, 32, 100, 101, 32,
> 114, 101, 115, 112, 111, 115, 116, 97, 32, 52, 48, 49, 46, 32, 65, 32, 99,
> 104, 97, 118, 101, 32, 100, 111, 32, 67, 84, 45, 101, 32, -61, -87, 32, 46,
> 92, 110, 65, 32, 109, 101, 110, 115, 97, 103, 101, 109, 32, 100, 111, 32,
> 115, 105, 115, 116, 101, 109, 97, 32, -61, -87, 32, 123, 92, 34, 115, 116,
> 97, 116, 117, 115, 92, 34, 58, 123, 92, 34, 99, 111, 100, 101, 92, 34, 58,
> 45, 49, 44, 92, 34, 109, 101, 115, 115, 97, 103, 101, 92, 34, 58, 92, 34,
> 78, -61, -93, 111, 32, 97, 117, 116, 111, 114, 105, 122, 97, 100, 111, 92,
> 34, 125, 125, 34, 44, 34, 99, 116, 99, 67, 104, 97, 118, 101, 34, 58, 34,
> 34, 125], size=0]
> 2022-02-24 17:15:34,537 DEBUG
> [org.apache.activemq.artemis.core.protocol.stomp.StompConnection] STOMP(/
> 192.168.0.30:60724, f7986f29): IN << StompFrame[command=DISCONNECT,
> headers={receipt=5}]
> 2022-02-24 17:15:34,537 DEBUG
> [org.apache.activemq.artemis.core.protocol.stomp.StompConnection] STOMP(/
> 192.168.0.30:60724, f7986f29):OUT >> StompFrame[command=RECEIPT,
> headers={receipt-id=5}]
>
>
> Thanks once again 馃槉
>
> ER
>
>
> Enviado do Email<https://go.microsoft.com/fwlink/?LinkId=550986> para
> Windows
>
> De: Justin Bertram<ma...@apache.org>
> Enviado:quinta-feira, 24 de fevereiro de 2022 14:22
> Para: users@activemq.apache.org<ma...@activemq.apache.org>
> Assunto: Re: ARTEMIS-3677 mitigate NPE when browsing messages
>
> > Is there a way to log what ActiveMQ is receiving from my STOMP client?
>
> See this documentation [1].
>
>
> Justin
>
> [1]
>
> https://activemq.apache.org/components/artemis/documentation/latest/stomp.html#logging
>
> On Thu, Feb 24, 2022 at 11:18 AM Edson Richter <ed...@hotmail.com>
> wrote:
>
> > Just one point... I鈥檓 not sending any null atributes; except the cause is
> > that I鈥檓 not sending a unique identifier.
> > Is there a way to log what ActiveMQ is receiving from my STOMP client?
> >
> > Thanks,
> >
> > ER
> >
> > Enviado do Email<https://go.microsoft.com/fwlink/?LinkId=550986> para
> > Windows
> >
> > De: Justin Bertram<ma...@apache.org>
> > Enviado:quarta-feira, 23 de fevereiro de 2022 12:15
> > Para: users@activemq.apache.org<ma...@activemq.apache.org>
> > Assunto: Re: ARTEMIS-3677 mitigate NPE when browsing messages
> >
> > The next release of ActiveMQ Artemis will be 2.21.0. There is no 2.20.1
> > release planned. I expect 2.21.0 to be tagged and sent for a vote before
> > the end of this quarter (i.e. March 31).
> >
> > In the mean-time you have a couple ways to mitigate the issue:
> >
> >   1) Don't send messages with a null property value.
> >   2) Build the current "main" branch using "mvn clean install -Prelease
> > -DskipTests" and then replace your broker's existing
> > lib/artemis-core-client-*.jar with the one put into
> >
> >
> artemis-distribution/target/apache-artemis-2.21.0-SNAPSHOT-bin/apache-artemis-2.21.0-SNAPSHOT/lib/.
> >
> >
> > Justin
> >
> > On Wed, Feb 23, 2022 at 9:06 AM Edson Richter <ed...@hotmail.com>
> > wrote:
> >
> > > Hi!
> > >
> > > There is a plan to release a 2.20.1 version of Artemis? I鈥檓 plagued by
> > > ARTEMIS-3677 mitigate NPE when browsing message which is already fixed
> in
> > > source code.
> > > If there is a roadmap on planned future releases, I would look there,
> to
> > > not disturb the list 馃槉
> > >
> > > Thanks,
> > >
> > > Edson Richter
> > >
> > >
> > > Enviado do Email<https://go.microsoft.com/fwlink/?LinkId=550986> para
> > > Windows
> > >
> > >
> >
> >
>
>

RES: ARTEMIS-3677 mitigate NPE when browsing messages

Posted by Edson Richter <ed...@hotmail.com>.
Ok, I would need some help identifying Where is my fault. Please advise.
I don鈥檛 see anything null in here:


2022-02-24 17:15:34,530 DEBUG [org.apache.activemq.artemis.core.protocol.stomp.StompConnection] STOMP(/192.168.0.30:60724, f7986f29): IN << StompFrame[command=CONNECT, headers={accept-version=1.0,1.1,1.2, heart-beat=60000,60000, host=192.168.0.250, login=******, passcode=****}]
2022-02-24 17:15:34,532 DEBUG [org.apache.activemq.artemis.core.protocol.stomp.StompConnection] STOMP(/192.168.0.30:60724, f7986f29):OUT >> StompFrame[command=CONNECTED, headers={version=1.2, session=f7986f29, server=ActiveMQ-Artemis/2.20.0 ActiveMQ Artemis Messaging Engine, heart-beat=60000,60000}]
2022-02-24 17:15:34,535 DEBUG [org.apache.activemq.artemis.core.protocol.stomp.StompConnection] STOMP(/192.168.0.30:60724, f7986f29): IN << StompFrame[command=SEND, headers={destination=dtrecvrech000049dev::dtrecvrech000049dev, content-type=application/json, persistent=true}, body={"status":-5,"message":"O sistema Rech retornou um c贸digo de resposta 401. A chave do CT-e 茅 .\nA mensagem do sistema 茅 {\"status\":{\"code\":-1,\"message\":\"N茫o autorizado\"}}","ctcChave":""}, body-bytes=[123, 34, 115, 116, 97, 116, 117, 115, 34, 58, 45, 53, 44, 34, 109, 101, 115, 115, 97, 103, 101, 34, 58, 34, 79, 32, 115, 105, 115, 116, 101, 109, 97, 32, 82, 101, 99, 104, 32, 114, 101, 116, 111, 114, 110, 111, 117, 32, 117, 109, 32, 99, -61, -77, 100, 105, 103, 111, 32, 100, 101, 32, 114, 101, 115, 112, 111, 115, 116, 97, 32, 52, 48, 49, 46, 32, 65, 32, 99, 104, 97, 118, 101, 32, 100, 111, 32, 67, 84, 45, 101, 32, -61, -87, 32, 46, 92, 110, 65, 32, 109, 101, 110, 115, 97, 103, 101, 109, 32, 100, 111, 32, 115, 105, 115, 116, 101, 109, 97, 32, -61, -87, 32, 123, 92, 34, 115, 116, 97, 116, 117, 115, 92, 34, 58, 123, 92, 34, 99, 111, 100, 101, 92, 34, 58, 45, 49, 44, 92, 34, 109, 101, 115, 115, 97, 103, 101, 92, 34, 58, 92, 34, 78, -61, -93, 111, 32, 97, 117, 116, 111, 114, 105, 122, 97, 100, 111, 92, 34, 125, 125, 34, 44, 34, 99, 116, 99, 67, 104, 97, 118, 101, 34, 58, 34, 34, 125], size=0]
2022-02-24 17:15:34,537 DEBUG [org.apache.activemq.artemis.core.protocol.stomp.StompConnection] STOMP(/192.168.0.30:60724, f7986f29): IN << StompFrame[command=DISCONNECT, headers={receipt=5}]
2022-02-24 17:15:34,537 DEBUG [org.apache.activemq.artemis.core.protocol.stomp.StompConnection] STOMP(/192.168.0.30:60724, f7986f29):OUT >> StompFrame[command=RECEIPT, headers={receipt-id=5}]


Thanks once again 馃槉

ER


Enviado do Email<https://go.microsoft.com/fwlink/?LinkId=550986> para Windows

De: Justin Bertram<ma...@apache.org>
Enviado:quinta-feira, 24 de fevereiro de 2022 14:22
Para: users@activemq.apache.org<ma...@activemq.apache.org>
Assunto: Re: ARTEMIS-3677 mitigate NPE when browsing messages

> Is there a way to log what ActiveMQ is receiving from my STOMP client?

See this documentation [1].


Justin

[1]
https://activemq.apache.org/components/artemis/documentation/latest/stomp.html#logging

On Thu, Feb 24, 2022 at 11:18 AM Edson Richter <ed...@hotmail.com>
wrote:

> Just one point... I鈥檓 not sending any null atributes; except the cause is
> that I鈥檓 not sending a unique identifier.
> Is there a way to log what ActiveMQ is receiving from my STOMP client?
>
> Thanks,
>
> ER
>
> Enviado do Email<https://go.microsoft.com/fwlink/?LinkId=550986> para
> Windows
>
> De: Justin Bertram<ma...@apache.org>
> Enviado:quarta-feira, 23 de fevereiro de 2022 12:15
> Para: users@activemq.apache.org<ma...@activemq.apache.org>
> Assunto: Re: ARTEMIS-3677 mitigate NPE when browsing messages
>
> The next release of ActiveMQ Artemis will be 2.21.0. There is no 2.20.1
> release planned. I expect 2.21.0 to be tagged and sent for a vote before
> the end of this quarter (i.e. March 31).
>
> In the mean-time you have a couple ways to mitigate the issue:
>
>   1) Don't send messages with a null property value.
>   2) Build the current "main" branch using "mvn clean install -Prelease
> -DskipTests" and then replace your broker's existing
> lib/artemis-core-client-*.jar with the one put into
>
> artemis-distribution/target/apache-artemis-2.21.0-SNAPSHOT-bin/apache-artemis-2.21.0-SNAPSHOT/lib/.
>
>
> Justin
>
> On Wed, Feb 23, 2022 at 9:06 AM Edson Richter <ed...@hotmail.com>
> wrote:
>
> > Hi!
> >
> > There is a plan to release a 2.20.1 version of Artemis? I鈥檓 plagued by
> > ARTEMIS-3677 mitigate NPE when browsing message which is already fixed in
> > source code.
> > If there is a roadmap on planned future releases, I would look there, to
> > not disturb the list 馃槉
> >
> > Thanks,
> >
> > Edson Richter
> >
> >
> > Enviado do Email<https://go.microsoft.com/fwlink/?LinkId=550986> para
> > Windows
> >
> >
>
>


Re: ARTEMIS-3677 mitigate NPE when browsing messages

Posted by Justin Bertram <jb...@apache.org>.
> Is there a way to log what ActiveMQ is receiving from my STOMP client?

See this documentation [1].


Justin

[1]
https://activemq.apache.org/components/artemis/documentation/latest/stomp.html#logging

On Thu, Feb 24, 2022 at 11:18 AM Edson Richter <ed...@hotmail.com>
wrote:

> Just one point... I鈥檓 not sending any null atributes; except the cause is
> that I鈥檓 not sending a unique identifier.
> Is there a way to log what ActiveMQ is receiving from my STOMP client?
>
> Thanks,
>
> ER
>
> Enviado do Email<https://go.microsoft.com/fwlink/?LinkId=550986> para
> Windows
>
> De: Justin Bertram<ma...@apache.org>
> Enviado:quarta-feira, 23 de fevereiro de 2022 12:15
> Para: users@activemq.apache.org<ma...@activemq.apache.org>
> Assunto: Re: ARTEMIS-3677 mitigate NPE when browsing messages
>
> The next release of ActiveMQ Artemis will be 2.21.0. There is no 2.20.1
> release planned. I expect 2.21.0 to be tagged and sent for a vote before
> the end of this quarter (i.e. March 31).
>
> In the mean-time you have a couple ways to mitigate the issue:
>
>   1) Don't send messages with a null property value.
>   2) Build the current "main" branch using "mvn clean install -Prelease
> -DskipTests" and then replace your broker's existing
> lib/artemis-core-client-*.jar with the one put into
>
> artemis-distribution/target/apache-artemis-2.21.0-SNAPSHOT-bin/apache-artemis-2.21.0-SNAPSHOT/lib/.
>
>
> Justin
>
> On Wed, Feb 23, 2022 at 9:06 AM Edson Richter <ed...@hotmail.com>
> wrote:
>
> > Hi!
> >
> > There is a plan to release a 2.20.1 version of Artemis? I鈥檓 plagued by
> > ARTEMIS-3677 mitigate NPE when browsing message which is already fixed in
> > source code.
> > If there is a roadmap on planned future releases, I would look there, to
> > not disturb the list 馃槉
> >
> > Thanks,
> >
> > Edson Richter
> >
> >
> > Enviado do Email<https://go.microsoft.com/fwlink/?LinkId=550986> para
> > Windows
> >
> >
>
>

RES: ARTEMIS-3677 mitigate NPE when browsing messages

Posted by Edson Richter <ed...@hotmail.com>.
Just one point... I鈥檓 not sending any null atributes; except the cause is that I鈥檓 not sending a unique identifier.
Is there a way to log what ActiveMQ is receiving from my STOMP client?

Thanks,

ER

Enviado do Email<https://go.microsoft.com/fwlink/?LinkId=550986> para Windows

De: Justin Bertram<ma...@apache.org>
Enviado:quarta-feira, 23 de fevereiro de 2022 12:15
Para: users@activemq.apache.org<ma...@activemq.apache.org>
Assunto: Re: ARTEMIS-3677 mitigate NPE when browsing messages

The next release of ActiveMQ Artemis will be 2.21.0. There is no 2.20.1
release planned. I expect 2.21.0 to be tagged and sent for a vote before
the end of this quarter (i.e. March 31).

In the mean-time you have a couple ways to mitigate the issue:

  1) Don't send messages with a null property value.
  2) Build the current "main" branch using "mvn clean install -Prelease
-DskipTests" and then replace your broker's existing
lib/artemis-core-client-*.jar with the one put into
artemis-distribution/target/apache-artemis-2.21.0-SNAPSHOT-bin/apache-artemis-2.21.0-SNAPSHOT/lib/.


Justin

On Wed, Feb 23, 2022 at 9:06 AM Edson Richter <ed...@hotmail.com>
wrote:

> Hi!
>
> There is a plan to release a 2.20.1 version of Artemis? I鈥檓 plagued by
> ARTEMIS-3677 mitigate NPE when browsing message which is already fixed in
> source code.
> If there is a roadmap on planned future releases, I would look there, to
> not disturb the list 馃槉
>
> Thanks,
>
> Edson Richter
>
>
> Enviado do Email<https://go.microsoft.com/fwlink/?LinkId=550986> para
> Windows
>
>


Re: ARTEMIS-3677 mitigate NPE when browsing messages

Posted by Justin Bertram <jb...@apache.org>.
The next release of ActiveMQ Artemis will be 2.21.0. There is no 2.20.1
release planned. I expect 2.21.0 to be tagged and sent for a vote before
the end of this quarter (i.e. March 31).

In the mean-time you have a couple ways to mitigate the issue:

  1) Don't send messages with a null property value.
  2) Build the current "main" branch using "mvn clean install -Prelease
-DskipTests" and then replace your broker's existing
lib/artemis-core-client-*.jar with the one put into
artemis-distribution/target/apache-artemis-2.21.0-SNAPSHOT-bin/apache-artemis-2.21.0-SNAPSHOT/lib/.


Justin

On Wed, Feb 23, 2022 at 9:06 AM Edson Richter <ed...@hotmail.com>
wrote:

> Hi!
>
> There is a plan to release a 2.20.1 version of Artemis? I鈥檓 plagued by
> ARTEMIS-3677 mitigate NPE when browsing message which is already fixed in
> source code.
> If there is a roadmap on planned future releases, I would look there, to
> not disturb the list 馃槉
>
> Thanks,
>
> Edson Richter
>
>
> Enviado do Email<https://go.microsoft.com/fwlink/?LinkId=550986> para
> Windows
>
>