Running Registration Client from your IDE

This document details the steps to run the registration client from your local IDE.

Important note for developers using Registration Client 1.1.4 or higher

  • Step 6 and 7 can be ignored if code is from branch 1.1.4 or higher.

  • Initialization.java is the main class.

Important note for developers using Registration Client 1.1.5 or higher

Instructions

  1. Download Java 11 with JavaFx using this link.

  2. Clone MOSIP’s registration repository (https://github.com/mosip/registration-client.git ).

  3. Go inside the directory named as registration.

  4. Build as maven project with mvn clean install -Dgpg.skip or build it in the IDE way.

  5. Make sure that the correct JDK with JavaFx is pointed in the IDE

  6. Traverse the following way and go to Initialization.java
    cd registration-client/src/main/java/io/mosip/registration/controller

  7. [ Not applicable for 1.2.0 version and higher ] Make sure the following value is present in the file on line 39
    private static String upgradeServer = "http://localhost:80";

  8. Copy MANIFEST.MF from reg-client installation directory(when installed as zip) to registration directory.

  9. Then come back to registration-services and add the following snippet into pom.xml file

    <dependency> <groupId>io.mosip.mock.sdk</groupId> <artifactId>mock-sdk</artifactId> <version>1.2.0-SNAPSHOT</version> </dependency>
  10. Import the maven changes again.

  11. Now run the initialization.java inside registration-client project.

Troubleshooting

Below are are some of the issues that you might face during the installation and the steps to overcome them.

[Issue 1] If you had run registration client in your system prior to this in your system, you might get the below error.

This issue occurs due to the manifest file missing based on your db.conf file. 

In order to resolve this you may have to visit the place where you built the registration client prior to this installation and locate the MANIFEST.MF and copy it to the main directory of your cloned registration repository.

 

[Issue 2] Error running 'Initialization': Command line is too long. Shorten command line for Initialization.

This error comes due to the IDE configuration of command line execution. Mostly this issue comes in Intellij IDE.

In order to resolve this issue you need to do the following,

  1. Open ‘edit run/debug configuration’ dialog.

  2. Select edit configurations and select Initialization

  3. As shown in the below image the shorten command line is set to ‘user-local default none’. You need to change that to ‘@argFiles (java9+)’. If that also throws the same error try other options in the dropdown.

     

When IDE is not Configured to locate javafx sdk

Solution: set JVM arguments as below to resolve the issue