I'm writing a cordapp where I need to use state classes that require a custom serializer. I have got one defined according to the documentation, but it does not seem to be picked up when I'm trying to run contract tests via corda-node-driver (exactly as per corda-helloworld template).
Here is the class definition (suitably obfuscated):
public class BlahBlahSerializer implements SerializationCustomSerializer<BlahBlah, BlahBlahProxy> {
public IOUState fromProxy(BlahBlahProxy proxy) {
/* impl */
}
public BlahBlahProxy toProxy(BlahBlah state) {
/* impl */
}
}
}
The .class file for the above is in the cordap jar created by the driver, and so are the BlahBlahProxy.class, contract and state classes. All these classes are is in the same package as the state and contract classes themselves.
I have enabled DEBUG logging for corda and I can see a lot of lines like this one
[Test worker] CachingCustomSerializerRegistry - action="Using custom serializer", class=java.security.PublicKey, declaredType=java.security.PublicKey
but there isn't a line for my class.
I wonder if there is anything else I need to do to enable custom serializer to be picked up?
classgraphnot always loading URL attachments (something was wrong where it wouldn't correctly scan them). To fix we updatedclassgraphto 4.8.58 in OS 4.4 (and Enterprise versions) - fowlerrr