2
<int-mongodb:inbound-channel-adapter
        id="mongoInboundAdapter" channel="mongoMessageChannel"
        collection-name="shiporder" 
        query-expression="new BasicQuery().addCriteria(new Criteria().andOperator(
        Criteria.where('orderperson').is('****'), Criteria.where('status').is('false')">
        <int:poller fixed-rate="15000" max-messages-per-poll="1" />
    </int-mongodb:inbound-channel-adapter>

The Above code snippet giving Unexpected ran out of arguments while running server

Can anyone help on this.

Bogdan Bogdanov
  • 1,707
  • 2
  • 20
  • 31
Digital
  • 549
  • 1
  • 7
  • 26

1 Answers1

1

Your issue is there that <int-mongodb:inbound-channel-adapter> doesn't support QueryDSL yet:

Query query = new BasicQuery(this.queryExpression.getValue(this.evaluationContext, 
                                                              String.class));

As you see we expect there only a String result from the expression evaluation. And only after that build the BasicQuery based on that JSON String.

I'm sure we really can support the QueryDSL there like we do with the search-args-expression for the <int-twitter:search-outbound-gateway> and with the statementExpression in the CassandraMessageHandler.

Feel free to raise a JIRA ticket on the matter.

Artem Bilan
  • 113,505
  • 11
  • 91
  • 118
  • Thanks @Artem Bilan for your quick response, I have one more question can you please let me know when we will use `query` and when we will use `query-expression` under `` – Digital Sep 09 '15 at 15:13
  • Well, not sure right now, but that looks like you can return a JSON query string from some bean, e.g. `@myQueryBean.getQuery()`. Yes, it isn't so useful because the `Query` object would be more flexible, but there is no choice right now... – Artem Bilan Sep 09 '15 at 15:21