You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Justin Bertram (Jira)" <ji...@apache.org> on 2025/04/24 20:52:00 UTC

[jira] [Updated] (ARTEMIS-5448) Ambiguous URI path encoding for Jolokia request

     [ https://issues.apache.org/jira/browse/ARTEMIS-5448?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Justin Bertram updated ARTEMIS-5448:
------------------------------------
    Description: 
We currently are trying to update from Artemis 2.32.0 to 2.40.0, but we ran into this problem.

We use Jolokia (2.2.8) with the J4pClient / J4pExecRequest to execute the {{countMessages}} operation where we want to provide a filter:
{noformat}
sValue LIKE 'a_c%'{noformat}
The problem is now, that we get a bad request exception, because it seems that Jetty does not allow percent signs within the URI. When I debug, I can see, that the following request is executed:
{code:java}
GET http://127.0.0.1:8161/console/jolokia/exec/org.apache.activemq.artemis:address=%22test-filter-queue%22,broker=%22broker-p5q%22,component=addresses,queue=%22test-filter-queue%22,routing-type=%22anycast%22,subcomponent=queues/countMessages(java.lang.String)/sValue%20LIKE%20'a_c%25' HTTP/1.1 {code}
The response is then the following:
{code:xml}
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 400 Ambiguous URI path encoding</title>
</head>
<body>
<h2>HTTP ERROR 400 Ambiguous URI path encoding</h2>
<table>
<tr><th>URI:</th><td>/badURI</td></tr>
<tr><th>STATUS:</th><td>400</td></tr>
<tr><th>MESSAGE:</th><td>Ambiguous URI path encoding</td></tr>
</table></body>
</html>{code}
When I remove the percent sign (e.g. {{sValue LIKE 'a_cXYZ'}}) it works fine, but we need this wildcard ({{%}}) functionality. 

Is there any way/advice on how we can get the functionality working?

I'm not sure whether it is a bug, but I also don't know what to do at the moment.

  was:
We currently try to update from Artemis 2.32.0 to 2.40.0 but we ran into the following problem:

We use Jolokia (2.2.8) with the J4pClient / J4pExecRequest to execute the {{countMessages}} operation where we want to provide a filter: {{"sValue LIKE 'a_c%'"}}

The problem is now, that we get a bad request exception, because it seems that Jetty does not allow percent signs within the URI. When I debug, I can see, that the following request is executed:

 
{code:java}
GET http://127.0.0.1:8161/console/jolokia/exec/org.apache.activemq.artemis:address=%22test-filter-queue%22,broker=%22broker-p5q%22,component=addresses,queue=%22test-filter-queue%22,routing-type=%22anycast%22,subcomponent=queues/countMessages(java.lang.String)/sValue%20LIKE%20'a_c%25' HTTP/1.1 {code}
 

 

The response is then the following:

 
{code:java}
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 400 Ambiguous URI path encoding</title>
</head>
<body>
<h2>HTTP ERROR 400 Ambiguous URI path encoding</h2>
<table>
<tr><th>URI:</th><td>/badURI</td></tr>
<tr><th>STATUS:</th><td>400</td></tr>
<tr><th>MESSAGE:</th><td>Ambiguous URI path encoding</td></tr>
</table></body>
</html> {code}
 

 

When I remove the percent sign (e.g. {{{}"sValue LIKE 'a_cXYZ'"{}}}) it works fine, but we need this wildcard (%) functionality.

 

Is there any way/advice on how we can get the functionality working?

I'm not sure whether it is a bug, but I also don't know what to do at the moment.


> Ambiguous URI path encoding for Jolokia request
> -----------------------------------------------
>
>                 Key: ARTEMIS-5448
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-5448
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: JMX
>    Affects Versions: 2.40.0
>            Reporter: Timon Zilles
>            Priority: Major
>
> We currently are trying to update from Artemis 2.32.0 to 2.40.0, but we ran into this problem.
> We use Jolokia (2.2.8) with the J4pClient / J4pExecRequest to execute the {{countMessages}} operation where we want to provide a filter:
> {noformat}
> sValue LIKE 'a_c%'{noformat}
> The problem is now, that we get a bad request exception, because it seems that Jetty does not allow percent signs within the URI. When I debug, I can see, that the following request is executed:
> {code:java}
> GET http://127.0.0.1:8161/console/jolokia/exec/org.apache.activemq.artemis:address=%22test-filter-queue%22,broker=%22broker-p5q%22,component=addresses,queue=%22test-filter-queue%22,routing-type=%22anycast%22,subcomponent=queues/countMessages(java.lang.String)/sValue%20LIKE%20'a_c%25' HTTP/1.1 {code}
> The response is then the following:
> {code:xml}
> <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
> <title>Error 400 Ambiguous URI path encoding</title>
> </head>
> <body>
> <h2>HTTP ERROR 400 Ambiguous URI path encoding</h2>
> <table>
> <tr><th>URI:</th><td>/badURI</td></tr>
> <tr><th>STATUS:</th><td>400</td></tr>
> <tr><th>MESSAGE:</th><td>Ambiguous URI path encoding</td></tr>
> </table></body>
> </html>{code}
> When I remove the percent sign (e.g. {{sValue LIKE 'a_cXYZ'}}) it works fine, but we need this wildcard ({{%}}) functionality. 
> Is there any way/advice on how we can get the functionality working?
> I'm not sure whether it is a bug, but I also don't know what to do at the moment.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@activemq.apache.org
For additional commands, e-mail: issues-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact