I was trying to serialized a class (DTO) to be used in send and receive in flows.My DTO class is not in the same module as flows. I am getting the below errors
1.With @CordaSerializable annotation , My DTO class is not getting serialized and it is throwing
java.io.NotSerializableException: Class "class com.e_mobility.dto.dashboard.DashboardDTO" is not on the whitelist or annotated with @CordaSerializable
With manual whitelisting like below
class CustomSerializationWhiteList : SerializationWhitelist { override val whitelist: List<Class<*>> = listOf(DTO::class.java) }
I am getting this error during runtime
net.corda.core.serialization.internal.MissingSerializerException: Unable to create an object serializer for type class com.e_mobility.dto.dashboard.DashboardDTO:
Mandatory constructor parameters [arg0, arg1, arg2, arg3, arg4, arg5, arg6] are missing from the readable properties []
Either provide getters or readable fields for [arg0, arg1, arg2, arg3, arg4, arg5, arg6], or provide a custom serializer for this type
Please help me to resolve this error. (edited)