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
A separate registration client repository has been created (https://github.com/mosip/registration-client)
Instructions
Download Java 11 with JavaFx using this link.
Clone MOSIP’s registration repository (https://github.com/mosip/registration-client.git ).
Go inside the directory named as registration.
Build as maven project with
mvn clean install -Dgpg.skip
or build it in the IDE way.Make sure that the correct JDK with JavaFx is pointed in the IDE
Traverse the following way and go to Initialization.java
cd registration-client/src/main/java/io/mosip/registration/controller[ 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";Copy MANIFEST.MF from reg-client installation directory(when installed as zip) to registration directory.
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>
Import the maven changes again.
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,
Open ‘edit run/debug configuration’ dialog.
Select edit configurations and select Initialization
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.
[Issue 3] Compile Error : javafx packages not available in eclipse IDE
When IDE is not Configured to locate javafx sdk
Solution: set JVM arguments as below to resolve the issue
MOSIP thanks Michael Marshal from Sri Lanka (SLUDI) for contributing to this page.