MorphiaOrg / MorphiaOrg/morphia
error using autoCap and spring-boot-devtools
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.7k
- Forks
- 449
- Avg merge
- 7m
- Merged PRs (30d)
- 10
Description
use version 2.5.0 and jdk 17
-
When using autoCap, an error will be reported when booting. The same problem description is ##3454
-
There seems to be a bug related to the classloader. I used a query with the filter "id $eq xxx", and the error was "Resolved java.lang.IllegalArgumentException: Unable to set the java.lang.String field com.xxx.xxx.Entity.id to com.xxx.xxx.Entity". Through tracing, I found that the classloader of the entity object is RestartClassLoader, but the classloader of PropertyModel and PropertyAccessor is appClassLoader, which leads to a reflection error
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the boot error with autoCap, Spring Boot DevTools, version 2.5.0, and JDK 17. Trace the reported classloader mismatch between RestartClassLoader and appClassLoader during the id query; done means startup and the query no longer produce the reported reflection errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, mongodb, spring-boot
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100