-
Notifications
You must be signed in to change notification settings - Fork 45
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
ClassCastException #7
Comments
Ok, I have found out the root cause of the issue. It happened because I used spring-boot-devtools which would restart the application every time you save a file. So the devtools artifact has its own class loader that pretty much makes all the objects during the development, instead of sun.misc.Launcher$AppClassLoader. Would be great to know if there is a way to make it work with the devtools. Not a priority though. |
Hi, Sorry could not get to studying the problem, been busy with work. Just wanted to mention As far as I remember have not used any custom classloader in JsonDB. I do know that there is a user who has used JsonDB with a lot of custom classloader code and it works fine. |
I have not used spring-boot-devtools myself, but i will see if i can try it out over the weekend. |
If you suspect classloaders are causing this, then what if you saved the classloader used at time of instantiation of JsonDBTemplate Would this maybe solve your problem |
I think that fiddling with class loaders just for the development environment is not worth it. I have disabled boot-dev, and I think I am fine with that. |
@oiale @FarooqKhan @SJKA Please check: https://github.com/vince-bickers/spring-data-jsondb. It's still WIP, but basic Repository and REST integration is working. |
@vince-bickers for creating this let me know when it is complete I can add this detail to the webpage and provide links to your repository. Optionally if you are willing we can move this under the jsondb organization on github you can still own it. |
Hello again,
I am having a different issue now.
Same bean
and database class
I also have a Spring Controller
So when I call http://localhost/test/a I get
where the
at Database.a()
points to the linefor (Bean bean : all)
.I was looking online and people suggest that somehow I may have several class loaders and somehow I may be casting classes from different class loaders. Have you ever had this, and how do I obtain more information for debug?
Spring boot starter parent: 1.5.8.RELEASE
Version: 1.0.64
The text was updated successfully, but these errors were encountered: