mongo3.5 java cursor,Spring data mongodb - The 'cursor' option is required

2017-11-2417:03:41,539WARN org.springframework.data.mongodb.core.MongoTemplate:Commandexecution of{"aggregate":"transactions","pipeline":[{"$lookup":{"from":"orders","localField":"orderId","foreignField":"_id","as":"order"}}]}failed:The'cursor'optionisrequired,exceptforaggregatewiththe explain argument2017-11-2417:03:41,574ERROR org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/].[dispatcherServlet]:Servlet.service()forservlet[dispatcherServlet]incontextwithpath[]threw exception[Requestprocessing failed;nested exceptionisorg.springframework.dao.InvalidDataAccessApiUsageException:Commandexecution failed:Error[The'cursor'optionisrequired,exceptforaggregatewiththe explain argument],Command={"aggregate":"transactions","pipeline":[{"$lookup":{"from":"orders","localField":"orderId","foreignField":"_id","as":"order"}}]};nested exceptioniscom.mongodb.MongoCommandException:Commandfailedwitherror9:'The 'cursor' option is required, except for aggregate with the explain argument'on server localhost:27017.Thefull responseis{"ok":0.0,"errmsg":"The 'cursor' option is required, except for aggregate with the explain argument","code":9,"codeName":"FailedToParse"}]withroot cause com.mongodb.MongoCommandException:Commandfailedwitherror9:'The 'cursor' option is required, except for aggregate with the explain argument'on server localhost:27017.Thefull responseis{"ok":0.0,"errmsg":"The 'cursor' option is required, except for aggregate with the explain argument","code":9,"codeName":"FailedToParse"}at com.mongodb.CommandResult.getException(CommandResult.java:80)~[mongo-java-driver-3.5.0.jar:na]at com.mongodb.CommandResult.throwOnError(CommandResult.java:94)~[mongo-java-driver-3.5.0.jar:na]at org.springframework.data.mongodb.core.MongoTemplate.handleCommandError(MongoTemplate.java:2100)~[spring-data-mongodb-1.10.8.RELEASE.jar:na]at org.springframework.data.mongodb.core.MongoTemplate.aggregate(MongoTemplate.java:1577)~[spring-data-mongodb-1.10.8.RELEASE.jar:na]at org.springframework.data.mongodb.core.MongoTemplate.aggregate(MongoTemplate.java:1505)~[spring-data-mongodb-1.10.8.RELEASE.jar:na]

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值