MorphiaOrg / MorphiaOrg/morphia

error using autoCap and spring-boot-devtools

Open
#3,786 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Waiting for Response
Dominant language
Java
Stars
1.7k
Forks
449
Avg merge
7m
Merged PRs (30d)
10

Description

use version 2.5.0 and jdk 17

  1. When using autoCap, an error will be reported when booting. The same problem description is ##3454

  2. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.