OpenMRS SDK Setup Server Failure

Application Name: OpenMRS SDK Question: OpenMRS setup get failed while running these commands hence following further steps also. I have tried in each text editor to solve this issue but unable to solve it. Please kindly help me in this! @thembo42

sorry @tasmiya20 i have not gotten this issue well. kindly rephrase with context.

Could you share the command here or the error log using pastebin.com

Yeah Sure! So I am doing a set up of OpenMRS server with the help of this mentioned link Set Up OpenMRS Server with OpenMRS SDK and Docker - Documentation - OpenMRS Wiki But the build gets failed every time.

PS C:\Users\sargu> mvn openmrs-sdk:setup [INFO] Scanning for projects… [INFO] [INFO] ------------------< org.apache.maven:standalone-pom >------------------- [INFO] Building Maven Stub Project (No POM) 1 [INFO] --------------------------------[ pom ]--------------------------------- [INFO] [INFO] — openmrs-sdk:4.5.0:setup (default-cli) @ standalone-pom — Feb 13, 2023 10:14:05 PM org.jline.utils.Log logr WARNING: Unable to create a system terminal, creating a dumb terminal (enable debug logging for more information)

Setting up a new server…

Specify server id (-DserverId) (default: ‘server’): server2

You can setup the following servers:

  1. Distribution
  2. Platform

Which one do you choose? [1/2]: 1

You can deploy the following versions of distribution:

  1. Reference Application 3.0.0-SNAPSHOT
  2. Reference Application 2.13.0-SNAPSHOT
  3. Reference Application 2.12.2
  4. Reference Application 2.11.0
  5. Reference Application 2.10.0
  6. Other…

Which one do you choose? [1/2/3/4/5/6]: 3 [INFO] Configured Artifact: org.openmrs.distro:referenceapplication-package:2.12.2:jar [INFO] Copying referenceapplication-package-2.12.2.jar to C:\Users\sargu\openmrs\server2\openmrs-distro.jar [INFO] Configured Artifact: org.openmrs.web:openmrs-webapp:2.4.3:war [INFO] Copying openmrs-webapp-2.4.3.war to C:\Users\sargu\openmrs\server2\openmrs-2.4.3.war [INFO] Configured Artifact: org.openmrs.module:addresshierarchy-omod:2.14.2:jar [INFO] Configured Artifact: org.openmrs.module:legacyui-omod:1.8.4:jar [INFO] Configured Artifact: org.openmrs.module:openconceptlab-omod:1.2.9:jar [INFO] Configured Artifact: org.openmrs.module:metadatadeploy-omod:1.13.0:jar [INFO] Configured Artifact: org.openmrs.module:reportingrest-omod:1.12.0:jar [INFO] Configured Artifact: org.openmrs.module:owa-omod:1.13.0:jar [INFO] Configured Artifact: org.openmrs.module:fhir2-omod:1.2.2:jar [INFO] Configured Artifact: org.openmrs.module:serialization.xstream-omod:0.2.15:omod [INFO] Configured Artifact: org.openmrs.module:registrationapp-omod:1.24.0:jar [INFO] Configured Artifact: org.openmrs:event-omod:2.10.0:jar [INFO] Configured Artifact: org.openmrs.module:uilibrary-omod:2.0.7:jar [INFO] Configured Artifact: org.openmrs.module:htmlwidgets-omod:1.10.0:jar [INFO] Configured Artifact: org.openmrs.module:dataexchange-omod:1.3.7:jar [INFO] Configured Artifact: org.openmrs.module:appui-omod:1.14.0:jar [INFO] Configured Artifact: org.openmrs.module:allergyui-omod:1.8.4:jar [INFO] Configured Artifact: org.openmrs.module:providermanagement-omod:2.13.0:jar [INFO] Configured Artifact: org.openmrs.module:appointmentschedulingui-omod:1.12.0:jar [INFO] Configured Artifact: org.openmrs.module:attachments-omod:2.5.0:jar [INFO] Configured Artifact: org.openmrs.module:formentryapp-omod:1.4.2:jar [INFO] Configured Artifact: org.openmrs.module:idgen-omod:4.7.0:jar [INFO] Configured Artifact: org.openmrs.module:metadatamapping-omod:1.4.0:jar [INFO] Configured Artifact: org.openmrs.module:htmlformentryui-omod:2.0.0:jar [INFO] Configured Artifact: org.openmrs.module:referencedemodata-omod:1.4.7:jar [INFO] Configured Artifact: org.openmrs.module:emrapi-omod:1.32.0:jar [INFO] Configured Artifact: org.openmrs.module:referenceapplication-omod:2.12.0-SNAPSHOT:jar [INFO] Configured Artifact: org.openmrs.module:htmlformentry-omod:4.1.0:jar [INFO] Configured Artifact: org.openmrs.module:appframework-omod:2.16.0:jar [INFO] Configured Artifact: org.openmrs.module:referencemetadata-omod:2.12.0:jar [INFO] Configured Artifact: org.openmrs.module:reportingui-omod:1.8.0:jar [INFO] Configured Artifact: org.openmrs.module:coreapps-omod:1.34.0:jar [INFO] Configured Artifact: org.openmrs.module:reportingcompatibility-omod:2.0.8:jar [INFO] Configured Artifact: org.openmrs.module:reporting-omod:1.23.0:jar [INFO] Configured Artifact: org.openmrs.module:adminui-omod:1.6.0:jar [INFO] Configured Artifact: org.openmrs.module:registrationcore-omod:1.11.0:jar [INFO] Configured Artifact: org.openmrs.module:appointmentscheduling-omod:1.16.0:jar [INFO] Configured Artifact: org.openmrs.module:atlas-omod:2.2.5:omod [INFO] Configured Artifact: org.openmrs.module:calculation-omod:1.3.0:jar [INFO] Configured Artifact: org.openmrs.module:webservices.rest-omod:2.32.0:jar [INFO] Configured Artifact: org.openmrs.module:spa-omod:1.0.8:jar [INFO] Configured Artifact: org.openmrs.module:uicommons-omod:2.19.0:jar [INFO] Configured Artifact: org.openmrs.module:uiframework-omod:3.22.0:jar [INFO] Configured Artifact: org.openmrs.module:metadatasharing-omod:1.8.0:jar [INFO] Copying addresshierarchy-omod-2.14.2.jar to C:\Users\sargu\openmrs\server2\modules\addresshierarchy-2.14.2.omod [INFO] Copying legacyui-omod-1.8.4.jar to C:\Users\sargu\openmrs\server2\modules\legacyui-1.8.4.omod [INFO] Copying openconceptlab-omod-1.2.9.jar to C:\Users\sargu\openmrs\server2\modules\openconceptlab-1.2.9.omod [INFO] Copying metadatadeploy-omod-1.13.0.jar to C:\Users\sargu\openmrs\server2\modules\metadatadeploy-1.13.0.omod [INFO] Copying reportingrest-omod-1.12.0.jar to C:\Users\sargu\openmrs\server2\modules\reportingrest-1.12.0.omod [INFO] Copying owa-omod-1.13.0.jar to C:\Users\sargu\openmrs\server2\modules\owa-1.13.0.omod [INFO] Copying fhir2-omod-1.2.2.jar to C:\Users\sargu\openmrs\server2\modules\fhir2-1.2.2.omod [INFO] Copying serialization.xstream-omod-0.2.15.omod to C:\Users\sargu\openmrs\server2\modules\serialization.xstream-0.2.15.omod [INFO] Copying registrationapp-omod-1.24.0.jar to C:\Users\sargu\openmrs\server2\modules\registrationapp-1.24.0.omod [INFO] Copying event-omod-2.10.0.jar to C:\Users\sargu\openmrs\server2\modules\event-2.10.0.omod [INFO] Copying uilibrary-omod-2.0.7.jar to C:\Users\sargu\openmrs\server2\modules\uilibrary-2.0.7.omod [INFO] Copying htmlwidgets-omod-1.10.0.jar to C:\Users\sargu\openmrs\server2\modules\htmlwidgets-1.10.0.omod [INFO] Copying dataexchange-omod-1.3.7.jar to C:\Users\sargu\openmrs\server2\modules\dataexchange-1.3.7.omod [INFO] Copying appui-omod-1.14.0.jar to C:\Users\sargu\openmrs\server2\modules\appui-1.14.0.omod [INFO] Copying allergyui-omod-1.8.4.jar to C:\Users\sargu\openmrs\server2\modules\allergyui-1.8.4.omod [INFO] Copying providermanagement-omod-2.13.0.jar to C:\Users\sargu\openmrs\server2\modules\providermanagement-2.13.0.omod [INFO] Copying appointmentschedulingui-omod-1.12.0.jar to C:\Users\sargu\openmrs\server2\modules\appointmentschedulingui-1.12.0.omod [INFO] Copying attachments-omod-2.5.0.jar to C:\Users\sargu\openmrs\server2\modules\attachments-2.5.0.omod [INFO] Copying formentryapp-omod-1.4.2.jar to C:\Users\sargu\openmrs\server2\modules\formentryapp-1.4.2.omod [INFO] Copying idgen-omod-4.7.0.jar to C:\Users\sargu\openmrs\server2\modules\idgen-4.7.0.omod [INFO] Copying metadatamapping-omod-1.4.0.jar to C:\Users\sargu\openmrs\server2\modules\metadatamapping-1.4.0.omod [INFO] Copying htmlformentryui-omod-2.0.0.jar to C:\Users\sargu\openmrs\server2\modules\htmlformentryui-2.0.0.omod [INFO] Copying referencedemodata-omod-1.4.7.jar to C:\Users\sargu\openmrs\server2\modules\referencedemodata-1.4.7.omod [INFO] Copying emrapi-omod-1.32.0.jar to C:\Users\sargu\openmrs\server2\modules\emrapi-1.32.0.omod [INFO] Copying referenceapplication-omod-2.12.0-SNAPSHOT.jar to C:\Users\sargu\openmrs\server2\modules\referenceapplication-2.12.0-SNAPSHOT.omod [INFO] Copying htmlformentry-omod-4.1.0.jar to C:\Users\sargu\openmrs\server2\modules\htmlformentry-4.1.0.omod [INFO] Copying appframework-omod-2.16.0.jar to C:\Users\sargu\openmrs\server2\modules\appframework-2.16.0.omod [INFO] Copying referencemetadata-omod-2.12.0.jar to C:\Users\sargu\openmrs\server2\modules\referencemetadata-2.12.0.omod [INFO] Copying reportingui-omod-1.8.0.jar to C:\Users\sargu\openmrs\server2\modules\reportingui-1.8.0.omod [INFO] Copying coreapps-omod-1.34.0.jar to C:\Users\sargu\openmrs\server2\modules\coreapps-1.34.0.omod [INFO] Copying reportingcompatibility-omod-2.0.8.jar to C:\Users\sargu\openmrs\server2\modules\reportingcompatibility-2.0.8.omod [INFO] Copying reporting-omod-1.23.0.jar to C:\Users\sargu\openmrs\server2\modules\reporting-1.23.0.omod [INFO] Copying adminui-omod-1.6.0.jar to C:\Users\sargu\openmrs\server2\modules\adminui-1.6.0.omod [INFO] Copying registrationcore-omod-1.11.0.jar to C:\Users\sargu\openmrs\server2\modules\registrationcore-1.11.0.omod [INFO] Copying appointmentscheduling-omod-1.16.0.jar to C:\Users\sargu\openmrs\server2\modules\appointmentscheduling-1.16.0.omod [INFO] Copying atlas-omod-2.2.5.omod to C:\Users\sargu\openmrs\server2\modules\atlas-2.2.5.omod [INFO] Copying calculation-omod-1.3.0.jar to C:\Users\sargu\openmrs\server2\modules\calculation-1.3.0.omod [INFO] Copying webservices.rest-omod-2.32.0.jar to C:\Users\sargu\openmrs\server2\modules\webservices.rest-2.32.0.omod [INFO] Copying spa-omod-1.0.8.jar to C:\Users\sargu\openmrs\server2\modules\spa-1.0.8.omod [INFO] Copying uicommons-omod-2.19.0.jar to C:\Users\sargu\openmrs\server2\modules\uicommons-2.19.0.omod [INFO] Copying uiframework-omod-3.22.0.jar to C:\Users\sargu\openmrs\server2\modules\uiframework-3.22.0.omod [INFO] Copying metadatasharing-omod-1.8.0.jar to C:\Users\sargu\openmrs\server2\modules\metadatasharing-1.8.0.omod

Downloading OWAs…

Downloading OWA: org.openmrs.owa:openmrs-owa-sysadmin:1.2 [INFO] Configured Artifact: org.openmrs.owa:sysadmin:1.2:zip [INFO] Copying sysadmin-1.2.zip to C:\Users\sargu\openmrs\server2\owa\sysadmin-1.2.zip

What port would you like your server to use? (default: ‘8080’): 8080

If you want to enable remote debugging by default when running the server, specify the port number here (e.g. 1044). Leave blank to disable debugging. (Do not do this on a production server) (default: ‘no debugging’): 1044

Which database would you like to use?:

  1. MySQL 5.6 and above (requires pre-installed MySQL 5.6 and above)
  2. MySQL 5.6 and above in SDK docker container (requires pre-installed Docker)
  3. Existing docker container (requires pre-installed Docker)
  4. PostgreSQL 8.2 and above

Which one do you choose? [1/2/3/4]: 2

Preparing ‘openmrs-sdk-mysql-v3-2’ DB docker container… [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 01:07 min [INFO] Finished at: 2023-02-13T22:15:09+05:30 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:4.5.0:setup (default-cli) on project standalone-pom: Failed to setup server: Unable to execute mojo: Execution null of goal org.openmrs.maven.plugins:openmrs-sdk-docker-maven-plugin:4.5.0:create-mysql failed: Unsupported protocol scheme found: 'http://127.0.0.1:2375/ → [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] MojoExecutionException - Apache Maven - Apache Software Foundation

Here you go sir.

I believe this will help Get Set Up · GitBook @tasmiya20

Okay sir. Let me check and try it out.

@tasmiya20 if you have MYSQL installed on your computer try option 1

It’s not currently. Will try that too. Thanks @nyyesigahenry

C:\Users\shaam\basicexample>mvn clean install openmrs-sdk:run Java HotSpot™ 64-Bit Server VM warning: ignoring option MaxPermSize=512m; support was removed in 8.0 [INFO] Scanning for projects… [INFO] ------------------------------------------------------------------------ [INFO] Reactor Build Order: [INFO] [INFO] Basicexample [pom] [INFO] Basicexample API [jar] [INFO] Basicexample OMOD [jar] [WARNING] The POM for org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details [WARNING] Failed to retrieve plugin descriptor for org.eclipse.m2e:lifecycle-mapping:1.0.0: Plugin org.eclipse.m2e:lifecycle-mapping:1.0.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 [INFO] [INFO] ------------------< org.openmrs.module:basicexample >------------------- [INFO] Building Basicexample 1.0.0-SNAPSHOT [1/3] [INFO] --------------------------------[ pom ]--------------------------------- [INFO] [INFO] — maven-clean-plugin:2.5:clean (default-clean) @ basicexample — [INFO] [INFO] — buildnumber-maven-plugin:1.1:create (default) @ basicexample — [INFO] Checking for local modifications: skipped. [INFO] Updating project files from SCM: skipped. [INFO] ShortRevision tag detected. The value is ‘6’. [INFO] Executing: cmd.exe /X /C “git rev-parse --verify --short=6 HEAD” [INFO] Working directory: C:\Users\shaam\basicexample [INFO] Storing buildNumber: 0 at timestamp: 1676475481900 [INFO] ShortRevision tag detected. The value is ‘6’. [INFO] Executing: cmd.exe /X /C “git rev-parse --verify --short=6 HEAD” [INFO] Working directory: C:\Users\shaam\basicexample [INFO] Storing buildScmBranch: UNKNOWN_BRANCH [INFO] [INFO] — maven-java-formatter-plugin:0.4:format (default) @ basicexample — [INFO] Using ‘UTF-8’ encoding to format source files. [INFO] Number of files to be formatted: 0 [INFO] [INFO] — maven-install-plugin:2.4:install (default-install) @ basicexample — [INFO] Installing C:\Users\shaam\basicexample\pom.xml to C:\Users\shaam.m2\repository\org\openmrs\module\basicexample\1.0.0-SNAPSHOT\basicexample-1.0.0-SNAPSHOT.pom [INFO] [INFO] ----------------< org.openmrs.module:basicexample-api >----------------- [INFO] Building Basicexample API 1.0.0-SNAPSHOT [2/3] [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] — maven-clean-plugin:2.5:clean (default-clean) @ basicexample-api — [INFO] Deleting C:\Users\shaam\basicexample\api\target [INFO] [INFO] — buildnumber-maven-plugin:1.1:create (default) @ basicexample-api — [INFO] [INFO] — maven-java-formatter-plugin:0.4:format (default) @ basicexample-api — [INFO] Using ‘UTF-8’ encoding to format source files. [INFO] Number of files to be formatted: 8 [INFO] Successfully formatted: 0 file(s) [INFO] Fail to format : 0 file(s) [INFO] Skipped : 8 file(s) [INFO] Approximate time taken: 0s [INFO] [INFO] — maven-resources-plugin:2.6:resources (default-resources) @ basicexample-api — [INFO] Using ‘UTF-8’ encoding to copy filtered resources. [INFO] Copying 5 resources [INFO] Copying 0 resource [INFO] skip non existing resourceDirectory C:\Users\shaam\basicexample\api\src\main\webapp [INFO] skip non existing resourceDirectory C:\Users\shaam\basicexample\api\src\main\webapp [INFO] [INFO] — maven-compiler-plugin:3.1:compile (default-compile) @ basicexample-api — [INFO] Changes detected - recompiling the module! [INFO] Compiling 6 source files to C:\Users\shaam\basicexample\api\target\classes [INFO] [INFO] — maven-resources-plugin:2.6:testResources (default-testResources) @ basicexample-api — [INFO] Using ‘UTF-8’ encoding to copy filtered resources. [INFO] Copying 0 resource [INFO] Copying 0 resource [INFO] [INFO] — maven-compiler-plugin:3.1:testCompile (default-testCompile) @ basicexample-api — [INFO] Changes detected - recompiling the module! [INFO] Compiling 2 source files to C:\Users\shaam\basicexample\api\target\test-classes [INFO] [INFO] — maven-surefire-plugin:2.12.4:test (default-test) @ basicexample-api — [INFO] Surefire report directory: C:\Users\shaam\basicexample\api\target\surefire-reports


T E S T S

Running org.openmrs.module.basicexample.api.BasicexampleServiceTest Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.966 sec Running org.openmrs.module.basicexample.api.dao.BasicexampleDaoTest Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.148 sec

Results :

Tests run: 2, Failures: 0, Errors: 0, Skipped: 1

[INFO] [INFO] — maven-jar-plugin:2.5:jar (default-jar) @ basicexample-api — [INFO] Building jar: C:\Users\shaam\basicexample\api\target\basicexample-api-1.0.0-SNAPSHOT.jar [INFO] [INFO] — maven-jar-plugin:2.5:test-jar (default) @ basicexample-api — [INFO] Building jar: C:\Users\shaam\basicexample\api\target\basicexample-api-1.0.0-SNAPSHOT-tests.jar [INFO] [INFO] — maven-install-plugin:2.4:install (default-install) @ basicexample-api — [INFO] Installing C:\Users\shaam\basicexample\api\target\basicexample-api-1.0.0-SNAPSHOT.jar to C:\Users\shaam.m2\repository\org\openmrs\module\basicexample-api\1.0.0-SNAPSHOT\basicexample-api-1.0.0-SNAPSHOT.jar [INFO] Installing C:\Users\shaam\basicexample\api\pom.xml to C:\Users\shaam.m2\repository\org\openmrs\module\basicexample-api\1.0.0-SNAPSHOT\basicexample-api-1.0.0-SNAPSHOT.pom [INFO] Installing C:\Users\shaam\basicexample\api\target\basicexample-api-1.0.0-SNAPSHOT-tests.jar to C:\Users\shaam.m2\repository\org\openmrs\module\basicexample-api\1.0.0-SNAPSHOT\basicexample-api-1.0.0-SNAPSHOT-tests.jar [INFO] [INFO] ----------------< org.openmrs.module:basicexample-omod >---------------- [INFO] Building Basicexample OMOD 1.0.0-SNAPSHOT [3/3] [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] — maven-clean-plugin:2.5:clean (default-clean) @ basicexample-omod — [INFO] [INFO] — buildnumber-maven-plugin:1.1:create (default) @ basicexample-omod — [INFO] [INFO] — maven-java-formatter-plugin:0.4:format (default) @ basicexample-omod — [INFO] Using ‘UTF-8’ encoding to format source files. [INFO] Number of files to be formatted: 3 [INFO] Successfully formatted: 3 file(s) [INFO] Fail to format : 0 file(s) [INFO] Skipped : 0 file(s) [INFO] Approximate time taken: 0s [INFO] [INFO] — maven-dependency-plugin:2.8:unpack-dependencies (Expand resources) @ basicexample-omod — [INFO] Unpacking C:\Users\shaam\basicexample\api\target\basicexample-api-1.0.0-SNAPSHOT.jar to C:\Users\shaam\basicexample\omod\target\classes with includes “.xml,.properties” and excludes “” [INFO] [INFO] — maven-resources-plugin:2.6:resources (default-resources) @ basicexample-omod — [INFO] Using ‘UTF-8’ encoding to copy filtered resources. [INFO] Copying 2 resources [INFO] Copying 0 resource [INFO] Copying 0 resource to web/module [INFO] Copying 1 resource to web/module [INFO] [INFO] — maven-compiler-plugin:3.1:compile (default-compile) @ basicexample-omod — [INFO] Changes detected - recompiling the module! [INFO] Compiling 2 source files to C:\Users\shaam\basicexample\omod\target\classes [INFO] [INFO] — maven-resources-plugin:2.6:testResources (default-testResources) @ basicexample-omod — [INFO] Using ‘UTF-8’ encoding to copy filtered resources. [INFO] Copying 0 resource [INFO] Copying 0 resource [INFO] [INFO] — maven-compiler-plugin:3.1:testCompile (default-testCompile) @ basicexample-omod — [INFO] Changes detected - recompiling the module! [INFO] Compiling 1 source file to C:\Users\shaam\basicexample\omod\target\test-classes [INFO] [INFO] — maven-surefire-plugin:2.12.4:test (default-test) @ basicexample-omod — [INFO] Surefire report directory: C:\Users\shaam\basicexample\omod\target\surefire-reports


T E S T S

Running org.openmrs.module.basicexample.AdminListExtensionTest Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.329 sec

Results :

Tests run: 2, Failures: 0, Errors: 0, Skipped: 0

[INFO] [INFO] — maven-jar-plugin:2.5:jar (default-jar) @ basicexample-omod — [INFO] Building jar: C:\Users\shaam\basicexample\omod\target\basicexample-1.0.0-SNAPSHOT.jar [INFO] [INFO] — maven-openmrs-plugin:1.0.1:package-module (pack) @ basicexample-omod — [INFO] Packaging OpenMRS module [INFO] Building jar: C:\Users\shaam\basicexample\omod\target\basicexample-1.0.0-SNAPSHOT.omod [INFO] [INFO] — maven-jar-plugin:2.5:test-jar (default) @ basicexample-omod — [INFO] Building jar: C:\Users\shaam\basicexample\omod\target\basicexample-1.0.0-SNAPSHOT-tests.jar [INFO] [INFO] — maven-install-plugin:2.4:install (default-install) @ basicexample-omod — [INFO] Installing C:\Users\shaam\basicexample\omod\target\basicexample-1.0.0-SNAPSHOT.omod to C:\Users\shaam.m2\repository\org\openmrs\module\basicexample-omod\1.0.0-SNAPSHOT\basicexample-omod-1.0.0-SNAPSHOT.jar [INFO] Installing C:\Users\shaam\basicexample\omod\pom.xml to C:\Users\shaam.m2\repository\org\openmrs\module\basicexample-omod\1.0.0-SNAPSHOT\basicexample-omod-1.0.0-SNAPSHOT.pom [INFO] Installing C:\Users\shaam\basicexample\omod\target\basicexample-1.0.0-SNAPSHOT-tests.jar to C:\Users\shaam.m2\repository\org\openmrs\module\basicexample-omod\1.0.0-SNAPSHOT\basicexample-omod-1.0.0-SNAPSHOT-tests.jar [INFO] [INFO] ------------------< org.openmrs.module:basicexample >------------------- [INFO] Building Basicexample 1.0.0-SNAPSHOT [4/3] [INFO] --------------------------------[ pom ]--------------------------------- [WARNING] The POM for org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details [WARNING] Failed to retrieve plugin descriptor for org.eclipse.m2e:lifecycle-mapping:1.0.0: Plugin org.eclipse.m2e:lifecycle-mapping:1.0.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 [INFO] [INFO] — openmrs-sdk-maven-plugin:4.5.0:run (default-cli) @ basicexample — Feb 15, 2023 9:08:16 PM org.jline.utils.Log logr WARNING: Unable to create a system terminal, creating a dumb terminal (enable debug logging for more information)

You have the following servers::

  1. server6
  2. server5
  3. server4
  4. server3
  5. server2
  6. server1
  7. server

Which one do you choose? [1/2/3/4/5/6/7]: 1

Checking if port 8080 is in use… [free] [INFO] OpenMRS module detected, installing before run… [INFO] artifact org.openmrs.module:basicexample-omod: checking for updates from openmrs-repo [INFO] artifact org.openmrs.module:basicexample-omod: checking for updates from archetype [INFO] artifact org.openmrs.module:basicexample-omod: checking for updates from openmrs-repo-thirdparty [INFO] artifact org.openmrs.module:basicexample-omod: checking for updates from central [INFO] Configured Artifact: org.openmrs.module:basicexample-omod:1.0.0-SNAPSHOT:jar [INFO] Copying basicexample-1.0.0-SNAPSHOT.omod to C:\Users\shaam\openmrs\server6\modules\basicexample-1.0.0-SNAPSHOT.omod [info] Module ‘basicexample’ was updated to version ‘1.0.0-SNAPSHOT’

Connect remote debugger via port 1044 Listening for transport dt_socket at address: 1044 Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63) Maven home: C:\Program Files\apache-maven-3.8.6 Java version: 1.8.0_202, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk1.8.0_202\jre Default locale: en_GB, platform encoding: Cp1252 OS name: “windows 10”, version: “10.0”, arch: “amd64”, family: “windows” [INFO] Scanning for projects… [INFO] ------------------------------------------------------------------------ [INFO] Reactor Build Order: [INFO] [INFO] Basicexample [pom] [INFO] Basicexample API [jar] [INFO] Basicexample OMOD [jar] [INFO] [INFO] ------------------< org.openmrs.module:basicexample >------------------- [INFO] Building Basicexample 1.0.0-SNAPSHOT [1/3] [INFO] --------------------------------[ pom ]--------------------------------- [INFO] [INFO] — openmrs-sdk-tomcat7-maven-plugin:4.5.0:run-tomcat (default-cli) @ basicexample — Feb 15, 2023 9:08:35 PM org.jline.utils.Log logr WARNING: Unable to create a system terminal, creating a dumb terminal (enable debug logging for more information)

Using JAVA_HOME: C:\Program Files\Java\jdk1.8.0_202\jre

Using MAVEN_OPTS: -Xmx2048m -XX:MaxPermSize=512m -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=1044

Starting Tomcat…

Feb 15, 2023 9:08:36 PM org.apache.coyote.AbstractProtocol init INFO: Initializing ProtocolHandler [“http-bio-8080”] Feb 15, 2023 9:08:36 PM org.apache.catalina.core.StandardService startInternal INFO: Starting service [Tomcat] Feb 15, 2023 9:08:36 PM org.apache.catalina.core.StandardEngine startInternal INFO: Starting Servlet Engine: Apache Tomcat/7.0.109 Feb 15, 2023 9:08:36 PM org.apache.catalina.startup.TldConfig execute INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time. Feb 15, 2023 9:08:36 PM org.apache.catalina.util.SessionIdGeneratorBase createSecureRandom WARNING: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [234] milliseconds. Feb 15, 2023 9:08:38 PM org.apache.catalina.startup.ContextConfig getDefaultWebXmlFragment INFO: No global web.xml found Feb 15, 2023 9:08:38 PM org.apache.catalina.deploy.WebXml setVersion WARNING: Unknown version string [4.0]. Default version will be used. Feb 15, 2023 9:08:45 PM org.apache.catalina.startup.TaglibUriRule body INFO: TLD skipped. URI: Oracle Java Technologies | Oracle is already defined Feb 15, 2023 9:08:45 PM org.apache.catalina.startup.TaglibUriRule body INFO: TLD skipped. URI: Oracle Java Technologies | Oracle is already defined Feb 15, 2023 9:08:45 PM org.apache.catalina.startup.TaglibUriRule body INFO: TLD skipped. URI: Oracle Java Technologies | Oracle is already defined Feb 15, 2023 9:08:45 PM org.apache.catalina.startup.TaglibUriRule body INFO: TLD skipped. URI: Oracle Java Technologies | Oracle is already defined Feb 15, 2023 9:08:45 PM org.apache.catalina.startup.TaglibUriRule body INFO: TLD skipped. URI: Oracle Java Technologies | Oracle is already defined Feb 15, 2023 9:08:45 PM org.apache.catalina.startup.TaglibUriRule body INFO: TLD skipped. URI: Oracle Java Technologies | Oracle is already defined Feb 15, 2023 9:08:45 PM org.apache.catalina.startup.TaglibUriRule body INFO: TLD skipped. URI: Oracle Java Technologies | Oracle is already defined Feb 15, 2023 9:08:45 PM org.apache.catalina.startup.TaglibUriRule body INFO: TLD skipped. URI: http://jakarta.apache.org/taglibs/standard/permittedTaglibs is already defined Feb 15, 2023 9:08:45 PM org.apache.catalina.startup.TaglibUriRule body INFO: TLD skipped. URI: http://jakarta.apache.org/taglibs/standard/scriptfree is already defined Feb 15, 2023 9:08:45 PM org.apache.catalina.startup.TaglibUriRule body INFO: TLD skipped. URI: Oracle Java Technologies | Oracle is already defined Feb 15, 2023 9:08:45 PM org.apache.catalina.startup.TaglibUriRule body INFO: TLD skipped. URI: Oracle Java Technologies | Oracle is already defined Feb 15, 2023 9:08:45 PM org.apache.catalina.startup.TaglibUriRule body INFO: TLD skipped. URI: Oracle Java Technologies | Oracle is already defined Feb 15, 2023 9:08:45 PM org.apache.catalina.startup.TaglibUriRule body INFO: TLD skipped. URI: Oracle Java Technologies | Oracle is already defined Feb 15, 2023 9:08:45 PM org.apache.catalina.startup.TaglibUriRule body INFO: TLD skipped. URI: Oracle Java Technologies | Oracle is already defined Feb 15, 2023 9:08:45 PM org.apache.catalina.startup.TaglibUriRule body INFO: TLD skipped. URI: Oracle Java Technologies | Oracle is already defined Feb 15, 2023 9:08:45 PM org.apache.catalina.core.ApplicationContext log INFO: No Spring WebApplicationInitializer types detected on classpath WARN - OpenmrsUtil.getRuntimePropertiesFilePathName(2145) |2023-02-15T21:08:46,442| Unable to find a runtime properties file at C:\Users\shaam\basicexample\openmrs-runtime.properties WARN - OpenmrsUtil.getRuntimePropertiesFilePathName(2173) |2023-02-15T21:08:46,458| Unable to find properties file: C:\Users\shaam\openmrs\server6\openmrs-runtime.properties WARN - OpenmrsUtil.getRuntimeProperties(2106) |2023-02-15T21:08:46,458| Unable to find a runtime properties file. Initial setup is needed. View the webapp to run the setup wizard. WARN - OpenmrsUtil.getRuntimePropertiesFilePathName(2145) |2023-02-15T21:08:46,807| Unable to find a runtime properties file at C:\Users\shaam\basicexample\openmrs-runtime.properties WARN - OpenmrsUtil.getRuntimePropertiesFilePathName(2173) |2023-02-15T21:08:46,807| Unable to find properties file: C:\Users\shaam\openmrs\server6\openmrs-runtime.properties WARN - OpenmrsUtil.getRuntimeProperties(2106) |2023-02-15T21:08:46,807| Unable to find a runtime properties file. Initial setup is needed. View the webapp to run the setup wizard.

OpenMRS is ready for you at http://localhost:8080/openmrs/ Feb 15, 2023 9:08:46 PM org.apache.coyote.AbstractProtocol start INFO: Starting ProtocolHandler [“http-bio-8080”] WARN - OpenmrsUtil.getRuntimePropertiesFilePathName(2145) |2023-02-15T21:09:07,085| Unable to find a runtime properties file at C:\Users\shaam\basicexample\openmrs-runtime.properties WARN - OpenmrsUtil.getRuntimePropertiesFilePathName(2173) |2023-02-15T21:09:07,085| Unable to find properties file: C:\Users\shaam\openmrs\server6\openmrs-runtime.properties Loading class com.mysql.jdbc.Driver'. This is deprecated. The new driver class is com.mysql.cj.jdbc.Driver’. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary. INFO - ChangeLogDetective.getInitialLiquibaseSnapshotVersion(69) |2023-02-15T21:09:08,176| identifying the Liquibase snapshot version that had been used to initialize the OpenMRS database… INFO - ChangeLogDetective.getInitialLiquibaseSnapshotVersion(82) |2023-02-15T21:09:08,183| looking for un-run change sets in snapshot version ‘2.3.x’ INFO - Slf4jLogger.info(42) |2023-02-15T21:09:10,980| Creating database history table with name: MYSQL.liquibasechangelog INFO - Slf4jLogger.info(42) |2023-02-15T21:09:11,048| CREATE TABLE MYSQL.liquibasechangelog (ID VARCHAR(255) NOT NULL, AUTHOR VARCHAR(255) NOT NULL, FILENAME VARCHAR(255) NOT NULL, DATEEXECUTED datetime NOT NULL, ORDEREXECUTED INT NOT NULL, EXECTYPE VARCHAR(10) NOT NULL, MD5SUM VARCHAR(35) NULL, DESCRIPTION VARCHAR(255) NULL, COMMENTS VARCHAR(255) NULL, TAG VARCHAR(255) NULL, LIQUIBASE VARCHAR(20) NULL, CONTEXTS VARCHAR(255) NULL, LABELS VARCHAR(255) NULL, DEPLOYMENT_ID VARCHAR(10) NULL) WARN - InitializationFilter$InitializationCompletion$1.run(1709) |2023-02-15T21:09:11,062| Error while trying to update to the latest database version liquibase.exception.DatabaseException: Table ‘liquibasechangelog’ already exists [Failed SQL: (1050) CREATE TABLE MYSQL.liquibasechangelog (ID VARCHAR(255) NOT NULL, AUTHOR VARCHAR(255) NOT NULL, FILENAME VARCHAR(255) NOT NULL, DATEEXECUTED datetime NOT NULL, ORDEREXECUTED INT NOT NULL, EXECTYPE VARCHAR(10) NOT NULL, MD5SUM VARCHAR(35) NULL, DESCRIPTION VARCHAR(255) NULL, COMMENTS VARCHAR(255) NULL, TAG VARCHAR(255) NULL, LIQUIBASE VARCHAR(20) NULL, CONTEXTS VARCHAR(255) NULL, LABELS VARCHAR(255) NULL, DEPLOYMENT_ID VARCHAR(10) NULL)] at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:430) ~[liquibase-core-3.10.2.jar:?] at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:87) ~[liquibase-core-3.10.2.jar:?] at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:159) ~[liquibase-core-3.10.2.jar:?] at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:139) ~[liquibase-core-3.10.2.jar:?] at liquibase.changelog.StandardChangeLogHistoryService.init(StandardChangeLogHistoryService.java:284) ~[liquibase-core-3.10.2.jar:?] at org.openmrs.util.DatabaseUpdater.getLiquibase(DatabaseUpdater.java:428) ~[openmrs-api-2.4.3.jar:?] at org.openmrs.util.DatabaseUpdater.getLiquibase(DatabaseUpdater.java:377) ~[openmrs-api-2.4.3.jar:?] at org.openmrs.util.DatabaseUpdaterLiquibaseProvider.getLiquibase(DatabaseUpdaterLiquibaseProvider.java:25) ~[openmrs-api-2.4.3.jar:?] at org.openmrs.liquibase.ChangeLogDetective.getInitialLiquibaseSnapshotVersion(ChangeLogDetective.java:88) ~[openmrs-api-2.4.3.jar:?] at org.openmrs.web.filter.initialization.InitializationFilter$InitializationCompletion$1.run(InitializationFilter.java:1688) [openmrs-web-2.4.3.jar:?] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_202] Caused by: java.sql.SQLSyntaxErrorException: Table ‘liquibasechangelog’ already exists at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120) ~[mysql-connector-java-8.0.21.jar:8.0.21] at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97) ~[mysql-connector-java-8.0.21.jar:8.0.21] at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) ~[mysql-connector-java-8.0.21.jar:8.0.21] at com.mysql.cj.jdbc.StatementImpl.executeInternal(StatementImpl.java:764) ~[mysql-connector-java-8.0.21.jar:8.0.21] at com.mysql.cj.jdbc.StatementImpl.execute(StatementImpl.java:648) ~[mysql-connector-java-8.0.21.jar:8.0.21] at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:426) ~[liquibase-core-3.10.2.jar:?] … 10 more

Hurray! Setup Success… :partying_face:

Thanks to all :grinning:

@thembo42 , @joshua , @nyyesigahenry , @parthis

2 Likes

it’s my pleasure

you wellcome

Fixed the issue.

But If I want to be deployed on Docker?

hello @jgonzalezans you can get started with Installing OpenMRS - Documentation - OpenMRS Wiki