Uploaded image for project: 'ActiveMQ Apollo (Retired)'
  1. ActiveMQ Apollo (Retired)
  2. APLO-122

org.josql.QueryParseException when using a negation

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.0
    • None
    • None

    Description

      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?

      Attachments

        Activity

          People

            chirino Hiram R. Chirino
            lionel.cons Lionel Cons
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: