Occasional MongoCommandException
Hello all,
I am not sure if this is a problem in morphia or java HashMap. Just see if anyone encountered similar issue. When trying to use aggregate like this:
datastore.aggregate().group(Group.group(Group.id("$xxxx")))
the following exception is thrown unless the server is restarted.
com.mongodb.MongoCommandException: Command failed with error 40324 (Location40324): 'Unrecognized pipeline stage name: '_id''
I have tried to reproduce this issue by restarting the server many times in my development server for debugging. After hitting this issue, I found the problem is that the codecs in AggregationCodecProvider is containing duplicated key. Causing it returning null when calling get with Group.class
Could any one advise on this?
Regards ** Please complete the following information: ** Server Version: 6.0.18 Driver Version: 1.19.8 Morphia Version: 2.4.4
I'm not sure how this is even possible looking at that code but I can tighten things up a bit and see if that helps.
I can't recreate this one. Do you have a reproducer that does?