You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 15, 2020. It is now read-only.
In https://github.com/MikkelThomsen/samples I have added an example of a contract that uses a custom data class and runs a MockNetwork using that class. See cordapp-example/workflows-kotlin/src/test/kotlin/com/example/test/contract/IOUContractTests.kt.
The data class is whitelisted, but not annotated with @CordaSerializable.
When running the test, it fails with Class "class com.example.data.IOUData" is not on the whitelist or annotated with @CordaSerializable.'. If I annotate it, the test succeeds.
I have added a META-INF/services/net.corda.core.serialization.SerializationWhitelist with a reference to the class that extends SerializationWhitelist.
As far as i can see, JarScanningCordappLoader#findWhitelists checks whether the whitelist has the same location as the CorDapp, but the whitelist implementation is picked up from the classpath instead. The expected location is within the created mockNetwork folder and not the project classpath.
Is there something in either the gradle dependency setup or the whitelist specification that I am doing wrong?
Sincerely
Mikkel
The text was updated successfully, but these errors were encountered:
Hi.
In https://github.com/MikkelThomsen/samples I have added an example of a contract that uses a custom data class and runs a MockNetwork using that class. See
cordapp-example/workflows-kotlin/src/test/kotlin/com/example/test/contract/IOUContractTests.kt
.The data class is whitelisted, but not annotated with
@CordaSerializable
.When running the test, it fails with
Class "class com.example.data.IOUData" is not on the whitelist or annotated with @CordaSerializable.'
. If I annotate it, the test succeeds.I have added a
META-INF/services/net.corda.core.serialization.SerializationWhitelist
with a reference to the class that extendsSerializationWhitelist
.As far as i can see,
JarScanningCordappLoader#findWhitelists
checks whether the whitelist has the same location as the CorDapp, but the whitelist implementation is picked up from the classpath instead. The expected location is within the created mockNetwork folder and not the project classpath.Is there something in either the gradle dependency setup or the whitelist specification that I am doing wrong?
Sincerely
Mikkel
The text was updated successfully, but these errors were encountered: