Uploaded image for project: 'Corda'
  1. CORDA-2550

Explicit contract upgrade sample fails upon initiation (ClassNotFoundException)

    Details

    • Type: Bug
    • Status: Done (View workflow)
    • Priority: High
    • Resolution: Done
    • Affects versions: Corda 4 RC03
    • Fix versions: Corda 4.1
    • Components: None
    • Labels:
      None
    • Severity:
      Medium
    • Target Version/s:
    • Feature Team:
      Versioning and Modules
    • Sprint:
      V&M Sprint 5

      Description

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

      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:

      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:

      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:?]
      

        Attachments

          Activity

            People

            • Assignee:
              Tudor.Malene Tudor Malene
              Reporter:
              Jose.Coll Jose Coll
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: