Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Occasional MongoCommandException #3306

Open
ball3t opened this issue Oct 29, 2024 · 0 comments
Open

Occasional MongoCommandException #3306

ball3t opened this issue Oct 29, 2024 · 0 comments
Labels

Comments

@ball3t
Copy link

ball3t commented Oct 29, 2024

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

image

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant