Open
Description
One of our Cordapps 3rd party library loads classes dynamically using following code:
ClassLoader loader = Thread.currentThread().getContextClassLoader();
return loader != null ? loader.loadClass(fullName) : Class.forName(fullName);
Normally it does not cause any issue on running flow, maybe because of following line in FlowStateMachineImpl, but I'm not sure.
Problem is that when flow is running and node is restarted, then on startup the flow is resumed and it fails with ClassNotFoundException for requested class from the cordapp - Thread.contextClassLoader does not have any of cordapp classes, only Corda classes.
Maybe when resuming the flow in such case we should set Thread.contextClassLoader as it was set originally in FlowStateMachineImpl.kt#L349 ?
Metadata
Metadata
Assignees
Labels
No labels