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

Explicit contract upgrade sample fails upon initiation (ClassNotFoundException)

Description

The following exception is through at the CRaSH console level for Party A:

1 86497eb6-d5a1-4493-8a59-b18857b02b45 Initiate user1 java.lang.ClassNotFoundException: com.upgrade.new.NewContract

I can confirm the correct CorDapp jars are loaded at startup time (as per the log output), and correct deployment in nodes /cordapps directory:

1 2 3 4 5 6 7 Joses-MacBook-Pro:contract-upgrades josecoll$ ls -l build/nodes/PartyA/cordapps/ total 1032 drwxr-xr-x 2 josecoll staff 64 1 Feb 17:45 config -rw-r--r-- 1 josecoll staff 2406 1 Feb 17:46 contract-upgrades-0.1.jar -rw-r--r-- 1 josecoll staff 13179 1 Feb 17:46 cordapp-0.1.jar -rw-r--r-- 1 josecoll staff 496755 1 Feb 17:46 cordapp-contracts-states-0.1.jar -rw-r--r-- 1 josecoll staff 7873 1 Feb 17:46 cordapp-new-contract-0.1.jar

Actual exception thrown:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 java.lang.ClassNotFoundException: com.upgrade.new.NewContract at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[?:1.8.0_171] at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_171] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) ~[?:1.8.0_171] at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_171] at net.corda.core.transactions.ContractUpgradeLedgerTransaction.loadUpgradedContract(ContractUpgradeTransactions.kt:305) ~[corda-core-4.0-RC03.jar:?] at net.corda.core.transactions.ContractUpgradeLedgerTransaction.<init>(ContractUpgradeTransactions.kt:250) ~[corda-core-4.0-RC03.jar:?] at net.corda.core.transactions.ContractUpgradeWireTransaction.resolve(ContractUpgradeTransactions.kt:116) ~[corda-core-4.0-RC03.jar:?] at net.corda.core.transactions.SignedTransaction.resolveContractUpgradeTransaction(SignedTransaction.kt:287) ~[corda-core-4.0-RC03.jar:?] at net.corda.core.transactions.SignedTransaction.verifyContractUpgradeTransaction(SignedTransaction.kt:195) ~[corda-core-4.0-RC03.jar:?] at net.corda.core.transactions.SignedTransaction.verify(SignedTransaction.kt:179) ~[corda-core-4.0-RC03.jar:?] at net.corda.core.flows.AbstractStateReplacementFlow$Instigator.call(AbstractStateReplacementFlow.kt:65) ~[corda-core-4.0-RC03.jar:?] at net.corda.core.flows.AbstractStateReplacementFlow$Instigator.call(AbstractStateReplacementFlow.kt:50) ~[corda-core-4.0-RC03.jar:?] at net.corda.node.services.statemachine.FlowStateMachineImpl.run(FlowStateMachineImpl.kt:228) ~[corda-node-4.0-RC03.jar:?] at net.corda.node.services.statemachine.FlowStateMachineImpl.run(FlowStateMachineImpl.kt:45) ~[corda-node-4.0-RC03.jar:?]

Status

Assignee

Tudor Malene

Reporter

Jose Coll

Priority

High

Labels

None

Severity

Medium

Fix versions

Ported to...

None

Feature Team

Versioning and Modules

Sprint

None

Affects versions

Corda 4 RC03