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

Hiram Chirino resolved APLO-122.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 1.0
         Assignee: Hiram Chirino

Just committed a change wich add  a NOT(Boolean) query function.  Return a 
ErrorDTO holding the error message for all 40x and 50x status codes.  Really 
return a 500 error result and log as a warning on all unexpected exceptions. 
Updated management api to reflect the change in the error handling.
                
> org.josql.QueryParseException when using a negation
> ---------------------------------------------------
>
>                 Key: APLO-122
>                 URL: https://issues.apache.org/jira/browse/APLO-122
>             Project: ActiveMQ Apollo
>          Issue Type: Bug
>            Reporter: Lionel Cons
>            Assignee: Hiram Chirino
>             Fix For: 1.0
>
>
> When trying to use the "NOT" operator in the REST interface, Apollo reports 
> an exception:
> org.josql.QueryParseException: Unable to find function (method): 
> "NOT(java.lang.Boolean)" in any user-defined function handlers or the default 
> function handler
>       at org.josql.expressions.Function.init(Function.java:248)
>       at org.josql.expressions.BinaryExpression.init(BinaryExpression.java:92)
>       at org.josql.Query.init(Query.java:2171)
>       at org.josql.Query.parse(Query.java:2048)
>       at 
> org.apache.activemq.apollo.web.resources.BrokerResource.narrow(BrokerResource.scala:449)
>       at 
> org.apache.activemq.apollo.web.resources.BrokerResource$$anonfun$queues$1$$anonfun$20.apply(BrokerResource.scala:528)
>       at 
> org.apache.activemq.apollo.web.resources.BrokerResource$$anonfun$queues$1$$anonfun$20.apply(BrokerResource.scala:528)
>       at org.fusesource.hawtdispatch.Future$$anon$2.merge(Future.scala:125)
>       at org.fusesource.hawtdispatch.SettableFuture$class.set(Future.scala:46)
>       at org.fusesource.hawtdispatch.Future$$anon$2.set(Future.scala:124)
>       at 
> org.fusesource.hawtdispatch.SettableFuture$class.apply(Future.scala:41)
>       at org.fusesource.hawtdispatch.Future$$anon$2.apply(Future.scala:124)
>       at 
> org.fusesource.hawtdispatch.SettableFuture$$anonfun$map$1.apply(Future.scala:105)
>       at 
> org.fusesource.hawtdispatch.SettableFuture$$anonfun$map$1.apply(Future.scala:105)
>       at 
> org.fusesource.hawtdispatch.SettableFuture$$anonfun$set$1.apply(Future.scala:57)
>       at 
> org.fusesource.hawtdispatch.SettableFuture$$anonfun$set$1.apply(Future.scala:57)
>       at scala.Option.foreach(Option.scala:197)
> FWIW, the expression I tried to use was "(id LIKE '%bar%') AND NOT (id LIKE 
> '%foo%')".
> First, I would have expected such an exception to cause the REST interface to 
> report a "server error". Instead, it only reported "404 Not Found".
> Then, why can't I use the unary NOT this way?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to