While installing Openmrs SDK i got an error after running mvn clean install openmrs-sdk:run

Downloading: http://repo.maven.apache.org/maven2/org/openmrs/maven/plugins/openmrs-sdk-maven-plugin/maven-metadata.xml Downloaded: http://repo.maven.apache.org/maven2/org/openmrs/maven/plugins/openmrs-sdk-maven-plugin/maven-metadata.xml (882 B at 1.7 KB/sec) Downloaded: http://mavenrepo.openmrs.org/nexus/content/repositories/public/org/openmrs/maven/plugins/openmrs-sdk-maven-plugin/maven-metadata.xml (368 B at 0.5 KB/sec) Downloading: http://mavenrepo.openmrs.org/nexus/content/repositories/public/org/openmrs/maven/plugins/openmrs-sdk-maven-plugin/3.4.0/openmrs-sdk-maven-plugin-3.4.0.pom Downloading: http://repo.maven.apache.org/maven2/org/openmrs/maven/plugins/openmrs-sdk-maven-plugin/3.4.0/openmrs-sdk-maven-plugin-3.4.0.pom Downloaded: http://repo.maven.apache.org/maven2/org/openmrs/maven/plugins/openmrs-sdk-maven-plugin/3.4.0/openmrs-sdk-maven-plugin-3.4.0.pom (9 KB at 15.3 KB/sec) Downloading: http://mavenrepo.openmrs.org/nexus/content/repositories/public/org/openmrs/maven/openmrs-sdk/3.4.0/openmrs-sdk-3.4.0.pom Downloading: http://repo.maven.apache.org/maven2/org/openmrs/maven/openmrs-sdk/3.4.0/openmrs-sdk-3.4.0.pom Downloaded: http://repo.maven.apache.org/maven2/org/openmrs/maven/openmrs-sdk/3.4.0/openmrs-sdk-3.4.0.pom (16 KB at 22.8 KB/sec) Downloading: http://mavenrepo.openmrs.org/nexus/content/repositories/public/org/openmrs/maven/plugins/openmrs-sdk-maven-plugin/3.4.0/openmrs-sdk-maven-plugin-3.4.0.jar Downloading: http://repo.maven.apache.org/maven2/org/openmrs/maven/plugins/openmrs-sdk-maven-plugin/3.4.0/openmrs-sdk-maven-plugin-3.4.0.jar Downloaded: http://repo.maven.apache.org/maven2/org/openmrs/maven/plugins/openmrs-sdk-maven-plugin/3.4.0/openmrs-sdk-maven-plugin-3.4.0.jar (293 KB at 79.3 KB/sec) [INFO]
[INFO] ------------------------------------------------------------------------ [INFO] Building Maven Stub Project (No POM) 1 [INFO] ------------------------------------------------------------------------ [INFO] [INFO] — openmrs-sdk-maven-plugin:3.4.0:help (default-cli) @ standalone-pom —

OpenMRS SDK 3.4.0

For more info, see SDK documentation: https://wiki.openmrs.org/display/docs/OpenMRS+SDK

usage: create-module Description: Create OpenMRS Reference Application module.

usage: create-platform-module Description: Create OpenMRS Platform module.

usage: setup Description: Setup a new instance of OpenMRS server. It can be used for setting up a platform or a distribution. It prompts for any missing, but required parameters. -DaddDemoData Add demo data when setting up a platform server. -DdbDriver Database driver e.g. ‘mysql’ or ‘h2’. -DdbPassword Password for the database user. -DdbUri Uri for JDBC connection to the database (default value matches dbDriver) -DdbUser Username for the database (defaults to ‘root’). -Ddistro OpenMRS Distribution to setup in a format ‘groupId:artifactId:version’. You can skip groupId, if it is ‘org.openmrs.distro’. -Dfile Path to installation.properties file for batch setup. -Dplatform OpenMRS Platform version to setup e.g. ‘1.11.5’. -DserverId Unique id of a server.

usage: deploy Description: Deploy a module/distribution/platform to a server. It can be used for deploying a new artifact or upgrading/downgrading an artifact, which was previosly deployed. -DartifactId Artifact id of an artifact, which you want to deploy. -DgroupId Group id of an artifact, which you want to deploy (defaults to ‘org.openmrs.module’). -DserverId Unique id of a server. -Dversion Version of an artifact, which you want to deploy.

usage: undeploy Description: Undeploy a module from a server. -DartifactId Artifact id of a module, which you want to undeploy. -DgroupId Group id of a module, which you want to undeploy (defaults to ‘org.openmrs.module’). -DserverId Unique id of a server.

usage: reset Description: Reset server and its database to the initial state. -Dfull If ‘true’, delete modules installed manually (defaults to ‘false’). -Dserverid Unique id of a server.

usage: delete Description: Delete a server and its database. -DserverId Unique id of a server.

usage: run Description: Start a server. If it is run from a module/distro/platform project, the project will be redeployed before launching. -Ddebug Enable remote debugging on the given port (defaults to ‘1044’ if empty). -Dfork Set to ‘false’ to disable forking a process for running the server (defaults to ‘true’). Useful for debugging within an IDE without a remote debugger. Not that ‘false’ disables the live-reloading feature. -Dport Port to use for running the server (defaults to ‘8080’). -DserverId Unique id of a server.

usage: watch Description: Add a module from the current directory to the list of watched projects. It enables the live-reloading feature for a module. -DserverId Unique id of a server.

usage: unwatch Description: Remove a module from the list of watched projects. It disabled the live-reloading feature for a module. -DartifactId Artifact id of a module to unwatch. -DgroupId Group id of a module to unwatch. It is optional, if artifact id is unambiguous. -DserverId Unique id of a server.

usage: info Description: Display server details including the list of watched modules. -DserverId Unique id of a server.

[INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 13.513s [INFO] Finished at: Thu Oct 13 00:14:33 EAT 2016 [INFO] Final Memory: 18M/169M [INFO] ------------------------------------------------------------------------ hillary@hillary-Inspiron-5423:~$ mvn openmrs-sdk:setup [INFO] Scanning for projects… [INFO]
[INFO] ------------------------------------------------------------------------ [INFO] Building Maven Stub Project (No POM) 1 [INFO] ------------------------------------------------------------------------ [INFO] [INFO] — openmrs-sdk-maven-plugin:3.4.0:setup (default-cli) @ standalone-pom —

Setting up a new server…

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

You can setup the following servers:

  1. Distribution
  2. Platform

Which one do you choose? [1/2]: 2 [INFO] artifact org.openmrs.web:openmrs-webapp: checking for updates from openmrs-repo [INFO] artifact org.openmrs.web:openmrs-webapp: checking for updates from openmrs-repo-thirdparty [INFO] artifact org.openmrs.web:openmrs-webapp: checking for updates from central

You can deploy the following versions of a platform:

  1. 2.1.0-SNAPSHOT
  2. 2.0.0
  3. 1.12.0
  4. 1.11.6
  5. 1.10.4
  6. 1.9.11
  7. Other…

Which one do you choose? [1/2/3/4/5/6/7]: 1 [INFO] Configured Artifact: org.openmrs.web:openmrs-webapp:2.1.0-SNAPSHOT:war Downloading: http://mavenrepo.openmrs.org/nexus/content/repositories/thirdparty/org/openmrs/web/openmrs-webapp/2.1.0-SNAPSHOT/maven-metadata.xml Downloading: http://mavenrepo.openmrs.org/nexus/content/repositories/public/org/openmrs/web/openmrs-webapp/2.1.0-SNAPSHOT/maven-metadata.xml Downloaded: http://mavenrepo.openmrs.org/nexus/content/repositories/public/org/openmrs/web/openmrs-webapp/2.1.0-SNAPSHOT/maven-metadata.xml (999 B at 0.9 KB/sec) [INFO] Copying openmrs-webapp-2.1.0-SNAPSHOT.war to /home/hillary/openmrs/1/openmrs-2.1.0-SNAPSHOT.war

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’): 1043

Which database would you like to use?:

  1. H2
  2. MySQL 5.6 (requires pre-installed MySQL 5.6)
  3. MySQL 5.6 in SDK docker container (requires pre-installed Docker)
  4. Existing docker container (requires pre-installed Docker)

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

The distribution requires MySQL database. Please specify database uri (-DdbUri) (default: ‘jdbc:mysql://localhost:3306/@DBNAME@’): ‘jdbc:mysql://localhost:3306/@DBNAME@’

Please specify database username (-DdbUser) (default: ‘root’): root

Please specify database password (-DdbPassword) (default: ’ ‘): hillary [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 5:12.062s [INFO] Finished at: Thu Oct 13 00:22:17 EAT 2016 [INFO] Final Memory: 23M/221M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:3.4.0:setup (default-cli) on project standalone-pom: Failed to setup server: The db name is in a wrong format (allowed alphanumeric, dash and underscore signs): 1’ -> [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] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException hillary@hillary-Inspiron-5423:~$ mvn openmrs-sdk:setup [INFO] Scanning for projects… [INFO]
[INFO] ------------------------------------------------------------------------ [INFO] Building Maven Stub Project (No POM) 1 [INFO] ------------------------------------------------------------------------ [INFO] [INFO] — openmrs-sdk-maven-plugin:3.4.0:setup (default-cli) @ standalone-pom —

Setting up a new server…

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

You can setup the following servers:

  1. Distribution
  2. Platform

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

You can deploy the following versions of a platform:

  1. 2.1.0-SNAPSHOT
  2. 2.0.0
  3. 1.12.0
  4. 1.11.6
  5. 1.10.4
  6. 1.9.11
  7. Other…

Which one do you choose? [1/2/3/4/5/6/7]: 1 [INFO] Configured Artifact: org.openmrs.web:openmrs-webapp:2.1.0-SNAPSHOT:war [INFO] Copying openmrs-webapp-2.1.0-SNAPSHOT.war to /home/hillary/openmrs/1/openmrs-2.1.0-SNAPSHOT.war

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’): 1042

Which database would you like to use?:

  1. H2
  2. MySQL 5.6 (requires pre-installed MySQL 5.6)
  3. MySQL 5.6 in SDK docker container (requires pre-installed Docker)
  4. Existing docker container (requires pre-installed Docker)

Which one do you choose? [1/2/3/4]: 1 [INFO] artifact com.h2database:h2: checking for updates from openmrs-repo [INFO] artifact com.h2database:h2: checking for updates from openmrs-repo-thirdparty [INFO] artifact com.h2database:h2: checking for updates from central [INFO] Configured Artifact: com.h2database:h2:1.4.190:jar [INFO] Copying h2-1.4.190.jar to /home/hillary/openmrs/1/h2-1.4.190.jar

The specified database openmrs-1 does not exist and it will be created for you.

Note: JDK 1.8 is needed for platform version 2.1.0-SNAPSHOT.

Which JDK would you like to use to run this server?:

  1. JAVA_HOME (currently: /usr/lib/jvm/java-8-oracle/jre)
  2. Other…

Which one do you choose? [1/2]: 1 [INFO] Server configured successfully, path: /home/hillary/openmrs/1 [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 50.019s [INFO] Finished at: Thu Oct 13 00:23:59 EAT 2016 [INFO] Final Memory: 22M/215M [INFO] ------------------------------------------------------------------------ hillary@hillary-Inspiron-5423:~$ mvn openmrs-sdk:create-project [INFO] Scanning for projects… [INFO]
[INFO] ------------------------------------------------------------------------ [INFO] Building Maven Stub Project (No POM) 1 [INFO] ------------------------------------------------------------------------ [INFO] [INFO] — openmrs-sdk-maven-plugin:3.4.0:create-project (default-cli) @ standalone-pom —

What kind of project would you like to create?:

  1. Platform module
  2. Reference Application module
  3. Open Web App

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

Module id uniquely identifies your module in the OpenMRS world.

It is advised to consult your module id on https://talk.openmrs.org to eliminate possible collisions.

Module id must consists of lowercase letters, must start from a letter, can contain alphanumerics and dots, e.g. webservices.rest, metadatasharing, reporting, htmlformentry.

Please specify module id (default: ‘basicexample’): basicexample2

Module name is a user friendly name displayed to the user instead of the module id.

By convention it is a module id with spaces between words.

Please specify module name (default: ‘Basicexample2’): Basicexample2

Describe your module in a few sentences (default: ‘no description’): No description

GroupId, artifactId and version combined together identify your module in the maven repository.

By convention OpenMRS modules use ‘org.openmrs.module’ as a groupId (must follow convention for naming java packages) and the module id as an artifactId. The version should follow maven versioning convention, which in short is: major.minor.maintenance(-SNAPSHOT).

Please specify groupId (default: ‘org.openmrs.module’): org.openmrs.module

Please specify initial version (default: ‘1.0.0-SNAPSHOT’): 1.0.0-SNAPSHORT

What is the lowest version of the platform (-Dplatform) you want to support? (default: ‘1.11.6’): 1.11.6 [INFO] Archetype: openmrs-sdk-archetype-module-platform [INFO] Generating project in Batch mode [INFO] Archetype defined by properties Downloading: http://mavenrepo.openmrs.org/nexus/content/repositories/public/org/openmrs/maven/archetypes/openmrs-sdk-archetype-module-platform/3.4.0/openmrs-sdk-archetype-module-platform-3.4.0.jar Downloading: http://mavenrepo.openmrs.org/nexus/content/repositories/thirdparty/org/openmrs/maven/archetypes/openmrs-sdk-archetype-module-platform/3.4.0/openmrs-sdk-archetype-module-platform-3.4.0.jar Downloading: http://repo.maven.apache.org/maven2/org/openmrs/maven/archetypes/openmrs-sdk-archetype-module-platform/3.4.0/openmrs-sdk-archetype-module-platform-3.4.0.jar Downloaded: http://repo.maven.apache.org/maven2/org/openmrs/maven/archetypes/openmrs-sdk-archetype-module-platform/3.4.0/openmrs-sdk-archetype-module-platform-3.4.0.jar (25 KB at 13.8 KB/sec) Downloading: http://mavenrepo.openmrs.org/nexus/content/repositories/public/org/openmrs/maven/archetypes/openmrs-sdk-archetype-module-platform/3.4.0/openmrs-sdk-archetype-module-platform-3.4.0.pom Downloading: http://mavenrepo.openmrs.org/nexus/content/repositories/thirdparty/org/openmrs/maven/archetypes/openmrs-sdk-archetype-module-platform/3.4.0/openmrs-sdk-archetype-module-platform-3.4.0.pom Downloading: http://repo.maven.apache.org/maven2/org/openmrs/maven/archetypes/openmrs-sdk-archetype-module-platform/3.4.0/openmrs-sdk-archetype-module-platform-3.4.0.pom Downloaded: http://repo.maven.apache.org/maven2/org/openmrs/maven/archetypes/openmrs-sdk-archetype-module-platform/3.4.0/openmrs-sdk-archetype-module-platform-3.4.0.pom (2 KB at 1.2 KB/sec) [INFO] ---------------------------------------------------------------------------- [INFO] Using following parameters for creating project from Archetype: openmrs-sdk-archetype-module-platform:3.4.0 [INFO] ---------------------------------------------------------------------------- [INFO] Parameter: groupId, Value: org.openmrs.module [INFO] Parameter: artifactId, Value: basicexample2 [INFO] Parameter: version, Value: 1.0.0-SNAPSHORT [INFO] Parameter: package, Value: org.openmrs.module.basicexample2 [INFO] Parameter: packageInPathFormat, Value: org/openmrs/module/basicexample2 [INFO] Parameter: moduleClassnamePrefix, Value: Basicexample2 [INFO] Parameter: moduleName, Value: Basicexample2 [INFO] Parameter: moduleAuthor, Value: hillary [INFO] Parameter: moduleDescription, Value: No description [INFO] Parameter: groupId, Value: org.openmrs.module [INFO] Parameter: version, Value: 1.0.0-SNAPSHORT [INFO] Parameter: package, Value: org.openmrs.module.basicexample2 [INFO] Parameter: openmrsPlatformVersion, Value: 1.11.6 [INFO] Parameter: artifactId, Value: basicexample2 [INFO] Parent element not overwritten in /home/hillary/basicexample2/api/pom.xml [INFO] Parent element not overwritten in /home/hillary/basicexample2/omod/pom.xml [INFO] project created from Archetype in dir: /home/hillary/basicexample2 [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 3:29.874s [INFO] Finished at: Thu Oct 13 00:27:55 EAT 2016 [INFO] Final Memory: 19M/228M [INFO] ------------------------------------------------------------------------ hillary@hillary-Inspiron-5423:~$ cd basicexample hillary@hillary-Inspiron-5423:~/basicexample$ mvn clean install openmrs-sdk:run [INFO] Scanning for projects… [INFO] ------------------------------------------------------------------------ [INFO] Reactor Build Order: [INFO] [INFO] Basic Example Module [INFO] Basic Example Module API [INFO] Basic Example Module OMOD Downloading: http://mavenrepo.openmrs.org/nexus/content/repositories/public/org/apache/maven/plugins/maven-compiler-plugin/maven-metadata.xml [INFO]
[INFO] ------------------------------------------------------------------------ [INFO] Building Basic Example Module 1.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] — maven-clean-plugin:2.5:clean (default-clean) @ basicexample — [INFO] [INFO] — maven-install-plugin:2.3:install (default-install) @ basicexample — [INFO] Installing /home/hillary/basicexample/pom.xml to /home/hillary/.m2/repository/org/openmrs/module/basicexample/1.0-SNAPSHOT/basicexample-1.0-SNAPSHOT.pom [INFO]
[INFO] ------------------------------------------------------------------------ [INFO] Building Basic Example Module API 1.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] — maven-clean-plugin:2.5:clean (default-clean) @ basicexample-api — [INFO] Deleting /home/hillary/basicexample/api/target [INFO] [INFO] — maven-resources-plugin:2.3:resources (default-resources) @ basicexample-api — [INFO] Using ‘UTF-8’ encoding to copy filtered resources. [INFO] Copying 7 resources [INFO] [INFO] — maven-compiler-plugin:2.0.2:compile (default-compile) @ basicexample-api — [INFO] Compiling 6 source files to /home/hillary/basicexample/api/target/classes [INFO] [INFO] — maven-resources-plugin:2.3:testResources (default-testResources) @ basicexample-api — [INFO] Using ‘UTF-8’ encoding to copy filtered resources. [INFO] skip non existing resourceDirectory /home/hillary/basicexample/api/src/test/resources [INFO] [INFO] — maven-compiler-plugin:2.0.2:testCompile (default-testCompile) @ basicexample-api — [INFO] Compiling 1 source file to /home/hillary/basicexample/api/target/test-classes [INFO] [INFO] — maven-surefire-plugin:2.10:test (default-test) @ basicexample-api — [INFO] Surefire report directory: /home/hillary/basicexample/api/target/surefire-reports


T E S T S

Running org.openmrs.module.basicexample.api.BasicExampleServiceTest Tests run: 4, Failures: 1, Errors: 1, Skipped: 0, Time elapsed: 13.574 sec <<< FAILURE!

Results :

Failed tests: setDeathtoFuture(org.openmrs.module.basicexample.api.BasicExampleServiceTest): Expected exception: org.openmrs.api.APIException

Tests in error: setBirthdayToFuture(org.openmrs.module.basicexample.api.BasicExampleServiceTest): Unexpected exception, expected<org.openmrs.api.APIException> but was<junit.framework.AssertionFailedError>

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

[INFO]
[INFO] ------------------------------------------------------------------------ [INFO] Skipping Basic Example Module [INFO] This project has been banned from the build due to previous failures. [INFO] ------------------------------------------------------------------------ [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] Basic Example Module … SUCCESS [0.474s] [INFO] Basic Example Module API … FAILURE [20.613s] [INFO] Basic Example Module OMOD … SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 24.123s [INFO] Finished at: Thu Oct 13 00:29:42 EAT 2016 [INFO] Final Memory: 34M/162M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.10:test (default-test) on project basicexample-api: There are test failures. [ERROR] [ERROR] Please refer to /home/hillary/basicexample/api/target/surefire-reports for the individual test results. [ERROR] -> [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] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException [ERROR] [ERROR] After correcting the problems, you can resume the build with the command [ERROR] mvn -rf :basicexample-api hillary@hillary-Inspiron-5423:~/basicexample$

@DBNAME@ in this default URL is just placeholder for name of database, you should either write something like jdbc:mysql://localhost:3306/nameOfDatabase or just push enter, so SDK will use default value and inject server name to placeholder. URL you entered is invalid so SDK failed.

I am not able to reproduce error you got when trying to install project from archetype, build passes for me. Did you try running mvn clean install again or creating new project?

@gutkowski could we add that to the SDK such that newbies know it is just a place holder? Or using a placeholder that is also a valid name? That way, those who do not know that they need to replace it, get a valid default? :smile:

1 Like

Was the issue that @hilz041 copied and pasted the default value as is with single quotes ‘jdbc:mysql://localhost:3306/@DBNAME@’, whereas jdbc:mysql://localhost:3306/@DBNAME@ (without quotes) should be used instead.

@DBNAME@ is (or should be) always replaced even if it is entered by the user.

We could do a small adjustment and get rid of quotes in case someone puts them in the answer.

1 Like

@gutkowski thanks so much,this has really helped me. when i reached that stage of specifying the database i pushed enter and i was able to continue til the end of the installation

@dkayiwa Actually using a placeholder that is a valid name will be of good help to us the newbies. Thanks though

@raff Thanks, i had included the quotes though even after removing them i got an error but when i pushed enter was in position to proceed with the installation.

Hi @hilz041 Could you please confirm that you got an error after pasting the default value and pressing enter? Like below?

The distribution requires MySQL database. Please specify database uri (-DdbUri) (default: ‘jdbc:mysql://localhost:3306/@DBNAME@’): jdbc:mysql://localhost:3306/@DBNAME@

I’m trying to reproduce it but with no luck. It’s working for me same as just pressing the enter.

@adamg . This is the error i got. am running mysql version 5.6.24

[INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 6.995s [INFO] Finished at: Fri Oct 14 14:58:37 EAT 2016 [INFO] Final Memory: 18M/243M [INFO] ------------------------------------------------------------------------ hillary@hillary-Inspiron-5423:~$ mvn openmrs-sdk:setup [INFO] Scanning for projects… [INFO]
[INFO] ------------------------------------------------------------------------ [INFO] Building Maven Stub Project (No POM) 1 [INFO] ------------------------------------------------------------------------ [INFO] [INFO] — openmrs-sdk-maven-plugin:3.4.2:setup (default-cli) @ standalone-pom —

Setting up a new server…

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

You can setup the following servers:

  1. Distribution
  2. Platform

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

You can deploy the following versions of a platform:

  1. 2.1.0-SNAPSHOT
  2. 2.0.0
  3. 1.12.0
  4. 1.11.6
  5. 1.10.4
  6. 1.9.11
  7. Other…

Which one do you choose? [1/2/3/4/5/6/7]: 1 [INFO] Configured Artifact: org.openmrs.web:openmrs-webapp:2.1.0-SNAPSHOT:war [INFO] Copying openmrs-webapp-2.1.0-SNAPSHOT.war to /home/hillary/openmrs/openmrs/openmrs-2.1.0-SNAPSHOT.war

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’): 8000

Which database would you like to use?:

  1. H2
  2. MySQL 5.6 (requires pre-installed MySQL 5.6)
  3. MySQL 5.6 in SDK docker container (requires pre-installed Docker)
  4. Existing docker container (requires pre-installed Docker)

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

The distribution requires MySQL database. Please specify database uri (-DdbUri) (default: ‘jdbc:mysql://localhost:3306/@DBNAME@’): jdbc:mysql://localhost:3306/@DBNAME@?autoReconnect=true&createDatabaseIfNotExist=true&sessionVariables=storage_engine=InnoDB&useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull

Please specify database username (-DdbUser) (default: ‘root’): root

Please specify database password (-DdbPassword) (default: ’ '): hillary [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 7:00.506s [INFO] Finished at: Fri Oct 14 15:06:03 EAT 2016 [INFO] Final Memory: 21M/167M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:3.4.2:setup (default-cli) on project standalone-pom: Failed to setup server: Failed to connect to the specified database jdbc:mysql://localhost:3306/openmrs?createDatabaseIfNotExist=true&zeroDateTimeBehavior=convertToNull&autoReconnect=true&sessionVariables=storage_engine%3DInnoDB&useUnicode=true&characterEncoding=UTF-8 -> [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] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

I’ve tested it and it works for me. Could you please run the setup command with -e and paste the stack trace here?

mvn openmrs-sdk:setup -e

Hello @hilz041, i am not long with this :slight_smile: however had crazily many issues. the database - it helped me, to create a database upfront (‘create database openmrs;’). Then, in the installation, to indicate that a Db existed.

Hello @adamg . I am stuck with same the error. I am on Ubuntu 14.04 LTS with MYSQL 5.6.34 server running.

I am just pressing Enter for all the Questions.

Does database password(-DdbPassword) is the root password of Mysql?


:~$ mvn openmrs-sdk:setup -e

Java HotSpot™ 64-Bit Server VM warning: ignoring option MaxPermSize=512m; support was removed in 8.0 [INFO] Error stacktraces are turned on. [INFO] Scanning for projects… [INFO]
[INFO] ------------------------------------------------------------------------ [INFO] Building Maven Stub Project (No POM) 1 [INFO] ------------------------------------------------------------------------ [INFO] [INFO] — openmrs-sdk-maven-plugin:3.4.3:setup (default-cli) @ standalone-pom —

Setting up a new server…

Specify server id (-DserverId) (default: ‘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 2.5-SNAPSHOT
  2. Reference Application 2.4
  3. Reference Application 2.3.1
  4. Reference Application 2.2
  5. Reference Application 2.1
  6. Other…

Which one do you choose? [1/2/3/4/5/6]: 1 [INFO] Configured Artifact: org.openmrs.distro:referenceapplication-package:2.5-SNAPSHOT:jar [INFO] Copying referenceapplication-package-2.5-SNAPSHOT.jar to /home/myownway/openmrs/server2/openmrs-distro.jar [INFO] Configured Artifact: org.openmrs.web:openmrs-webapp:2.0.1-SNAPSHOT:war [INFO] Copying openmrs-webapp-2.0.1-SNAPSHOT.war to /home/myownway/openmrs/server2/openmrs-2.0.1-SNAPSHOT.war [INFO] Configured Artifact: org.openmrs.module:htmlformentry19ext-omod:1.7:jar [INFO] Configured Artifact: org.openmrs.module:legacyui-omod:1.2:jar [INFO] Configured Artifact: org.openmrs.module:metadatadeploy-omod:1.7:jar [INFO] Configured Artifact: org.openmrs.module:reportingrest-omod:1.6:jar [INFO] Configured Artifact: org.openmrs.module:owa-omod:1.6.3:jar [INFO] Configured Artifact: org.openmrs.module:serialization.xstream-omod:0.2.12:omod [INFO] Configured Artifact: org.openmrs.module:registrationapp-omod:1.6:jar [INFO] Configured Artifact: org.openmrs:event-omod:2.5:jar [INFO] Configured Artifact: org.openmrs.module:uilibrary-omod:2.0.4:jar [INFO] Configured Artifact: org.openmrs.module:htmlwidgets-omod:1.7.2:jar [INFO] Configured Artifact: org.openmrs.module:dataexchange-omod:1.3.2:jar [INFO] Configured Artifact: org.openmrs.module:appui-omod:1.7:jar [INFO] Configured Artifact: org.openmrs.module:allergyui-omod:1.6:jar [INFO] Configured Artifact: org.openmrs.module:providermanagement-omod:2.5.0:jar [INFO] Configured Artifact: org.openmrs.module:appointmentschedulingui-omod:1.4.0:jar [INFO] Configured Artifact: org.openmrs.module:formentryapp-omod:1.3:jar [INFO] Configured Artifact: org.openmrs.module:idgen-omod:4.4.0:jar [INFO] Configured Artifact: org.openmrs.module:metadatamapping-omod:1.2.1:jar [INFO] Configured Artifact: org.openmrs.module:chartsearch-omod:2.0:jar [INFO] Configured Artifact: org.openmrs.module:htmlformentryui-omod:1.6.1:jar [INFO] Configured Artifact: org.openmrs.module:referencedemodata-omod:1.4.3-SNAPSHOT:jar [INFO] Configured Artifact: org.openmrs.module:emrapi-omod:1.18:jar [INFO] Configured Artifact: org.openmrs.module:referenceapplication-omod:2.5-SNAPSHOT:jar [INFO] Configured Artifact: org.openmrs.module:htmlformentry-omod:3.3.0:jar [INFO] Configured Artifact: org.openmrs.module:appframework-omod:2.9:jar [INFO] Configured Artifact: org.openmrs.module:referencemetadata-omod:2.5-SNAPSHOT:jar [INFO] Configured Artifact: org.openmrs.module:coreapps-omod:1.11.1:jar [INFO] Configured Artifact: org.openmrs.module:reportingcompatibility-omod:2.0.1:jar [INFO] Configured Artifact: org.openmrs.module:reporting-omod:0.10.5:jar [INFO] Configured Artifact: org.openmrs.module:adminui-omod:1.2:jar [INFO] Configured Artifact: org.openmrs.module:registrationcore-omod:1.6:jar [INFO] Configured Artifact: org.openmrs.module:appointmentscheduling-omod:1.7.0:jar [INFO] Configured Artifact: org.openmrs.module:atlas-omod:2.2:omod [INFO] Configured Artifact: org.openmrs.module:calculation-omod:1.2:jar [INFO] Configured Artifact: org.openmrs.module:webservices.rest-omod:2.16:jar [INFO] Configured Artifact: org.openmrs.module:uicommons-omod:2.1:jar [INFO] Configured Artifact: org.openmrs.module:uiframework-omod:3.9:jar [INFO] Configured Artifact: org.openmrs.module:metadatasharing-omod:1.2.2:jar [INFO] Copying htmlformentry19ext-omod-1.7.jar to /home/myownway/openmrs/server2/modules/htmlformentry19ext-1.7.omod [INFO] Copying legacyui-omod-1.2.jar to /home/myownway/openmrs/server2/modules/legacyui-1.2.omod [INFO] Copying metadatadeploy-omod-1.7.jar to /home/myownway/openmrs/server2/modules/metadatadeploy-1.7.omod [INFO] Copying reportingrest-omod-1.6.jar to /home/myownway/openmrs/server2/modules/reportingrest-1.6.omod [INFO] Copying owa-omod-1.6.3.jar to /home/myownway/openmrs/server2/modules/owa-1.6.3.omod [INFO] Copying serialization.xstream-omod-0.2.12.omod to /home/myownway/openmrs/server2/modules/serialization.xstream-0.2.12.omod [INFO] Copying registrationapp-omod-1.6.jar to /home/myownway/openmrs/server2/modules/registrationapp-1.6.omod [INFO] Copying event-omod-2.5.jar to /home/myownway/openmrs/server2/modules/event-2.5.omod [INFO] Copying uilibrary-omod-2.0.4.jar to /home/myownway/openmrs/server2/modules/uilibrary-2.0.4.omod [INFO] Copying htmlwidgets-omod-1.7.2.jar to /home/myownway/openmrs/server2/modules/htmlwidgets-1.7.2.omod [INFO] Copying dataexchange-omod-1.3.2.jar to /home/myownway/openmrs/server2/modules/dataexchange-1.3.2.omod [INFO] Copying appui-omod-1.7.jar to /home/myownway/openmrs/server2/modules/appui-1.7.omod [INFO] Copying allergyui-omod-1.6.jar to /home/myownway/openmrs/server2/modules/allergyui-1.6.omod [INFO] Copying providermanagement-omod-2.5.0.jar to /home/myownway/openmrs/server2/modules/providermanagement-2.5.0.omod [INFO] Copying appointmentschedulingui-omod-1.4.0.jar to /home/myownway/openmrs/server2/modules/appointmentschedulingui-1.4.0.omod [INFO] Copying formentryapp-omod-1.3.jar to /home/myownway/openmrs/server2/modules/formentryapp-1.3.omod [INFO] Copying idgen-omod-4.4.0.jar to /home/myownway/openmrs/server2/modules/idgen-4.4.0.omod [INFO] Copying metadatamapping-omod-1.2.1.jar to /home/myownway/openmrs/server2/modules/metadatamapping-1.2.1.omod [INFO] Copying chartsearch-omod-2.0.jar to /home/myownway/openmrs/server2/modules/chartsearch-2.0.omod [INFO] Copying htmlformentryui-omod-1.6.1.jar to /home/myownway/openmrs/server2/modules/htmlformentryui-1.6.1.omod [INFO] Copying referencedemodata-omod-1.4.3-SNAPSHOT.jar to /home/myownway/openmrs/server2/modules/referencedemodata-1.4.3-SNAPSHOT.omod [INFO] Copying emrapi-omod-1.18.jar to /home/myownway/openmrs/server2/modules/emrapi-1.18.omod [INFO] Copying referenceapplication-omod-2.5-SNAPSHOT.jar to /home/myownway/openmrs/server2/modules/referenceapplication-2.5-SNAPSHOT.omod [INFO] Copying htmlformentry-omod-3.3.0.jar to /home/myownway/openmrs/server2/modules/htmlformentry-3.3.0.omod [INFO] Copying appframework-omod-2.9.jar to /home/myownway/openmrs/server2/modules/appframework-2.9.omod [INFO] Copying referencemetadata-omod-2.5-SNAPSHOT.jar to /home/myownway/openmrs/server2/modules/referencemetadata-2.5-SNAPSHOT.omod [INFO] Copying coreapps-omod-1.11.1.jar to /home/myownway/openmrs/server2/modules/coreapps-1.11.1.omod [INFO] Copying reportingcompatibility-omod-2.0.1.jar to /home/myownway/openmrs/server2/modules/reportingcompatibility-2.0.1.omod [INFO] Copying reporting-omod-0.10.5.jar to /home/myownway/openmrs/server2/modules/reporting-0.10.5.omod [INFO] Copying adminui-omod-1.2.jar to /home/myownway/openmrs/server2/modules/adminui-1.2.omod [INFO] Copying registrationcore-omod-1.6.jar to /home/myownway/openmrs/server2/modules/registrationcore-1.6.omod [INFO] Copying appointmentscheduling-omod-1.7.0.jar to /home/myownway/openmrs/server2/modules/appointmentscheduling-1.7.0.omod [INFO] Copying atlas-omod-2.2.omod to /home/myownway/openmrs/server2/modules/atlas-2.2.omod [INFO] Copying calculation-omod-1.2.jar to /home/myownway/openmrs/server2/modules/calculation-1.2.omod [INFO] Copying webservices.rest-omod-2.16.jar to /home/myownway/openmrs/server2/modules/webservices.rest-2.16.omod [INFO] Copying uicommons-omod-2.1.jar to /home/myownway/openmrs/server2/modules/uicommons-2.1.omod [INFO] Copying uiframework-omod-3.9.jar to /home/myownway/openmrs/server2/modules/uiframework-3.9.omod [INFO] Copying metadatasharing-omod-1.2.2.jar to /home/myownway/openmrs/server2/modules/metadatasharing-1.2.2.omod

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’):

Which database would you like to use?:

  1. MySQL 5.6 (requires pre-installed MySQL 5.6)
  2. MySQL 5.6 in SDK docker container (requires pre-installed Docker)
  3. Existing docker container (requires pre-installed Docker)

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

The distribution requires MySQL database. Please specify database uri (-DdbUri) (default: ‘jdbc:mysql://localhost:3306/@DBNAME@’):

Please specify database username (-DdbUser) (default: ‘root’):

Please specify database password (-DdbPassword) (default: ’ '): [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 24.219s [INFO] Finished at: Mon Oct 31 20:33:44 IST 2016 [INFO] Final Memory: 24M/736M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:3.4.3:setup (default-cli) on project standalone-pom: Failed to setup server: Failed to connect to the specified database jdbc:mysql://localhost:3306/server2?autoReconnect=true&sessionVariables=storage_engine%3DInnoDB&useUnicode=true&characterEncoding=UTF-8 -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:3.4.3:setup (default-cli) on project standalone-pom: Failed to setup server at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to setup server at org.openmrs.maven.plugins.Setup.setup(Setup.java:216) at org.openmrs.maven.plugins.Setup.executeTask(Setup.java:450) at org.openmrs.maven.plugins.AbstractTask.execute(AbstractTask.java:174) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) … 19 more Caused by: java.lang.IllegalStateException: Failed to connect to the specified database jdbc:mysql://localhost:3306/server2?autoReconnect=true&sessionVariables=storage_engine%3DInnoDB&useUnicode=true&characterEncoding=UTF-8 at org.openmrs.maven.plugins.Setup.setup(Setup.java:181) … 23 more [ERROR] [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] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException


Kindly help.

@myownway, try to follow the procedures as they are https://wiki.openmrs.org/display/docs/OpenMRS+SDK, when you get to that step of choosing the database select 1 then copy and paste jdbc:mysql://localhost:3306/@DBNAME@ without quotes, username maintain root and then type your password for the database. hope it helps Thanks.

Hello @hilz041, I am following the steps from the same wiki article.

I tried out the suggestions you mentioned . But they didn’t worked out. I am getting the same error.

Is it working for you? What are your machine configurations? It might help me in debugging the problem.

Thanks for your help!

I have kept it blank still I’m having the same error

Im getting same error for distribution server… for Platform it works fine with no error but for distribution i’m having problem

========================================================================

Specify server id (-DserverId) (default: ‘server1’): sun1

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 2.7.0-SNAPSHOT
  2. Reference Application 2.6.0
  3. Reference Application 2.5
  4. Reference Application 2.4
  5. Reference Application 2.3.1
  6. Other…

Which one do you choose? [1/2/3/4/5/6]: 1 [INFO] Configured Artifact: org.openmrs.distro:referenceapplication-package:2.7.0-SNAPSHOT:jar [INFO] Copying referenceapplication-package-2.7.0-SNAPSHOT.jar to C:\Users\sunil\openmrs\sun1\openmrs-distro.jar [INFO] Configured Artifact: org.openmrs.web:openmrs-webapp:2.0.5:war [INFO] Copying openmrs-webapp-2.0.5.war to C:\Users\sunil\openmrs\sun1\openmrs-2.0.5.war [INFO] Configured Artifact: org.openmrs.module:legacyui-omod:1.3.1:jar [INFO] Configured Artifact: org.openmrs.module:metadatadeploy-omod:1.8.1:jar [INFO] Configured Artifact: org.openmrs.module:reportingrest-omod:1.8.0:jar [INFO] Configured Artifact: org.openmrs.module:owa-omod:1.7.0:jar [INFO] Configured Artifact: org.openmrs.module:serialization.xstream-omod:0.2.12:omod [INFO] Configured Artifact: org.openmrs.module:registrationapp-omod:1.8.0:jar [INFO] Configured Artifact: org.openmrs:event-omod:2.5:jar [INFO] Configured Artifact: org.openmrs.module:uilibrary-omod:2.0.4:jar [INFO] Configured Artifact: org.openmrs.module:htmlwidgets-omod:1.9.0:jar [INFO] Configured Artifact: org.openmrs.module:dataexchange-omod:1.3.2:jar [INFO] Configured Artifact: org.openmrs.module:appui-omod:1.8.0:jar [INFO] Configured Artifact: org.openmrs.module:allergyui-omod:1.7.0:jar [INFO] Configured Artifact: org.openmrs.module:providermanagement-omod:2.6.0:jar [INFO] Configured Artifact: org.openmrs.module:appointmentschedulingui-omod:1.6.0:jar [INFO] Configured Artifact: org.openmrs.module:formentryapp-omod:1.4.1:jar [INFO] Configured Artifact: org.openmrs.module:idgen-omod:4.4.1:jar [INFO] Configured Artifact: org.openmrs.module:metadatamapping-omod:1.3.2:jar [INFO] Configured Artifact: org.openmrs.module:chartsearch-omod:2.0:jar [INFO] Configured Artifact: org.openmrs.module:htmlformentryui-omod:1.6.3:jar [INFO] Configured Artifact: org.openmrs.module:referencedemodata-omod:1.4.3:jar [INFO] Configured Artifact: org.openmrs.module:emrapi-omod:1.21.0:jar [INFO] Configured Artifact: org.openmrs.module:referenceapplication-omod:2.6.0:jar [INFO] Configured Artifact: org.openmrs.module:htmlformentry-omod:3.3.2:jar [INFO] Configured Artifact: org.openmrs.module:appframework-omod:2.10.0:jar [INFO] Configured Artifact: org.openmrs.module:referencemetadata-omod:2.6.0:jar [INFO] Configured Artifact: org.openmrs.module:reportingui-omod:1.3.0:jar [INFO] Configured Artifact: org.openmrs.module:coreapps-omod:1.14.0-SNAPSHOT:jar [INFO] Configured Artifact: org.openmrs.module:reportingcompatibility-omod:2.0.2:jar [INFO] Configured Artifact: org.openmrs.module:reporting-omod:1.12.0:jar [INFO] Configured Artifact: org.openmrs.module:adminui-omod:1.2.2:jar [INFO] Configured Artifact: org.openmrs.module:registrationcore-omod:1.7.1:jar [INFO] Configured Artifact: org.openmrs.module:appointmentscheduling-omod:1.8.0:jar [INFO] Configured Artifact: org.openmrs.module:calculation-omod:1.2:jar [INFO] Configured Artifact: org.openmrs.module:webservices.rest-omod:2.20.0-SNAPSHOT:jar [INFO] Configured Artifact: org.openmrs.module:atlas-omod:2.2:omod [INFO] Configured Artifact: org.openmrs.module:uicommons-omod:2.4.0-SNAPSHOT:jar [INFO] Configured Artifact: org.openmrs.module:uiframework-omod:3.12.0-SNAPSHOT:jar [INFO] Configured Artifact: org.openmrs.module:metadatasharing-omod:1.2.2:jar [INFO] Copying legacyui-omod-1.3.1.jar to C:\Users\sunil\openmrs\sun1\modules\legacyui-1.3.1.omod [INFO] Copying metadatadeploy-omod-1.8.1.jar to C:\Users\sunil\openmrs\sun1\modules\metadatadeploy-1.8.1.omod [INFO] Copying reportingrest-omod-1.8.0.jar to C:\Users\sunil\openmrs\sun1\modules\reportingrest-1.8.0.omod [INFO] Copying owa-omod-1.7.0.jar to C:\Users\sunil\openmrs\sun1\modules\owa-1.7.0.omod [INFO] Copying serialization.xstream-omod-0.2.12.omod to C:\Users\sunil\openmrs\sun1\modules\serialization.xstream-0.2.12.omod [INFO] Copying registrationapp-omod-1.8.0.jar to C:\Users\sunil\openmrs\sun1\modules\registrationapp-1.8.0.omod [INFO] Copying event-omod-2.5.jar to C:\Users\sunil\openmrs\sun1\modules\event-2.5.omod [INFO] Copying uilibrary-omod-2.0.4.jar to C:\Users\sunil\openmrs\sun1\modules\uilibrary-2.0.4.omod [INFO] Copying htmlwidgets-omod-1.9.0.jar to C:\Users\sunil\openmrs\sun1\modules\htmlwidgets-1.9.0.omod [INFO] Copying dataexchange-omod-1.3.2.jar to C:\Users\sunil\openmrs\sun1\modules\dataexchange-1.3.2.omod [INFO] Copying appui-omod-1.8.0.jar to C:\Users\sunil\openmrs\sun1\modules\appui-1.8.0.omod [INFO] Copying allergyui-omod-1.7.0.jar to C:\Users\sunil\openmrs\sun1\modules\allergyui-1.7.0.omod [INFO] Copying providermanagement-omod-2.6.0.jar to C:\Users\sunil\openmrs\sun1\modules\providermanagement-2.6.0.omod [INFO] Copying appointmentschedulingui-omod-1.6.0.jar to C:\Users\sunil\openmrs\sun1\modules\appointmentschedulingui-1.6.0.omod [INFO] Copying formentryapp-omod-1.4.1.jar to C:\Users\sunil\openmrs\sun1\modules\formentryapp-1.4.1.omod [INFO] Copying idgen-omod-4.4.1.jar to C:\Users\sunil\openmrs\sun1\modules\idgen-4.4.1.omod [INFO] Copying metadatamapping-omod-1.3.2.jar to C:\Users\sunil\openmrs\sun1\modules\metadatamapping-1.3.2.omod [INFO] Copying chartsearch-omod-2.0.jar to C:\Users\sunil\openmrs\sun1\modules\chartsearch-2.0.omod [INFO] Copying htmlformentryui-omod-1.6.3.jar to C:\Users\sunil\openmrs\sun1\modules\htmlformentryui-1.6.3.omod [INFO] Copying referencedemodata-omod-1.4.3.jar to C:\Users\sunil\openmrs\sun1\modules\referencedemodata-1.4.3.omod [INFO] Copying emrapi-omod-1.21.0.jar to C:\Users\sunil\openmrs\sun1\modules\emrapi-1.21.0.omod [INFO] Copying referenceapplication-omod-2.6.0.jar to C:\Users\sunil\openmrs\sun1\modules\referenceapplication-2.6.0.omod [INFO] Copying htmlformentry-omod-3.3.2.jar to C:\Users\sunil\openmrs\sun1\modules\htmlformentry-3.3.2.omod [INFO] Copying appframework-omod-2.10.0.jar to C:\Users\sunil\openmrs\sun1\modules\appframework-2.10.0.omod [INFO] Copying referencemetadata-omod-2.6.0.jar to C:\Users\sunil\openmrs\sun1\modules\referencemetadata-2.6.0.omod [INFO] Copying reportingui-omod-1.3.0.jar to C:\Users\sunil\openmrs\sun1\modules\reportingui-1.3.0.omod [INFO] Copying coreapps-omod-1.14.0-SNAPSHOT.jar to C:\Users\sunil\openmrs\sun1\modules\coreapps-1.14.0-SNAPSHOT.omod [INFO] Copying reportingcompatibility-omod-2.0.2.jar to C:\Users\sunil\openmrs\sun1\modules\reportingcompatibility-2.0.2.omod [INFO] Copying reporting-omod-1.12.0.jar to C:\Users\sunil\openmrs\sun1\modules\reporting-1.12.0.omod [INFO] Copying adminui-omod-1.2.2.jar to C:\Users\sunil\openmrs\sun1\modules\adminui-1.2.2.omod [INFO] Copying registrationcore-omod-1.7.1.jar to C:\Users\sunil\openmrs\sun1\modules\registrationcore-1.7.1.omod [INFO] Copying appointmentscheduling-omod-1.8.0.jar to C:\Users\sunil\openmrs\sun1\modules\appointmentscheduling-1.8.0.omod [INFO] Copying calculation-omod-1.2.jar to C:\Users\sunil\openmrs\sun1\modules\calculation-1.2.omod [INFO] Copying webservices.rest-omod-2.20.0-SNAPSHOT.jar to C:\Users\sunil\openmrs\sun1\modules\webservices.rest-2.20.0-SNAPSHOT.omod [INFO] Copying atlas-omod-2.2.omod to C:\Users\sunil\openmrs\sun1\modules\atlas-2.2.omod [INFO] Copying uicommons-omod-2.4.0-SNAPSHOT.jar to C:\Users\sunil\openmrs\sun1\modules\uicommons-2.4.0-SNAPSHOT.omod [INFO] Copying uiframework-omod-3.12.0-SNAPSHOT.jar to C:\Users\sunil\openmrs\sun1\modules\uiframework-3.12.0-SNAPSHOT.omod [INFO] Copying metadatasharing-omod-1.2.2.jar to C:\Users\sunil\openmrs\sun1\modules\metadatasharing-1.2.2.omod

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

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’): 1043

Which database would you like to use?:

  1. MySQL 5.6 (requires pre-installed MySQL 5.6)
  2. MySQL 5.6 in SDK docker container (requires pre-installed Docker)
  3. Existing docker container (requires pre-installed Docker)

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

The distribution requires MySQL database. Please specify database uri (-DdbUri) (default: ‘jdbc:mysql://localhost:3306/@DBNAME@’): jdbc:mysql://localhost:3306/@openmrsdev1@

Please specify database username (-DdbUser) (default: ‘root’): root Please specify database password (-DdbPassword) (default: ’ '): [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 45.885 s [INFO] Finished at: 2017-05-29T11:49:42+05:30 [INFO] Final Memory: 20M/981M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:3.10.0:setup (default-cli) on project standalone-pom: Failed to setup server: The db name is in a wrong format (allowed alphanumeric, dash and underscore signs): @openmrsdev1@ -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:3.10.0:setup (default-cli) on project standalone-pom: Failed to setup server at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345) at org.apache.maven.cli.MavenCli.main(MavenCli.java:191) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to setup server at org.openmrs.maven.plugins.Setup.setup(Setup.java:271) at org.openmrs.maven.plugins.Setup.executeTask(Setup.java:625) at org.openmrs.maven.plugins.AbstractTask.execute(AbstractTask.java:181) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208) … 20 more Caused by: org.apache.maven.plugin.MojoExecutionException: The db name is in a wrong format (allowed alphanumeric, dash and underscore signs): @openmrsdev1@ at org.openmrs.maven.plugins.Setup.determineDbName(Setup.java:539) at org.openmrs.maven.plugins.Setup.setup(Setup.java:206) … 24 more [ERROR] [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] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException ‘cmd’ is not recognized as an internal or external command, operable program or batch file.

Is all well if you choose (2) for the version of the distribution?

The db name, which you put in the connection url is not valid. Please remove ‘@’.

If I choose It was successfully built the platform module their was no error for database name I kept default name like @DBNAME@

but for distribution it was giving me error but as u told to leave it blank and followed that … work for distribution server,

After successful setup of the OPENMRS SDK- with java 8 and MySQL 5.7 versions plus other requirements. Am wondering why I first failed with Java 11 JDK?