Skip to content
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

Spring Boot Dev Tools causes IllegalArgumentException #729

Closed
johnfreier opened this issue Jan 3, 2020 · 2 comments
Closed

Spring Boot Dev Tools causes IllegalArgumentException #729

johnfreier opened this issue Jan 3, 2020 · 2 comments

Comments

@johnfreier
Copy link

johnfreier commented Jan 3, 2020

Current Behavior

I'm not sure if this is an OGM issue or not, but I thought I would call it out because it took some time to debug and figure out.

When Spring-Boot Dev Tools dependency(2.2.2.RELEASE) is included in my pom.xml with OGM version 3.2.3+ I receive mapping issues from OGM, and an IllegalArgumentException exception is thrown whenever I try and access an OGM mapped object.

This does not happen with version 3.2.2.

Steps to Reproduce (for bugs)

Include Spring Boot Dev Tools in the pom.xml

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>

Your Environment

  • Spring Boot Starter Parent: 2.2.2.RELEASE
  • OGM Version used: 3.2.3+
  • Java Version used: 1.8
  • Neo4J Version used: 3.2.6
  • Bolt Driver Version used (if applicable):
  • Operating System and Version: OSX
  • Link to your project:
@michael-simons
Copy link
Collaborator

Please share your domain object.

@michael-simons michael-simons self-assigned this Jan 6, 2020
michael-simons added a commit that referenced this issue Jan 6, 2020
This change replaces ClassGraphs class loading facility with the
previous solution of using the current threads class loader, as the
integration with Spring Boot's devtools stopped working in ClassGraph
4.8.19.

It also fixes two places where a previous loaded domain class is loaded
again just to determine fields.

Last, it upgrades ClassGraph to the latest version.
michael-simons added a commit that referenced this issue Jan 7, 2020
This change replaces ClassGraphs class loading facility with the
previous solution of using the current threads class loader, as the
integration with Spring Boot's devtools stopped working in ClassGraph
4.8.19.

It also fixes two places where a previous loaded domain class is loaded
again just to determine fields.

Last, it upgrades ClassGraph to the latest version.
michael-simons added a commit that referenced this issue Jan 7, 2020
This change replaces ClassGraphs class loading facility with the
previous solution of using the current threads class loader, as the
integration with Spring Boot's devtools stopped working in ClassGraph
4.8.19.

It also fixes two places where a previous loaded domain class is loaded
again just to determine fields.

Last, it upgrades ClassGraph to the latest version.
michael-simons added a commit that referenced this issue Jan 7, 2020
This a backport of 63d5d75 that only contains the improvements regarding additional and superflous load of classes.
@michael-simons
Copy link
Collaborator

Thanks for the report. We use a library called ClassGraph to scan classes eligible for mapping. That library allows for loading those classes as well and in the latest update, we did this. However, the library does not work with the Restart Class Loader of Devtools anymore (see related issue here classgraph/classgraph#396), so we decided to load the scanned classes our selves again.

Fix will be available in the next patch release. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants