Uploaded image for project: 'Spring Data Commons'
  1. Spring Data Commons
  2. DATACMNS-1393

Floating deadock for BasicPersistentEntity getPersistentProperty method

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Core
    • Labels:
      None
    • Environment:
      Spring 5.0.4 RELEASE, Spring-Data-Commons 2.1.0.M3, Spring-Data-MongoDB 2.1.0.M3

      Description

      Hi, Team,

      It's to some extent similar to issue DATACMNS-901 but anyway it's different.

      The general usecase looks like this:

      1) I start my Spring Boot app.

      2) I can log in, perform any queries against MongoDB, do whatever I want.

      3) In the meantime I get stuff like this below

      org.springframework.data.mapping.context.InvalidPersistentPropertyPath: No property 'id' found on class com.geoapp.satstock.entity.Organization! Did you mean: id?org.springframework.data.mapping.context.InvalidPersistentPropertyPath: No property 'id' found on class com.geoapp.satstock.entity.Organization! Did you mean: id? at org.springframework.data.mapping.context.PersistentPropertyPathFactory.createPersistentPropertyPath(PersistentPropertyPathFactory.java:215) ~[spring-data-commons-2.1.0.M3.jar:2.1.0.M3] at org.springframework.data.mapping.context.PersistentPropertyPathFactory.lambda$getPersistentPropertyPath$2(PersistentPropertyPathFactory.java:182) ~[spring-data-commons-2.1.0.M3.jar:2.1.0.M3] at java.util.concurrent.ConcurrentMap.computeIfAbsent(ConcurrentMap.java:324) ~[na:1.8.0_144] at org.springframework.data.mapping.context.PersistentPropertyPathFactory.getPersistentPropertyPath(PersistentPropertyPathFactory.java:181) ~[spring-data-commons-2.1.0.M3.jar:2.1.0.M3] at org.springframework.data.mapping.context.PersistentPropertyPathFactory.from(PersistentPropertyPathFactory.java:96) ~[spring-data-commons-2.1.0.M3.jar:2.1.0.M3] at org.springframework.data.mapping.context.PersistentPropertyPathFactory.from(PersistentPropertyPathFactory.java:109) ~[spring-data-commons-2.1.0.M3.jar:2.1.0.M3] at org.springframework.data.mapping.context.AbstractMappingContext.getPersistentPropertyPath(AbstractMappingContext.java:275) ~[spring-data-commons-2.1.0.M3.jar:2.1.0.M3] at org.springframework.data.mongodb.core.convert.QueryMapper$MetadataBackedField.getPath(QueryMapper.java:951) ~[spring-data-mongodb-2.1.0.M3.jar:2.1.0.M3] at org.springframework.data.mongodb.core.convert.QueryMapper$MetadataBackedField.<init>(QueryMapper.java:837) ~[spring-data-mongodb-2.1.0.M3.jar:2.1.0.M3] at org.springframework.data.mongodb.core.convert.QueryMapper$MetadataBackedField.<init>(QueryMapper.java:814) ~[spring-data-mongodb-2.1.0.M3.jar:2.1.0.M3] at org.springframework.data.mongodb.core.convert.QueryMapper.createPropertyField(QueryMapper.java:247) ~[spring-data-mongodb-2.1.0.M3.jar:2.1.0.M3] at org.springframework.data.mongodb.core.convert.QueryMapper.getMappedObject(QueryMapper.java:141) ~[spring-data-mongodb-2.1.0.M3.jar:2.1.0.M3] at org.springframework.data.mongodb.core.MongoTemplate.doFind(MongoTemplate.java:2449) ~[spring-data-mongodb-2.1.0.M3.jar:2.1.0.M3] at org.springframework.data.mongodb.core.MongoTemplate.doFind(MongoTemplate.java:2439) ~[spring-data-mongodb-2.1.0.M3.jar:2.1.0.M3] at org.springframework.data.mongodb.core.MongoTemplate.find(MongoTemplate.java:846) ~[spring-data-mongodb-2.1.0.M3.jar:2.1.0.M3] at org.springframework.data.mongodb.core.MongoTemplate.find(MongoTemplate.java:832) ~[spring-data-mongodb-2.1.0.M3.jar:2.1.0.M3] at com.geoapp.satstock.repository.AbstractMongoRepository.find(AbstractMongoRepository.java:55) ~[classes/:na]

      This may happen to other fields which are obviously available within my MongoDB database.

      I have investigated it for a while and here is what I've got in the debugger. This stuff "Collecting data" in IDEA just remains - so there's something that hold it's monitor.

      I've also taken a look at the "Show ConcurrentReferenceHashMap Objects..." contect menu button of the Variables section of debugger on this very proprtyCache item. Here's what I saw:

      As you can see there are other locked ConcurrentReferenceHashMap objects.

       

      Everyone, I don't really have a clue why could this have happened. It's really weird.

      1)  I just realod my server with application and everything's fine. Works like charm,

      2) In a while (only God, and maybe YOU know which while) the application could not be logged in via UserDetailsService because BasicPersistentEntity doen't know that the entity User with "username" field doesn't have this field!

       

      This thing happened not only with username - also with "id" as on the screenshot and many other fields. It happens from time to time that's why I named it "floating".

       

      Please, help anyone!

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mp911de Mark Paluch
                Reporter:
                mike392 mike392
                Last updater:
                Mark Paluch
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: