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

Claus Ibsen resolved AMQ-5796.
------------------------------
       Resolution: Fixed
         Assignee: Claus Ibsen
    Fix Version/s: 5.15.0

Thanks for the patch

> Incorrect Task Usage mentioned for amq browse command for the msgsel
> --------------------------------------------------------------------
>
>                 Key: AMQ-5796
>                 URL: https://issues.apache.org/jira/browse/AMQ-5796
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.11.0, 5.11.1
>         Environment: All
>            Reporter: JaySenSharma
>            Assignee: Claus Ibsen
>            Priority: Trivial
>             Fix For: 5.15.0
>
>
> - The *"megsel"* usage help mentioned in the activemq browse command does not 
> put the message selector value in the Double quatation mark which is causing 
> the users following error.
> {code}
> [jsensharma@localhost bin]$ cd apache-activemq-5.11.1/bin
> [jsensharma@localhost bin]$ ./activemq-admin browse --amqurl 
> tcp://localhost:61616 --msgsel JMSMessageID='*:1' FOO.BAR
> ERROR: java.lang.RuntimeException: Failed to execute browse task. Reason: 
> javax.jms.InvalidSelectorException: (JMSMessageID=*:1)
> java.lang.RuntimeException: Failed to execute browse task. Reason: 
> javax.jms.InvalidSelectorException: (JMSMessageID=*:1)
>       at 
> org.apache.activemq.console.command.AmqBrowseCommand.runTask(AmqBrowseCommand.java:155)
>       at 
> org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
>       at 
> org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:150)
>       at 
> org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
>       at 
> org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:104)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>       at java.lang.reflect.Method.invoke(Method.java:606)
>       at org.apache.activemq.console.Main.runTaskClass(Main.java:262)
>       at org.apache.activemq.console.Main.main(Main.java:115)
> ERROR: java.lang.Exception: javax.jms.InvalidSelectorException: 
> (JMSMessageID=*:1)
> java.lang.Exception: javax.jms.InvalidSelectorException: (JMSMessageID=*:1)
>       at 
> org.apache.activemq.console.command.AmqBrowseCommand.runTask(AmqBrowseCommand.java:156)
>       at 
> org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
>       at 
> org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:150)
>       at 
> org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
>       at 
> org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:104)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>       at java.lang.reflect.Method.invoke(Method.java:606)
>       at org.apache.activemq.console.Main.runTaskClass(Main.java:262)
>       at org.apache.activemq.console.Main.main(Main.java:115)
> Caused by: javax.jms.InvalidSelectorException: (JMSMessageID=*:1)
>       at 
> org.apache.activemq.selector.SelectorParser.parse(SelectorParser.java:88)
>       at 
> org.apache.activemq.selector.SelectorParser.parse(SelectorParser.java:58)
>       at 
> org.apache.activemq.ActiveMQQueueBrowser.<init>(ActiveMQQueueBrowser.java:80)
>       at 
> org.apache.activemq.ActiveMQSession.createBrowser(ActiveMQSession.java:1449)
>       at 
> org.apache.activemq.console.filter.AmqMessagesQueryFilter.queryMessages(AmqMessagesQueryFilter.java:104)
>       at 
> org.apache.activemq.console.filter.AmqMessagesQueryFilter.query(AmqMessagesQueryFilter.java:86)
>       at 
> org.apache.activemq.console.filter.WildcardTransformFilter.query(WildcardTransformFilter.java:60)
>       at 
> org.apache.activemq.console.util.AmqMessagesUtil.getMessages(AmqMessagesUtil.java:60)
>       at 
> org.apache.activemq.console.command.AmqBrowseCommand.runTask(AmqBrowseCommand.java:142)
>       ... 10 more
> Caused by: org.apache.activemq.selector.ParseException: Parse error at line 
> 1, column 15.  Encountered: *
>       at 
> org.apache.activemq.selector.SelectorParser.generateParseException(SelectorParser.java:1313)
>       at 
> org.apache.activemq.selector.SelectorParser.jj_consume_token(SelectorParser.java:1261)
>       at 
> org.apache.activemq.selector.SelectorParser.unaryExpr(SelectorParser.java:474)
>       at 
> org.apache.activemq.selector.SelectorParser.multExpr(SelectorParser.java:391)
>       at 
> org.apache.activemq.selector.SelectorParser.addExpression(SelectorParser.java:360)
>       at 
> org.apache.activemq.selector.SelectorParser.comparisonExpression(SelectorParser.java:212)
>       at 
> org.apache.activemq.selector.SelectorParser.equalityExpression(SelectorParser.java:172)
>       at 
> org.apache.activemq.selector.SelectorParser.andExpression(SelectorParser.java:136)
>       at 
> org.apache.activemq.selector.SelectorParser.orExpression(SelectorParser.java:115)
>       at 
> org.apache.activemq.selector.SelectorParser.primaryExpr(SelectorParser.java:537)
>       at 
> org.apache.activemq.selector.SelectorParser.unaryExpr(SelectorParser.java:471)
>       at 
> org.apache.activemq.selector.SelectorParser.multExpr(SelectorParser.java:391)
>       at 
> org.apache.activemq.selector.SelectorParser.addExpression(SelectorParser.java:360)
>       at 
> org.apache.activemq.selector.SelectorParser.comparisonExpression(SelectorParser.java:212)
>       at 
> org.apache.activemq.selector.SelectorParser.equalityExpression(SelectorParser.java:157)
>       at 
> org.apache.activemq.selector.SelectorParser.andExpression(SelectorParser.java:136)
>       at 
> org.apache.activemq.selector.SelectorParser.orExpression(SelectorParser.java:115)
>       at 
> org.apache.activemq.selector.SelectorParser.JmsSelector(SelectorParser.java:107)
>       at 
> org.apache.activemq.selector.SelectorParser.parse(SelectorParser.java:85)
>       ... 18 more
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to