Closed spring-projects-issues closed 7 years ago
Oliver Drotbohm commented
You reported the issue against RC2, the stack trace however shows M4 to be used. We fixed a couple of glitches in that area in the RC2. Care to make sure you really run RC2 and see whether the problem still persists?
Ivan Mushketyk commented
Hey Oliver,
Sorry, I've specified incorrect version in the issue, the stack trace is the source of truth in this case. I've added my Gradle dependencies in the issue's description
Oliver Drotbohm commented
So it's just getting more puzzling. Boot 2.0 M2 uses Spring Data Kay M4. So we still don't know whether the issues persists on the most recent RC3. You should be able to just upgrade to Boot 2.0 M3 to get the latest bits to verify
Ivan Mushketyk commented
I've bumped up the version of Boot to 2.0 M3, but I still get a very similar stack trace
Oliver Drotbohm commented
Can you be more specific on "very similar"?
Ivan Mushketyk commented
Same error message, different dependencies versions, slightly different chain of invocations
Oliver Drotbohm commented
Judging from the stack trace you get Document
instances returned for the value in the Map
, not a Long
value. I agree that we can throw a better exception for this explaining the mismatch, but that mismatch fundamentally seems to be caused by the data in your database not matching the object model in your code
Ivan Mushketyk commented
Hey Oliver,
You are right, it was incorrect type in the model. Better exception would be really appreciated!
You can close this ticket
Oliver Drotbohm commented
We now throw an exception with more context in the case you run into: we include the value that's supposed to be read as well as the type which we couldn't find a PersistentEntity
for
Ivan Mushketyk opened DATAMONGO-1757 and commented
Spring data throws the following exception when reading data from a database:
It stumbles on the following field:
When the files field is removed everything works fine.
Data in MongoDB seems to match the type, here how this field looks in the database: !Screen Shot 2017-07-27 at 10.55.29.png|thumbnail!
Here are my Gradle dependencies:
UPDATE:
According to the Oliver's comment I've bumped up version of spring-boot to 2.0.0.M3, but I still see the same error. Here are my new dependencies:
But it still results in a similar stack trace:
Affects: 2.0 RC2 (Kay)
Attachments:
Referenced from: commits https://github.com/spring-projects/spring-data-mongodb/commit/f2e72fe93188b496e4ca0f9456ccdbd1eef951f7, https://github.com/spring-projects/spring-data-mongodb/commit/c35ea14c4f2aa5de1677e5c71f9b31a19ba2c13a