jms selector does not work
javahamburg Aug 2, 2012 10:08 AMHi,
I'm trying to consumer messages from a queue with a simple selector, but I get a NullPointerException.
We are using HornetQ 2.2.5.Final. For my testsI run hornet on my local machine, which is xubuntu 12.04/64bit.
The selector (for tests purposes) is the String "a LIKE 'b%'" but could be any other like "myProperty LIKE 'value'", "myProperty LIKE '%value'", etc..
Without passing a selector, everything works perfectly, the selector is passed like this:
MessageConsumer consumer = session.createConsumer(getDestination(), "a LIKE 'b%'");
connection.start();
The stacktrace thrown (actually two identically will be thrown) is this one:
[Thread-10 (group:HornetQ-server-threads1075051425-598834505)] 15:47:15,356 WARNING [org.hornetq.core.filter.impl.FilterImpl] Invalid filter string: a LIKE 'b%'
java.lang.NullPointerException
at org.hornetq.core.filter.impl.FilterImpl.match(FilterImpl.java:162)
at org.hornetq.core.server.impl.ServerConsumerImpl.handle(ServerConsumerImpl.java:245)
at org.hornetq.core.server.impl.QueueImpl.handle(QueueImpl.java:2017)
at org.hornetq.core.server.impl.QueueImpl.deliver(QueueImpl.java:1587)
at org.hornetq.core.server.impl.QueueImpl.access$900(QueueImpl.java:72)
at org.hornetq.core.server.impl.QueueImpl$DeliverRunner.run(QueueImpl.java:2271)
at org.hornetq.utils.OrderedExecutorFactory$OrderedExecutor$1.run(OrderedExecutorFactory.java:100)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
[Thread-10 (group:HornetQ-server-threads1075051425-598834505)] 15:47:15,359 WARNING [org.hornetq.core.filter.impl.FilterImpl] Invalid filter string: a LIKE 'b%'
java.lang.NullPointerException
at org.hornetq.core.filter.impl.FilterImpl.match(FilterImpl.java:162)
at org.hornetq.core.server.impl.ServerConsumerImpl.handle(ServerConsumerImpl.java:245)
at org.hornetq.core.server.impl.QueueImpl.handle(QueueImpl.java:2017)
at org.hornetq.core.server.impl.QueueImpl.deliver(QueueImpl.java:1587)
at org.hornetq.core.server.impl.QueueImpl.access$900(QueueImpl.java:72)
at org.hornetq.core.server.impl.QueueImpl$DeliverRunner.run(QueueImpl.java:2271)
at org.hornetq.utils.OrderedExecutorFactory$OrderedExecutor$1.run(OrderedExecutorFactory.java:100)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Is it possible, that HornetQ does not provide LIKE, as described in the specification?
Thanks for feedback.
Daniel