Re: ARTEMIS-3677 mitigate NPE when browsing messages

2022-02-24 Thread Justin Bertram
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 wrote: > Thanks for all your patience. > I’ll follow your recomendation, d

RES: ARTEMIS-3677 mitigate NPE when browsing messages

2022-02-24 Thread Edson Richter
Thanks for all your patience. I’ll follow your recomendation, download the sources of 2.20.0 and patch it. I do believe it’s only necessary to replace the jar file that contains the offending class. Regards, ER. Enviado do Email para Windows ___

Re: ARTEMIS-3677 mitigate NPE when browsing messages

2022-02-24 Thread Justin Bertram
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

Re: ARTEMIS-3677 mitigate NPE when browsing messages

2022-02-24 Thread Justin Bertram
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 wrote: > I’ve found anot

RES: ARTEMIS-3677 mitigate NPE when browsing messages

2022-02-24 Thread Edson Richter
I’ve 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, valueSizeL

RES: ARTEMIS-3677 mitigate NPE when browsing messages

2022-02-24 Thread Edson Richter
It’s quite similar to examples found in documentation here: stomp/main.go at master · go-stomp/stomp (github.com). The difference from the example above is that I’m using application/json and sending a json string inste

Re: ARTEMIS-3677 mitigate NPE when browsing messages

2022-02-24 Thread Justin Bertram
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 wrote: > Ok, I would need some help identifying Where is my fault. Please advise. > I don’t see anything null in her

RES: ARTEMIS-3677 mitigate NPE when browsing messages

2022-02-24 Thread Edson Richter
Ok, I would need some help identifying Where is my fault. Please advise. I don’t 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-ve

Re: ARTEMIS-3677 mitigate NPE when browsing messages

2022-02-24 Thread Justin Bertram
> 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 wrote: > Just one point... I’m not sending any

RES: ARTEMIS-3677 mitigate NPE when browsing messages

2022-02-24 Thread Edson Richter
Just one point... I’m not sending any null atributes; except the cause is that I’m not sending a unique identifier. Is there a way to log what ActiveMQ is receiving from my STOMP client? Thanks, ER Enviado do Email para Windows De: Justin Bertram

Artemis with remote keycloak

2022-02-24 Thread CASAUX Nicolas
Hello ! I'm trying to use latest version of Artemis 2.20.0 to connect to a remote keycloak, but so far I did not succeed. It seems that my keycloak is never requested by Artemis. I looked at the example provided here https://github.com/apache/activemq-artemis/tree/main/examples/features/standa