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 · 2 comments
Open

Occasional MongoCommandException #3306

ball3t opened this issue Oct 29, 2024 · 2 comments

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

@evanchooly evanchooly added this to the 2.4.15 milestone Jan 6, 2025
@evanchooly
Copy link
Member

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.

@evanchooly evanchooly added bug and removed question labels Feb 19, 2025
@evanchooly
Copy link
Member

I can't recreate this one. Do you have a reproducer that does?

@evanchooly evanchooly removed this from the 2.4.15 milestone Feb 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants