RPC client of Corda Enterprise doesn't work with Spring Boot

Description

Corda Enterprise GA RPC Client doesn't work from within the Spring Boot container and potentially other containers which use classloader level isolation.

This happens because the serialisation engine uses System Class Loader for class lookup: https://github.com/corda/enterprise/blob/eee2563bfafecbcda8c53563983d8a938511d6d7/client/rpc/src/main/kotlin/net/corda/client/rpc/internal/serialization/amqp/AMQPClientSerializationScheme.kt#L55 and in such containers as Spring Boot, application level classes are not visible to the System Class Loader. Due to that, any RPC call fails with a serialisation exception (see below).

This issue has been raised by NTTData, who are one of the first ones who tried the GA in action. temporarily fixed the issue by creating a custom version of the `corda-serialisation.jar` for NTTData, which uses thread-local classloader instead.

This bug is particularly critical as it will affect every spring-boot application.

No easy workaround has been discover so far.

To reproduce the issue - make any RPC call from a spring-boot application.

Exception:

Assignee

Stefano Franz

Reporter

Ivan Schasny

Labels

None

Priority

Medium

Fix versions

None

Ported to...

None

Feature Team

Corda Core

CVSS Vector

None

Severity

High

Affects versions

Configure