Closed chriskazakos closed 6 years ago
Tried to reproduce it but it works with SpringBoot-M7/SDN-5.0.2 (and of course SpringBoot-M5/SDN-5.0.0). Can you provide a sample or a test method with all needed configuration, if there is any?
I had the same issue and could track it down to a spring-dev-tools related thing. If spring-dev-tools is enabled the current entity will be loaded in spring dev-tools class loader but meta data in MetaData refers to Class from Sun class loader. Thus identityField.readProperty(entity);
fails, because identifiyField
refers to a Class from Sun ClassLoader and entity.getClass()
refers to a Class from Spring Dev Tools ClassLoader.
Might be related to #374 but this issue was solved in 3.0.2 which is the version used by @helocabalus and me.
I could not find any working solution with a previous version auf neither spring boot nor neo4j ogm (tried several combinations of spring boot M5-M7 and neo4j-ogm 3.0.0/3.0.1/3.0.2)
Thanks for the detailed information. We will investigate this.
Found the cause for this issue between M5 working and M6/7 not working.
We upgraded fast classpath scanner library between 3.0.0 and 3.0.1 and now it gives the domain class loaded by Laucher$AppClassLoader, instead of one loaded by RestartClassLoader
.
We have been playing Whac-A-Mole with these reload issues.
Testing this manually for each release is not feasible, integration tests for these are hard to write and maintain, environment specific and usually flaky.
Suggestions how to improve this welcome.
This will be part of the upcoming 3.1.0 release that will be API compatible with the latest SDN release.
The issue happens when loading a node or after saving it (probably when it tries to set the id)
This issue seems not to exist when using spring boot 2.0.0.M5.
Current Behavior
Fails with the following exception:
Your Environment