4.8 KiB
Troubleshooting
Milestone releases
When you clone the corda or cordapp-template repos, they will default to the master branch. The master branch is being continuously developed upon, and its features may not align with the state of Corda as described in the docs. Additionally, the master branch of the CorDapp Template may break in response to changes in the main corda repo.
When developing on Corda, you should always check out the latest stable branch instead, by running git checkout release-M7
.
Java issues
Outdated/non-Oracle JDKs
Many users have faced issues when running versions of Java that are either outdated, or are produced by organisations other than Oracle (e.g. OpenJDK). The errors generated by these issues will not always clearly point to the JDK as the cause. If in doubt, check your JDK version by following the instructions here. You can download the latest version of Oracle's JDK here.
"Unresolved reference: javafx"
JavaFX is not bundled with OpenJDK. If you are using OpenJDK and get an 'Unresolved reference: javafx' error, this means that you need to install OpenJFX. Do this by running sudo apt install openjfx
, and possibly sudo apt install libopenjfx-jav
.
IDEA issues
No source files are present
When opening a project in IDEA for the first time, you will need to build the project. You should see "Unlinked Gradle project?" in a pop-up window in the top-right corner or in a popup alert window. It will also appear in the "Event Log" window which can be opened by clicking on "Event Log" at the bottom right of the IDEA window. Find one of these links and click on "Import Gradle Project".
Wait for it to download the dependencies. You may then see another popup titled "Unindexed remote maven repositories found." This won't affect Corda, so you can choose to leave them unindexed.
If still have problems, the JetBrains website has more information on here.
Run configurations are missing
If you opened the Corda project by clicking "Import Project" on the IDEA splash screen rather than clicking "Open", a bug in IDEA will cause it to wipe and recreate the .idea
directory where the run configurations are stored. The fix is simple and doesn't require you to re-import the project: just undelete the files! You can do that by either:
- Running
git checkout .idea/runConfigurations
to redownload the files. - Using the "Version Control" pane in IDEA to undelete the files via the GUI.
IDEA complains about lack of an SDK
If IDEA refuses to open a project because an SDK has not been selected, you may need to fix the project structure. Do this by following these instructions. The correct JDK is often found on a path such as jdk1.8.0_xx…/Contents/Home
. Ensure that you have the Project language level set at 8.
If you are having trouble selecting the correct JDK, the JetBrains website provides the following guidelines.
Kotlin plugin
There are two ways to configure Kotlin in IDEA:
- Via the initial project opening screen, by using the
Configure > Plugins
tab. - From an open IDEA project, by clicking
IDEA -> Preferences ...
(on OS X) orFile -> Settings
(on Windows). Select the Plugins bar to confirm that Kotlin is installed and up-to-date.
If you are still having trouble installing Kotlin, first try upgrading the Kotlin plugin. At the time of writing, you can identify the latest version of the Kotlin plugin on this page.
"Unable to make the module: related gradle configuration was not found. Please, re-import the Gradle project and try again"
This can usually be solved by updating IDEA. Check that you have the latest version here.
Other common issues
“xterm: command not found”
On some machines, running the samples requires xterm. You can download it here.