Make sagas work with devTools
cer opened this issue · 3 comments
cer commented
Problem:
- devtools uses it's own classloader
- eventuate libraries use a different classloader
- DevTools can cause errors such as java.lang.ClassCastException: class X cannot be cast to class X - X and X are from different class loaders
This is the likely solution: spring-projects/spring-boot#3805
Eventuate libraries (including JSonMapper) need to use ThreadLocal.getThread().getContextClassLoader()
dartartem commented
@cer Chris, could you please clarify, should I jast replace explicit classloader usage by ThreadLocal.getThread().getContextClassLoader(), or there is something else?
Btw, I found only these entries:
cer commented
AFAIK as I know that's all that's required.
I'd first try to reproduce the problem by including Devtools and then verify that the change fixes the problem.
dartartem commented
Got it, thank you