Upgrading a CorDapp to Corda Enterprise Edition 4.9

Before upgrading to Corda Enterprise Edition 4.9, upgrade your CorDapp to Corda Community Edition 4.9. See Upgrading CorDapps to newer platform versions for detailed instructions.

You don’t need to re-compile your CorDapp to Corda Enterprise for it to run on Corda Enterprise. If you want your CorDapp to be compatible with nodes running open source, then compile it against Corda Community Edition (formerly Open Source) 4.x. However, if you want to leverage specific features of Corda Enterprise, such as third-party commercial database support, and don’t envisage your CorDapp being run in an open source production environment, then follow the re-compiling for Corda Enterprise Edition 4.9 guide.

To re-compile your CorDapp for Corda Enterprise Edition 4.9, you need to:

  1. Update your Gradle build file as follows.
corda_release_distribution = 'com.r3.corda'
corda_core_release_distribution = 'net.corda'
corda_release_version = '4.9'
corda_core_release_version = '4.9'
corda_gradle_plugins_version = '5.0.12'
kotlin_version = '1.2.71'
quasar_version = '0.7.14_r3'
  1. Specify an additional repository entry pointing to the location of the Corda Enterprise distribution and Corda dependencies. Any dependencies on corda-core and/or corda-serialization must use the corda_core_release_distribution and corda_core_release_version. As Corda is moving to an open core model, these core APIs are only available in open source and need to be imported from there. Therefore, a repository entry pointing to a matching Corda Community Edition version is required.

  2. Update your quasar.jar file. If your project is based on one of the official CordApp templates, you’ll likely have a lib/quasar.jar file checked in. You’ll only use this if you use the JUnit runner in IntelliJ. In the latest release of the CorDapp templates, this directory has been removed.

For example:

repositories {
    // Example for Corda Enterprise
    maven {
        credentials {
            username "username"
            password "XXXXX"
        }
        url 'https://artifactory.mycompany.com/artifactory/corda-enterprise'
    }

    // Dependency on Corda Community Edition
    maven { url 'https://download.corda.net/maven/corda-releases' }
    maven { url 'https://download.corda.net/maven/corda-dependencies' }

    // Corda dependencies for the patched Quasar version
    maven { url "https://download.corda.net/maven/corda-dependencies" } // access to the patched Quasar version
}

You can do either of the following:

  • Upgrade your quasar.jar file to the version consistent with your Corda version.
  • Delete your lib directory and switch to using the Gradle test runner.

You can find instructions for both options in Running tests in IntelliJ.

  1. Check you’re using Corda Gradle plugins version 5.0.12, and that Corda Enterprise dependencies are referenced with the right distribution.

For example:

cordaCompile "net.corda:corda-core:$corda_release_version"
testCompile "net.corda:corda-node-driver:$corda_release_version"

Becomes:

cordaCompile "$corda_core_release_distribution:corda-core:$corda_core_release_version" // core depends on open source
testCompile "$corda_release_distribution:corda-node-driver:$corda_release_version"     // node based tests from Enterprise

Corda Enterprise Edition 4.4 moves towards an open core strategy. Therefore, the common APIs are only available in Corda open source, and Corda Enterprise has a binary dependency on the matching open source version. As a result, any CorDapps written against Corda Enterprise Edition 4.4 or later will have to depend on the open source version of corda-core.

Therefore, you have to add the following variables to your build configuration:

corda_core_release_distribution = 'net.corda'
corda_core_release_version = '4.9'

Any dependency on corda-core (or corda-serialization) has to use these new variables to depend on the open source version of those libraries, as follows:

cordaCompile "$corda_release_distribution:corda-core:$corda_release_version"

Becomes:

cordaCompile "$corda_core_release_distribution:corda-core:$corda_core_release_version"

You can only upgrade to Corda Enterprise Edition 4.9 from a previous 4.x version. To upgrade from 3.x, first upgrade to 4.x and then to 4.9. For example, 3.3 to 4.5, and then 4.5 to 4.9.

Was this page helpful?

Thanks for your feedback!

Chat with us

Chat with us on our #docs channel on slack. You can also join a lot of other slack channels there and have access to 1-on-1 communication with members of the R3 team and the online community.

Propose documentation improvements directly

Help us to improve the docs by contributing directly. It's simple - just fork this repository and raise a PR of your own - R3's Technical Writers will review it and apply the relevant suggestions.

We're sorry this page wasn't helpful. Let us know how we can make it better!

Chat with us

Chat with us on our #docs channel on slack. You can also join a lot of other slack channels there and have access to 1-on-1 communication with members of the R3 team and the online community.

Create an issue

Create a new GitHub issue in this repository - submit technical feedback, draw attention to a potential documentation bug, or share ideas for improvement and general feedback.

Propose documentation improvements directly

Help us to improve the docs by contributing directly. It's simple - just fork this repository and raise a PR of your own - R3's Technical Writers will review it and apply the relevant suggestions.