-
Notifications
You must be signed in to change notification settings - Fork 1.1k
NullPointerException
in MongoPersistentEntityIndexResolver.appendTextIndexInformation(…)
#3901
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
Comments
Thanks for reporting! We'll have a look. |
I might be missing something here, but I was not able to reproduce the issue. Could you please provide a complete minimal sample (something that we can unzip or git clone, build, and deploy) that reproduces the problem. |
Thanks for looking into it! I have attached a sample here: On 2.5.7 there is no NPE (but I did notice a warning around a cyclic reference inside the underlying javax.measure implementation). However, the only thing actually persisted there is our enum (which is the desired behavior). Everything works fine outside of just the NPE on startup when upgrading to 2.6.1. |
Thanks for the sample! I can see now that there's a |
NullPointerException
in MongoPersistentEntityIndexResolver.appendTextIndexInformation(…)
Since upgrading to 2.6.1 I am seeing failures when invoking IndexResolver::resolveIndexFor(...) for some specific entities.
We have a generic pattern using javax.measure classes using an enum which implements an interface defined in this way:
Pre 2.6, index resolution worked just fine on entities containing this object. However, after upgrading to 2.6.1 I get a NullPointerException with the following stack trace (Note: I can "fix" the issue by marking getUnit() as @transient which is an acceptable work-around for our use case -- the persistence mechanism still persists the enum via its string properly and we do not use the annotation based index resolution pattern most of the time).
When I debug into the code and view the state at the time of the NPE I see this:
The text was updated successfully, but these errors were encountered: