activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lionel Cons (Created) (JIRA)" <j...@apache.org>
Subject [jira] [Created] (APLO-122) org.josql.QueryParseException when using a negation
Date Tue, 20 Dec 2011 13:03:31 GMT
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


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

        

Mime
View raw message