We're updating the issue view to help you get more done. 

Dummy state/contract required to load Cordapp as an available attachment

Description

When upgrading an application from CE 3.2 to CE 4.1 an error came up about having the right Cordapp attachments available. The error appeared as:

1 java.util.concurrent.ExecutionException: net.corda.core.CordaRuntimeException: Failed to deserialise group OUTPUTS_GROUP at index 0 in transaction: Internal deserialization failure: java.lang.ClassNotFoundException: com.foo.bar.Clazz

With a root cause of:

1 2 3 [ERROR] 13:14:08-0500 [flow-worker] transactions.TransactionBuilder.addMissingAttachment - The transaction currently built is missing an attachment for class: <class namespace>. Attempted to find a suitable attachment but could not find any in the storage. Please contact the developer of the CorDapp for further instructions. {actor_id=user1, actor_owning_identity=O=<org>, L=<location>, C=US, actor_store_id=NODE_CONFIG, fiber-id=10000001, flow-id=19d56dd8-5435-45e5-828a-088dc475ce9a, invocation_id=bc40a9b9-455c-4831-97e3-41c6b3fd5f74, invocation_timestamp=2019-07-16T18:14:07.189Z, origin=user1, session_id=300c9455-50be-4d16-96a6-9fc2c35a62ee, session_timestamp=2019-07-16T18:14:06.677Z, thread-id=341}

The state class did exist with the correct Cordapp but could not be loaded. A workaround is possible by adding a dummy contract/state in the Cordapp which would force the Corda node to load the Cordapp as an available attachment: https://r3dlg.slack.com/archives/C2EMVPJT0/p1563308528152000

If there are no corda artifacts in the jar Corda will not consider it to be a cordapp. You will need to add a dummy object like this

This dummy class was required to have the Cordapp loaded in CE3.

CVSS Vector

None

Status

Assignee

Unassigned

Reporter

Austin Moothart

Labels

None

CVSS Score

None

Feature Team

Select team

Target Version/s

None

Ported to...

None

Priority

Medium