- problem description
query interface error: OL>
{"errorMessage":
"Command failed with error 16412: 'FieldPath field names may not contain '.'.' on server 10.21.20.8:27019. The full response is { \"ok\" : 0.0, \"errmsg\" : \"FieldPath field names may not contain '.'.\", \"code\" : 16412, \"codeName\" : \"Location16412\" }"}
com.mongodb.MongoCommandException: Command failed with error 16412: 'FieldPath field names may not contain '.'.' on server 10.21.20.8:27019. The full response is { "ok" : 0.0, "errmsg" : "FieldPath field names may not contain '.'.", "code" : 16412, "codeName" : "Location16412" }
at com.mongodb.connection.ProtocolHelper.getCommandFailureException(ProtocolHelper.java:115)
at com.mongodb.connection.CommandProtocol.execute(CommandProtocol.java:114)
at com.mongodb.connection.DefaultServer$DefaultServerProtocolExecutor.execute(DefaultServer.java:168)
at com.mongodb.connection.DefaultServerConnection.executeProtocol(DefaultServerConnection.java:289)
at com.mongodb.connection.DefaultServerConnection.command(DefaultServerConnection.java:176)
at com.mongodb.operation.CommandOperationHelper.executeWrappedCommandProtocol(CommandOperationHelper.java:216)
at com.mongodb.operation.CommandOperationHelper.executeWrappedCommandProtocol(CommandOperationHelper.java:207)
at com.mongodb.operation.CommandOperationHelper.executeWrappedCommandProtocol(CommandOperationHelper.java:113)
at com.mongodb.operation.AggregateOperation$1.call(AggregateOperation.java:257)
at com.mongodb.operation.AggregateOperation$1.call(AggregateOperation.java:253)
at com.mongodb.operation.OperationHelper.withConnectionSource(OperationHelper.java:435)
at com.mongodb.operation.OperationHelper.withConnection(OperationHelper.java:408)
at com.mongodb.operation.AggregateOperation.execute(AggregateOperation.java:253)
at com.mongodb.operation.AggregateOperation.execute(AggregateOperation.java:67)
at com.mongodb.Mongo.execute(Mongo.java:836)
at com.mongodb.Mongo$2.execute(Mongo.java:823)
at com.mongodb.DBCollection.aggregate(DBCollection.java:1455)
at com.mongodb.DBCollection.aggregate(DBCollection.java:1418)
at com.mongodb.DBCollection.aggregate(DBCollection.java:1403)
at com.linkus.biz.prj.service.impl.PrjDevTaskStatServiceImpl.getPrjDevTaskStatData(PrjDevTaskStatServiceImpl.java:127)
- problem solving
check the fields in the group. The grouping fields are wrong. The value “joinbiz. Resp” of resp in the group is changed to “resp” OL>
"$group":{
"_id":{
"prjSys":"$prjSys",
"prjMod":"$prjMod",
"resp":"$_joinBiz_.resp",
},
"devTasksCount":{
"$sum":1
},
"minPlanEndDate":{
"$min":"$_joinBiz_.planEndDate"
},
"maxPlanEndData":{
"$max":"$_joinBiz_.planEndDate"
},
"planCompletionCount":{
"$sum":"$planCompletionNum"
},
"actualCompletionCount":{
"$sum":"$actualCompletionNum"
}
}
Read More:
- Window installation of MongoDB exception: connect failed exception
- Mongodb uses Mongo to report error: could’t connect to server 127.0.0.1:27017, connection attempt failed: socket
- Mongodb connection authentication auth failed solution
- Error: could’t connect to server 127.0.0.1:27017, connection attempt failed
- MongoDB Error: Query failed with error code 2 and error message ‘Field ‘locale’ is invalid
- error:Failed to connect to 127.0.0.1:27017, reason: errno:111 Connection refused;error:couldn‘t ….
- [Solved] org.mongodb.driver.cluster – Exception in monitor thread while connecting to server node1:27017
- The mongoDB service failed to start (exception: connect failed)
- Spring boot integrates Mongo to solve some common connection and permission problems. Docker compose installs Mongo
- MongoNetworkError: failed to connect to server [localhost:27017] on first connect [Error: connect EC
- Invalid column reference when using round in hive
- Mongodb failed to start: child process failed, exited with error number 100
- Simple understanding and basic operation of mongodb
- 【MongoDB】 Failed to connect to 127.0.0.1:27017, reason: Connection refused
- Mongodb start error: child process failed, exited with error number 1
- Error: could’t connect to server 127.0.0.1:27017 Src / Mongo / shell/ mongo.js
- MongoNetworkError: failed to connect to server [localhost:27017]
- Summary of database
- Group by operator of hive execution plan
- MongoDB Error: Failed to start mongod.service: Unit mongodb.service is masked