eventuate-tram/eventuate-tram-sagas

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()

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.

Got it, thank you