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]
mongo3.5 java cursor,Spring data mongodb - The 'cursor' option is required
最新推荐文章于 2021-03-16 23:58:29 发布