-
Notifications
You must be signed in to change notification settings - Fork 28
TypeCastException for Root object when spring-boot-devtools dependency available classpath/runtime #150
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
Comments
Do you create your own embedded manager or is injected by Spring? Could you prepare some repository, to see, what are you doing and help us to identify the problem? In general, the issue is that with dev tools, the classes are loaded by a different class loader than the default one. |
I used the storage manager created by spring. But Issue occurs for own embedded manager as-well. Repo is - https://github.com/manideeps/eclipsestore-sample |
There is no issue when app starting for first time or with empty storage directory. But from next time when eclipsestore loading existing from storage directory or root object , its throws TypeCastException |
Thank you for providing us with the demo. I can confirm that this is a bug. |
The reason for this problem is, that the Root object is created with another classloader als application context classloader. This must be fixed. @manideeps
|
It will be fixed with this PR: |
Can you explain in a little more detail on how to get this workaround working please. See also my question with code at: #158 I have commented out the data root in application.properties and modified the main() as per your code above, but now get an error:
|
Hello fschon, Did you try to delete the storage after doing the modifications of your code?
Looking at you code in #158 I found another problem in the ‘Emails.save(String email) method’ : |
This bug was driving me crazy! |
The version 1.3.1 has been released. Please test it again, if any problems occurs, just reopen this issue. |
Bug still present in 1.3.2 EDIT: Bug is indeed resolved by removing devTools dependency from Spring Boot |
Environment Details
Describe the bug
The text was updated successfully, but these errors were encountered: